# 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.

- Workflow type: app
- Services: Loop Returns, Gorgias
- Categories: Customer Support, Operations
- Published: 2026-08-31

## What it does

- 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 you'll need

- 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.

## Prompt

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.

## How to customize

- 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.

## FAQ

### What can a rep type into the search box?

An order name like #1234, the order number from your store, or the return number from Loop. The app works out which kind of identifier it is and looks up the matching return, so reps do not have to pick a search type first.

### What is the difference between cancelling and closing a return?

They sound similar but behave very differently, so the app spells it out before you confirm. Cancelling frees the items, which means the customer can start a new return with the same products. Closing does not fulfil outcomes like exchanges or gift cards, and the items cannot be used in a new return.

### Does processing a return send the refund immediately?

Processing hands the return off to Loop, which archives it and fulfils anything still outstanding such as exchange orders or gift cards. That happens in the background, so the app tells you the return is queued rather than pretending the money has landed, then refreshes the status once Loop catches up.

### Why is there no tracking on some returns?

Return tracking is only available for Happy Returns shipments, and it needs shipment read access on your Loop key. When a return has no shipment or the access is not enabled, the app shows a short note in that section instead of an error.

### Does the drafted reply get sent to the customer automatically?

No. The draft lands in a reply box on the screen for the rep to read and edit. Nothing reaches the customer until the rep sends it, and it goes out on the existing ticket so the conversation stays in one thread.

### Can reps see each other's recently viewed returns?

No. The recently viewed sidebar is kept per rep, so each person sees only the returns they opened and can pick up where they left off.

Use this prompt in General Input: https://www.generalinput.com/prompts/one-screen-returns-desk-for-loop-and-gorgias-support-reps