What Happens When You Approve and Create a Return
Updated Sep 30, 2026
When you approve a pending return request, Exchange It creates the return in Shopify, processes any exchange items tied to it, and can notify the customer that their request was approved.
When it happens
This runs when you approve a return request in Exchange It. Approving a request that includes exchange items also processes those items and, when customer notifications are enabled, sends the approval email as part of the same action.
What Exchange It does
Exchange It opens a Shopify API client for your store and runs the returnCreate mutation to create the return, passing whether a new exchange is being created alongside it.
If the return is created successfully, Exchange It then:
- Fetches the return's line item IDs with getReturnLineItemsId.
- For exchanges, fetches the exchange line items with getExchangeLineItems and filters to those with a processable quantity greater than zero.
- If there are processable exchange items, runs the returnProcess mutation to process them.
- After a successful process (no user errors), fetches the order's fulfillment orders with getFulfillments and runs holdFulfillment on any fulfillment order that is not already on hold.
When the approval carries return shipping details (for example a label), Exchange It uses appendOrderNote to add the carrier, service, tracking number, tracking URL, and label URL to the order.
When customer notifications are enabled for the approval, Exchange It sends the approval email using the heading configured in your returns dashboard settings.
What gets recorded
On success, Exchange It writes to the return log:
- createReturn — the payload sent to returnCreate and the response returned.
- returnApprovedAt — the timestamp the return was approved.
- exchangeDetails — the exchange items, when a new exchange is created.
- exchangeMethod — either
original_orderornew_order, depending on whether the exchange is created on the original order. - returnProcess — the processed exchange line items (payload) and the process response.
- approvalEmail — the payload and response for the approval notification.
If it fails
If the returnCreate mutation returns user errors or no return ID, Exchange It records the createReturn attempt on the return log and stops with an error rather than continuing to process the return.
The returnProcess step is wrapped so that a failure is caught and logged; if processing returns user errors, Exchange It skips holding the fulfillment orders for that return.