Screen Loop Returns for abuse before refunds go out
Twice a day we review your latest returns, hold only the ones that look like abuse, and post each case to Slack for a person to confirm.
Twice a day, at 9am and 5pm, screen my recent Loop Returns activity for signs of return abuse and place a hold on only the returns that genuinely deserve a human look. Run this on a schedule rather than a live trigger, since Loop Returns does not push events to us.
Start with the Loop Returns Detailed Returns List operation to pull every return created since the last run. That operation defaults to the previous 24 hours when no date range is given, so pass an explicit from and to that covers the window since the previous run plus roughly an hour of overlap, so nothing slips between runs. Use pagination by passing paginate=true, and keep following nextPageUrl until it comes back null. Loop allows 300 requests per minute per key, so pace the calls and back off briefly on a 429 instead of failing the run.
Read the batch as a whole rather than judging each return in isolation, because the abuse patterns only show up across returns. Build a shortlist of anything worth a closer look: the same shopper filing several returns in a short window, returns with an unusually high total value, the same product or variant coming back repeatedly across different orders, a shopper whose orders are almost all returned, and requests that ask for a refund every single time where exchanges would be normal for that category. Anything that does not raise one of these signals should be left completely alone.
For each return on the shortlist, call Get Return Details to pull the full record, selecting it by return_id. Then use List Customers to cross reference the shopper's history so you can tell the difference between a long standing customer with a lot of clean orders and a new account that has done nothing but return. Money values in Loop come back in minor units such as cents along with a currency code, so convert them before you compare thresholds or write any figure into a message.
Be deliberately conservative about what you act on. Flagging a return blocks automated processing and forces a person to intervene, so a false positive costs a real customer real time and costs my team work. Require at least two independent signals before you act, and never flag on a single return alone. Actively look for the innocent explanation first: sizing problems in apparel, a gift being returned by the recipient, a damaged or incorrect shipment, seasonal spikes, or a shopper who simply buys a lot from us. If the picture is genuinely ambiguous after you have looked at the customer history, let the return through. I would much rather miss a borderline case than hold a good customer's refund.
For each return that clears that bar, do three things in order. First call Flag Return so Loop holds it and prevents automated processing until a human reviews it in the merchant admin. Second call Create Fraud Report on that same return, attaching the written reasoning so the evidence lives on the record itself and whoever opens it in Loop sees why it was held. Third post the case to Slack with Send a Message so a person can confirm or clear it.
Post one Slack message per flagged return rather than a single combined digest, so each case can be confirmed or cleared independently. Each message should carry the return ID, the order name, the shopper, the total value and item count, the specific pattern that triggered the hold, and a clear next step telling the reviewer to open that return in Loop and either release it or keep the hold. Slack uses mrkdwn, so use single asterisks for bold.
Write every explanation in plain language, as if you are talking to a support teammate who has not seen any of the underlying data. No risk scores, no jargon, no unexplained thresholds. Say exactly what happened with real numbers and dates, for example that this shopper has filed five returns in eleven days totalling 1,200 dollars and that two of the same items have now come back twice. Always include the counter argument in the same message: name the most likely innocent explanation and say what would clear the case, so the reviewer can make a fast decision instead of redoing your analysis.
Stay strictly inside these boundaries. Only ever call Flag Return, Create Fraud Report, and the Slack message. Never create a blocklist entry, never process, cancel, or close a return, and never contact the shopper. Skip any return that is already flagged or already carries a fraud report so repeated runs do not double up, and if Loop responds that a return is not in a processable state, treat it as already handled and move on. When nothing meets the bar, post one short Slack line saying how many returns were screened and that none were held, so the team knows the check ran.
Example output
What does this prompt do?
- Checks your latest Loop returns twice a day and looks across the whole batch, not just one return at a time.
- Spots the patterns that usually mean trouble: one shopper filing return after return, repeat high value returns, or the same items going back again and again.
- Puts a hold on a suspicious return so it is not processed automatically, and attaches a written explanation to that return in Loop.
- Posts each case to Slack in plain language so your team can confirm it or clear it in seconds.
What do I need to use this?
- A Loop Returns account and a Loop API key that can read and manage returns and view customers
- A Slack workspace and a channel where your team reviews flagged cases
- Someone on the team who can open Loop and release a held return once they have checked it
How can I customize it?
- Change when it runs. Twice a day suits most brands, but high volume stores often move to every few hours.
- Tune how cautious it is by raising or lowering the number of returns, the order value, or the repeat item count that puts a shopper on the shortlist.
- Point it at a different Slack channel, or have it tag a specific reviewer when the value of the return is high.
FAQs
Will this refuse returns or refund money on its own?
What happens to a return once it is flagged?
What if it flags a perfectly good customer?
Does it block shoppers or add them to a banned list?
Do we need a special Loop or Shopify plan for this?
Related templates
When someone leaves, we check which shared passwords they used in their final months and post a ranked rotation list to your security channel.
Every Monday, check every S3 bucket for public exposure, missing encryption and weak backup settings, then get the risks ranked in Slack.
Twice every weekday, the conversations from your social inbox land on the right HubSpot contact timelines, with a Slack recap for sales.
Every morning, find the addresses that hard bounced or filed a spam complaint, update the matching HubSpot contacts, and post a short Slack recap.
Every weekday at 4pm, spot the threads that went quiet, stage a ready-to-send nudge in your mailbox, and get a ranked Slack recap.
When you merge a fix in GitHub, this agent checks the matching dead-letter queue, replays the failed messages, and reports back on the pull request and in Slack.
Stop processing return abuse on autopilot.
Set up a twice daily check that holds only the returns worth a second look, and tells your team exactly why in plain language.