One screen returns desk for Loop and Gorgias support reps
Type an order or return number and get status, refund outcome, tracking, notes, and the customer's helpdesk thread on one screen.
Build me a one screen returns desk that our customer support reps keep open all day, so they stop bouncing between Loop Returns and Gorgias to answer "where is my refund" questions. A rep types one identifier and the screen shows the return, its outcome, its tracking, its notes, and the customer's helpdesk history, with every action they might take available in place.
At the top is a single search box that accepts an order name (like #1234), a commerce order ID, or a Loop return ID. Detect which kind of identifier was typed and call Loop Returns Get Return Details with the matching query parameter, because that operation takes exactly one of return_id, order_id, or order_name. If the input is ambiguous, try the most likely interpretation and let the rep switch it from the results area rather than making them choose a search type up front. Show a clear empty state when nothing matches.
The main panel shows the return's current status, every line item with its return reason and requested outcome, and the outcome totals broken out as refund, exchange, or store credit. Pull order level context with Get Order so the rep can confirm the customer and the order date. Below that, list every note on the return from Get Return Notes, newest first, with author and timestamp.
Add a shipment section fed by Get Shipment Information, showing carrier, tracking number, and the latest tracking status. That operation only covers Happy Returns shipments and requires the Happy Returns Shipments (Read) scope on the API key, so handle its absence gracefully: when there is no shipment or the call is not authorized, show a short explanation inside the panel instead of an error or an empty box. The rest of the screen must stay fully usable without it.
Beside the return, show the customer's recent helpdesk activity from Gorgias. Use List Tickets filtered to the customer's email to show recent tickets with subject, status, and last updated time, and when the rep selects one, use List Messages to show that conversation thread. Use Loop's List Customers if you need to resolve the customer's email from the return before querying Gorgias.
From the same screen the rep can act on the return, each action behind a confirmation dialog that spells out what will happen: Create Return Note to add a note, Flag Return to hold it for manual review, Cancel Return, Close Return, and Process Return to release the refund. Do not render cancel and close as two similar buttons. Explain the difference in the UI and in the confirmation copy: cancelling a return lets the customer make another return with the same items, while closing it does not fulfil outcomes such as exchanges or gift cards and does not free the items for a new return. Process Return archives the return and fulfils remaining outcomes such as exchange orders and gift cards, and it runs in the background, so the confirmation should report it as queued rather than claiming the refund is complete, and the panel should refetch the return shortly after to pick up the new status.
Add a "Draft the reply" button that starts a background agent. The agent reads the return details, its notes, the shipment status, and the selected Gorgias thread, then writes a customer facing reply that answers where the refund is in plain language and sets an accurate expectation based on the real status and tracking rather than a generic template. Its output lands back in the app as an editable draft in a reply box and is never sent automatically. The rep edits it and sends it with Gorgias Create Message on the existing ticket, or Create Ticket when the customer has no open ticket to reply on. Use Update Ticket if you need to reopen or set the status of the ticket you replied to.
Keep a sidebar of recently viewed returns scoped per rep, so each person sees their own history and can pick up where they left off. Store the return ID, order name, customer name, and the time they opened it, cap the list at around twenty entries with the newest first, and reload that return when an entry is clicked.
Two constraints to build against. App handlers run with the app owner's credentials, so do not build role based permission gates; the confirmation dialogs on the destructive actions are the safety mechanism. Loop allows 300 requests per minute per API key, so fetch the return, its notes, and its shipment together when a return is opened rather than polling, and do not refetch the Gorgias thread on every render.
What does this prompt do?
- Search by order name, order number, or return number and see the return's status, what the customer is getting back (refund, exchange, or store credit), and every line item in one place.
- Read every note on the return and the return shipment's tracking progress beside the customer's recent helpdesk conversations, so you have the whole story before you reply.
- Add a note, flag a return for review, cancel it, close it, or release the refund, each behind a confirmation step that explains exactly what it will do.
- Hit Draft the reply and a background assistant reads the return, the notes, the tracking, and the ticket thread, then writes a customer ready response you can edit and send back on the ticket.
What do I need to use this?
- A Loop Returns account and an API key from your Loop admin, with permission to read and manage returns
- A Gorgias helpdesk account you can create an API key for
- Return tracking only shows for Happy Returns shipments, and your Loop key needs shipment read access turned on for it to appear. The rest of the screen works fine without it.
How can I customize it?
- Choose which actions reps get. Hide cancel or close entirely if only leads should use them, or add your own wording to each confirmation step.
- Set the tone and length of the drafted reply, and paste in your refund policy so drafts quote the right timelines instead of guessing.
- Change how many recent tickets show beside the return and how many entries the recently viewed sidebar keeps.
FAQs
What can a rep type into the search box?
What is the difference between cancelling and closing a return?
Does processing a return send the refund immediately?
Why is there no tracking on some returns?
Does the drafted reply get sent to the customer automatically?
Can reps see each other's recently viewed returns?
Related templates
Work one return at a time at the dock: grade each item, pick a disposition, restock what is resellable, and process or flag it without leaving the screen.
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.
See which questions your agents keep answering by hand, which ones already have a saved answer, and draft the missing ones in a click.
Score closed Gorgias conversations against your own rubric, log every review to a spreadsheet, and see exactly where each agent needs coaching.
Open one board every morning that ranks every in-transit shipment worst first and flags the stuck packages nobody has complained about yet.
Every hour we catch new 1 to 3 star Yotpo reviews, open a Gorgias ticket with the customer's order history and a drafted reply, and rank the batch in Slack.
Stop bouncing between Loop and your helpdesk
Give your support team one screen that answers where is my refund and lets them act on it without a page hop.