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.
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.
What does this prompt do?
- 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 do I need to use this?
- 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
How can I customize it?
- 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.
FAQs
How current is the data?
How far back can I look?
Will it slow down or fail on a big date range?
What does the Diagnose button do?
Can I share this with people who do not use Loop?
Related templates
Every weekday at 10am, an AI voice agent phones your most overdue Xero accounts, logs what each customer promised, and reports back to finance in Slack.
See every Google Maps listing you manage on one screen, ranked worst first, with an audit button that writes the fix list for you.
Every couple of hours we find the chats your team never answered, email those visitors a real reply, and hand the sensitive ones to a support lead.
Your team picks a template, finds the customer, checks they are safe to email, then sends it, with every send logged where the whole team can see it.
Every night at 2am, pull the contacts on your open and won deals and block them from your cold outreach before the next send goes out.
Build every text campaign in one screen: check who is actually reachable, see a realistic send plan, then watch delivery land row by row.
Stop waiting hours to see today's returns.
Open a returns screen that recalculates fresh every time, compares against last period, and shows you the exact products and reasons behind every number.