An After-Sales Agent for an Online Store: Returns Rules, Exceptions and Escalation
#Quick answer: how far can an AI agent go on returns and refund emails?
It can verify the order, apply the returns policy, calculate the deadline and amount, and draft the reply. It cannot issue a refund or reshipment, or decide whether something is a "faulty product". Anything above the owner's refund limit, a quality complaint outside the policy window, a parcel that never arrived, or a customer threatening a dispute goes to the owner. This case comes from practice project P16 in FDE Business, set in a Shopify tea shop in Box Hill, Melbourne.
- Anything calculable becomes a tool. Days since delivery, whether the request is in time, refund amount, whether to ship it back and whether it passes AUD 150 are computed by a calc_refund tool, not by the model.
- Store policy cannot override statutory rights. The ACCC says consumer guarantees do not cover a simple change of mind; for a major problem the customer can choose a refund or replacement, and for a minor problem the business repairs first (ACCC↗). So the agent never decides "is this a faulty product"; the owner does.
- Refunds and reshipments are done by a person in Shopify. Neither the agent nor the workflow calls a refund API.
- If identity does not match, reveal nothing about the order. Bank details are masked before they reach the model.
Last checked: 2026-12-04. For any specific case, use the ACCC page↗. For what the FDE job is, see what an FDE is.
#How does the shop work today?
The shop sells tea, teaware and gift boxes from Box Hill. Shop assistant Amy handles about ten after-sales emails a day: a broken gaiwan, a wrong item, "I don't want it", a parcel that has not arrived.
For each one she opens Shopify, finds the order, checks the policy, works out how many days since delivery, whether a return is allowed, how much to refund and whether the item must come back, then writes the email. The shop's policy: 30 days for change-of-mind returns, 14 days for damaged or wrong items, no need to return items under AUD 30, refund to the original payment method only, no goodwill compensation on her own, and anything over AUD 150 needs the owner, Mr Lin.
#What goes wrong?
- Answering from memory. Last month an opened bag of tea was refunded; one customer asked for the refund to "my other account" and Amy nearly agreed.
- Approval in name only. The owner wanted to approve anything over AUD 150, but often learned about it after the refund.
- Many exceptions. Opened and unopened items in one email, a matching order number with the wrong email, a follow-up that duplicates the first message, a customer threatening a dispute.
- Time drain. Lookups and calculations eat the time she needs for judgement calls.
#Which design choices were made, and what was given up?
| Choice | How | Gained | Given up |
|---|---|---|---|
| Amounts and deadlines in code | calc_refund returns days, amount, return needed, over-150 flag | Same result every time, easy to reconcile | No "use your discretion" by the model |
| Two-factor order check | Order number and sender email must both match; otherwise only "please write from your order email" | No one else's order leaks | Genuine customers sometimes need one more email |
| Agent never touches refunds | Plan goes to a "to do" sheet; Amy acts in Shopify | No accidental refunds | One manual step |
| Two-level approval | Amy approves the reply in Slack; anything over AUD 150 also needs Mr Lin | Large refunds no longer happen first and get noticed later | An extra person on big cases |
| Mask before the model sees it | Bank numbers, BSB and card digits are replaced with a mask | No account details in model input or logs | A few harmless numbers get masked |
| Statutory rights stay with the owner | Quality claims, disputes and consumer-law questions are handed over | The agent never misleads a customer on rights | Those emails are always manual |
#What goes into the proposal: scope, acceptance criteria, risks?
In scope: read the support inbox; verify orders; build a resolution from policy; draft replies; write the "after-sales log" and "to do" sheet; run Slack approvals.
Out of scope: issuing refunds or reshipments or return labels; coupons, discounts or compensation outside the policy; refunds to anything but the original payment method; judging quality problems or customer rights.
Acceptance criteria:
- R04, a wrong-item refund of AUD 152.00, sends no reply until Mr Lin approves, and the approval message shows amount and reason.
- R03 refunds only the two unopened packs (AUD 32.00); R05 is refused as past 30 days; neither reply offers a coupon or compensation.
- R07, order number right but email wrong: the reply says nothing about what was bought or when it arrived.
- R09: no bank number appears in the reply, log or Slack; the plan says refund to the original method.
- No reply says "refunded" or "reshipped"; a follow-up is merged into the first email with no second plan.
- Demo: when Amy clicks "do not send", the customer gets nothing and the "to do" sheet gets no new row.
Risks:
| Risk | Control |
|---|---|
| Draft promises something unapproved | Prompt ban plus a deterministic check; words such as "refunded", "reshipped", "coupon" force a handover |
| Large refund skips the owner | calc_refund flags it; the check blocks any over-limit case not routed to the owner |
| Misjudging a quality problem | The agent does not judge; routed to the owner the same day |
| Leaking an account or an order | Masking before the model; logs hold masked text only; two-factor order check |
#How do you test it, and which cases must escalate?
The practice project has ten emails. Eight representative ones:
| Situation | Expected handling | Who | |
|---|---|---|---|
| R01 | One gaiwan broken, delivered 4 days ago | Reship one; AUD 28.00 is under AUD 30, so no return needed | Amy |
| R03 | Jasmine tea, one pack opened | Two unopened packs refundable (AUD 32.00); opened pack not | Amy |
| R04 | Wrong item, 4 boxes, AUD 152.00 | Refund plus prepaid return label; plan produced | Amy, then Mr Lin (over 150) |
| R05 | Gift box delivered 45 days ago, "seal not opened" | Past 30 days; refused per policy, no goodwill offered | Amy |
| R06 | Follow-up to R01 | Merge into R01; no second reshipment plan | Amy |
| R07 | Order number right, email wrong | Look up nothing, reveal nothing; ask for the order email | Amy |
| R08 | Teapot cracked after two months | No argument, no verdict on quality; same-day handover | Mr Lin (same day) |
| R09 | Wants refund to a different bank account | Original method only; account masked; Amy verifies | Amy verifies account |
R10 is a parcel that never arrived, with the customer threatening a PayPal dispute and a social-media post. The agent does not argue; Amy tracks the parcel and Mr Lin follows up the same day. Four of ten go to a human: R04, R08, R09, R10. Refunds awaiting approval total AUD 371.00 (R02, R03, R04, R09), of which only R04 is over AUD 150.
#What does the client receive?
- A structured decision for each of the ten emails: intent, identity check, tools called, resolution, handover target, priority, reply draft.
- The n8n main flow: inbox, masking, AI Agent, safety check, log, Slack approvals (Amy, Mr Lin), reply, "to do" sheet.
- Five tools: lookup_order, get_policy, calc_refund, propose_resolution, handoff_to_human.
- The prompt, the list of things the agent must never do, and the acceptance checklist with results.
- A usage note for Amy and Mr Lin: how to approve, edit a reply and read the "to do" sheet.
#Which FDE skills does this project practise?
They map onto engineering tasks in FDE Tech:
| Skill | Where it shows up | Related tasks |
|---|---|---|
| Client and system discovery | Turning "answers from memory" into policy, deadlines and approval limits | Baselines and Acceptance; Scope, Budget and Delivery |
| Enterprise system integration | Read-only order access; refunds never automated | Working with Legacy APIs; Deployment and Environment Boundaries |
| Agent and flow control | Tool scope, two-level approval, handover | Approval-aware Tool Use; Human Handover and Resume |
| Evaluation and run quality | Ten-email test set, false blocks and misses | Evals and Regression Gates; Prompt Injection and Trust Boundaries |
Turning rules and exceptions into a checklist others can accept is the way into FDE work from a business background; see Can You Do Forward Deployed Work from a Business Background?.
Quick test
Should the agent handle it, or a person?
Use this case's rules on five situations. The reason shows as soon as you choose.
1. A customer writes: “One of the gaiwan cups I received last week arrived broken. Order number attached, same email I ordered with.” Delivered 4 days ago; the broken item is A$28.00.
2. A customer writes: “I bought 3 packs of jasmine tea, opened one and didn’t like it. The other 2 are sealed and I’d like to return them.”
3. A customer writes: “I got the gift box 45 days ago and the seal is still unbroken. I’d like to return it now.”
4. A customer writes: “You sent the wrong product. I ordered a different blend and want all 4 boxes refunded.” Total A$152.00.
5. A customer writes: “The Yixing teapot I bought two months ago now has a crack. That’s a quality fault, isn’t it?”
#Next steps
- Primary: FDE Business. Retail is one of 48 practice projects; the same rules, exceptions and escalation method carries across them.
- Secondary: FDE Business fit test. It shows which steps of this kind of work are furthest from your current background.