A shopper selects a fit reason for a jacket and writes that they ordered a medium but received a small. The selected reason points to a sizing problem. The note points to a possible picking error. If the system uses the selection alone, the returns team can miss a fulfillment issue and record it against the product’s fit.
For retail returns reason code classification, assign one primary code to each returned line using the evidence available at intake. Give Operations a fixed list of codes and a written rule for when each applies. Let clear cases pass through a confidence gate. Send conflicts and missing evidence to a person who can resolve them. Keep the shopper’s account available for whoever inspects the return.
Define the code by the work it starts
Start with a product category and the queues that already handle its returns. For each code, decide what a reviewer must see in the note and who should handle the case. Keep a split if it changes an investigation or supports a reporting decision the team actually makes. For example, a reported fit issue goes through standard returns and can inform a size-guide review. A reported wrong variant goes to someone who can compare the order with the fulfillment record and the item received.
This hypothetical code list describes what the customer reported at intake. An inspection can later confirm or revise the finding in a separate field.
| Code | Evidence in the note | Destination |
|---|---|---|
FIT_SMALL |
The customer received the size they ordered and says it fits small | Standard returns |
WRONG_VARIANT |
The customer names a size or color received that differs from the order | Fulfillment review |
ARRIVED_DAMAGED |
The customer describes damage present on arrival | Damage review |
CHANGED_MIND |
The customer says the item is no longer wanted and reports no issue | Standard returns |
OTHER |
A reviewer can identify the reason, but it falls outside the code list | General returns |
Keep review status in its own field. A blank note, a generic request for a refund, and a note with incompatible reasons all need review. An agent can leave a code unassigned if the evidence stays thin. Reserve OTHER for a known reason outside the list, and group those cases so Operations can see when a new code would help.
If a note says the wrong jacket arrived with a torn sleeve, give the reviewer both observations. Operations can define which queue handles that combination first and retain the second observation for the next team. Put the rule in the codebook with an example. Keep eligibility, fees, refunds, and exchange decisions in the existing returns workflow. The reason code gives the receiving team a place to start.
Match the note to the return line
Use the return-line ID as the record key. Keep the original platform selection, note, intake channel, and source revision when available. If a support email covers several items, attach its text to an individual line only when the description identifies the item. A note that says one of two pairs arrived scratched needs clarification before either pair is coded. Limit what the classifier sees to the text and order fields needed to make the distinction.
Shopify’s self-serve instructions show customers choosing a return reason and adding a note. The Admin GraphQL ReturnLineItem documents a standardized reason definition, customerNote, and returnReasonNote. Check which fields your own channels populate before using them as classification inputs. If you ingest Shopify reason definitions, use stable identifiers in the mapping. Shopify documents a stable handle, a localized name, and a deleted flag for reasons that can still appear on older returns. Shopify Admin GraphQL return line fields · Shopify return reason definitions · Shopify self-serve return setup
Keep the inbound selection beside the internal code. Where a platform selection and note agree, a reviewed mapping can handle straightforward cases. A generic selection leaves the note to supply the detail. A conflict between two specific reasons, such as the jacket example, goes to review. Once the return exists, customer questions about its progress use a different set of fields. Answer Shopify return-status questions from live data
Decide which suggestions can route a return
Start with a baseline of direct mappings and explicit phrases. Test a classifier on the same records if the baseline sends too many clear notes to review. Have it propose a code from the active list, point to the words that support it, and decline to choose when the note lacks enough detail. Enforce the allowed code list in the application. Send missing evidence, unresolved item references, and contradictory inputs to review regardless of the model’s score.
Compare score bands on labelled returns before choosing any threshold. A model’s score can help rank suggestions. Use observed error rates on your own notes to decide which scores justify automatic routing. Set acceptance conditions by code and destination. A false WRONG_VARIANT can add work to a specialist queue, while a missed one can keep a fulfillment problem out of that queue. If a code has too few checked cases to justify automatic routing, keep it under review. This approach to testing code boundaries also applies to classifying free-text maintenance logs.
Show reviewers the original text, the matched line, the customer’s selection, and the proposed code with its supporting phrase. Let them accept it, select a different active code, or request clarification. Save the first suggestion and the final review decision. When a note or item association changes, check that a pending decision still applies to the current revision before assigning the return. Reuse the same assignment key on retries. Enforce one work item per key in the receiving system.
Measure which returns reached the wrong queue
Have Returns Operations label a representative batch of recent notes using only intake evidence. Record the expected code and destination, or the reason for review. Check a separate batch of hard cases such as short messages, translated text, contradictory selections, and notes copied across items. Historical agent codes can help find examples, but have reviewers check them against the current codebook. Keep later inspection findings out of the intake labels.
Run the classifier in shadow mode while the existing process handles returns. Use the representative batch to estimate review load, and inspect the hard cases for failure patterns. Once automatic routing starts, sample accepted cases as well as reviewed ones. Reviewer overrides alone miss mistakes that went through untouched.
- Review rate is the share of in-scope return lines held for human review. Track queue age alongside it to see whether people can keep up.
- Code error rate is the share of audited automatically coded lines with the wrong code. Break it down by code and channel. Two wrong codes can send a return to the same destination and still distort reporting.
- Misroute rate is the share of audited automatically routed lines sent to the wrong destination for the evidence available at intake. Compare the destination the routing rule intended with the assignment the receiving system recorded. This helps distinguish a bad classification from a failed handoff.
When a misroute is found, preserve the first assignment and the corrected destination. Log whether the cause was the selected code, item matching, the routing rule, or the handoff. Operations can use those cases to tighten a definition or threshold, while the integration team investigates delivery failures.
Let Operations approve code changes
Give Operations the codebook, the routing table, and the review of OTHER cases. Each code needs a stable ID, a definition, boundary examples, and an effective version. Save that version with each decision and keep retired IDs readable on old records. If a definition changes meaning, issue a new code or version and document how reports compare across the change. Re-run the labelled returns when a code, routing rule, model, or intake form changes. That gives the queue owner evidence for expanding automatic routing or returning a code to manual review.
Sources
- Shopify Help Center, Setting up self-serve returns and cancellations. See Customer experience for reason selection and the note.
- Shopify Admin GraphQL, ReturnLineItem. See
returnReasonDefinition,customerNote, andreturnReasonNote. - Shopify Admin GraphQL, ReturnReasonDefinition. See
handle,name, anddeleted.
Review your returns intake
Bring your current reason codes, redacted return notes, and a few examples of returns that landed in the wrong queue to Insonl’s free AI workflow audit. Insonl charges for any follow-on work you choose to commission.