One screen returns desk for Loop and Gorgias support reps

By General Input

Type an order or return number and get status, refund outcome, tracking, notes, and the customer's helpdesk thread on one screen.

Integrations

  • Loop Returns
  • Gorgias

Type

App

Categories

  • Customer Support
  • Operations

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.

Related prompts

Explore more prompts
Receiving dock console for inspecting and restocking Loop returnsLive Loop returns analytics with product-level drill-downRepeat question coverage board for Gorgias support teamsWeekly support quality review board for Gorgias ticketsWhere is my order triage desk for ecommerce support teamsTurn negative Yotpo reviews into ready-to-work Gorgias ticketsAdd Recharge subscription context to new Gorgias ticketsTurn last week's Loop returns into a merchandising fix listScreen Loop Returns for abuse before refunds go outLog daily Loop returns to Sheets and flag big refunds