# Live Loop returns analytics with product-level drill-down

> Pick any date range up to 120 days and see return volume, refund versus exchange mix, and the products behind every number, recalculated each time you open it.

- Workflow type: app
- Services: Loop Returns, Google Sheets, Slack
- Categories: Operations, Product
- Published: 2026-08-31

## What it does

- Pick any date range up to 120 days and see return volume, the split between refunds, exchanges, and store credit, and the total refunded, all calculated the moment you open the screen.
- Every number is compared against the previous period of the same length, so you can see what actually changed rather than just where things stand.
- Break returns down by product, variant, and return reason, then open any row to read the individual returns behind it and the notes attached to them.
- Export the current view to a Google Sheet or post a snapshot to Slack in one click, and hit Diagnose on any product to get a written explanation of why it keeps coming back plus a recommended fix.

## What you'll need

- A Loop Returns account with access to your returns, orders, and product data
- A Google account, if you want to export views to a spreadsheet
- A Slack workspace and a channel to post snapshots into, if you want to share them there

## Prompt

Build me an app I can open any time to analyze my Loop Returns data, instead of waiting on Loop's own reports. Loop's reporting can take six to eight hours to populate and struggles to load on large date ranges, so the whole point of this app is that it computes straight from the returns API on demand and lets me drill into the returns behind any number.

The main screen is a returns analytics view for a date range I pick. Give me a date picker that defaults to the last 30 days and enforces a maximum range of 120 days, because Loop's Detailed Returns List caps the from-to window at 120 days. Always send explicit from and to values, since Loop defaults to only the previous 24 hours when no range is passed.

To load a range, page through Detailed Returns List with paginate=true and a pageSize near the maximum of 750, following nextPageUrl until it comes back null. Loop allows 300 requests per minute per API key, so cache the computed result for each date range and reuse it as I sort, filter, and drill down, rather than refetching on every interaction. Loop's responses are additive only, so tolerate fields you do not recognize.

Alongside the selected range, fetch the immediately preceding window of the same length in a second pass, so every headline number and every table row can show a period-over-period comparison with the change expressed both in absolute terms and as a percentage.

At the top of the screen, show headline numbers for the selected range: total return volume, the mix of refunds versus exchanges versus store credit, and total refunded. Each one carries its comparison against the prior period.

Below that, show three breakdown tables: by product, by variant, and by return reason. Each row shows return count, total refunded, the refund versus exchange versus store credit split, and the change against the prior period. Let me sort each table and search within it.

Every row drills in. Clicking a product, variant, or reason row opens the individual returns that make up that row, and clicking a single return shows its full detail from Get Return Details plus its notes from Get Return Notes, so I can read what the customer selected and what my team wrote.

Two buttons act on whatever is currently on screen. Export to Sheets creates a new spreadsheet with Create Spreadsheet and writes the headline numbers and all three breakdown tables into it with Append Values, then shows me the link so I can pass it to the merchandising team. Post to Slack sends a snapshot of the headline numbers and the biggest movers to a channel I choose, using Send a Message.

Each product row has a Diagnose this product button that starts a background agent scoped to just that product. The agent reads that product's returns in the selected range along with their reasons and notes (Get Return Details, Get Return Notes) and the product and variant context from Loop (Get Product, List Product Variants, Get Product Variant), then writes a short diagnosis of why the product is coming back and one recommended fix. Save that output in the app against the product and display it next to the product row along with the date it was generated, so it persists after the run finishes and I can regenerate it later. Show a running state on the row while the agent works.

Loop returns money as an integer amount in minor units plus a currency code. Format every amount as real money with the correct currency symbol everywhere in the UI, and never show raw cent values.

## How to customize

- Change the date range that loads by default, for example last 7 days instead of last 30.
- Choose which Slack channel snapshots go to and how much detail each message carries.
- Adjust the breakdown tables, such as sorting by total refunded instead of return count, or hiding products below a minimum number of returns.

## FAQ

### How current is the data?

It is calculated from your live returns data at the moment you load the screen, so returns created minutes ago are already included. That is the main reason this exists: built-in returns reporting can take several hours to populate, which means same-day returns are invisible right when you want to look at them.

### How far back can I look?

Up to 120 days in a single range, which is the widest window Loop allows for a detailed return pull. The comparison automatically covers the equivalent window immediately before the one you picked, so a 30 day range is measured against the 30 days before it.

### Will it slow down or fail on a big date range?

It pages through your returns in the background and caches the result for each range, so moving between tables, sorting, and drilling into rows does not refetch anything. Wide ranges take a moment to load the first time and are instant afterwards.

### What does the Diagnose button do?

It starts a background assistant for that one product. The assistant reads that product's returns in your selected range, the reasons customers gave, the notes on those returns, and the product and variant details, then writes a short diagnosis and one recommended fix. The result is saved and shown next to the product, so it stays there after the run finishes.

### Can I share this with people who do not use Loop?

Yes. The export button writes the headline numbers and all three breakdown tables into a new Google Sheet you can hand to the merchandising team, and the Slack button posts a snapshot of the current view to a channel.

Use this prompt in General Input: https://www.generalinput.com/prompts/live-loop-returns-analytics-with-product-level-drill-down