Journal

Journal

Agent That Clears a Weekend Queue

October 15, 20266 min read
Returns Agent

How We Built a Returns Agent That Clears a Weekend Queue and Knows When to Stop

By ThWorks Marketing Team

Most "AI for returns" tools are a chatbot bolted onto a helpdesk. They answer the customer. They don't do the work.

The work is the problem. Every return request is a small investigation across five systems, and on a Monday morning there are forty of them waiting. We built Slipdesk, a returns agent that runs that investigation end to end, decides inside the brand's rules, and stops at exactly the calls a person should make.

Here is how it is put together, and why each piece is there.

1. The goal is a queue, not a conversation

The decision. Slipdesk has no chat box. It is given one goal: clear the returns queue. The ops lead presses one button, "Clear the queue", and the agent works through every request in order.

Why it matters. A returns lead doesn't want to talk to software. They want the pile gone, with the risky ones set aside. A conversational interface puts the human back in the loop for every request, which is the work we are trying to remove.

What we did. Each request becomes a "slip" on a desk. As the agent works, every check it runs is written onto the slip in plain words: the order it found, the policy for that category, the day count since delivery, the courier record, the customer's past returns, stock, and what it saw in the photo. When the slip is done it gets a stamp: cleared, or held for a person.

Principle: if a person can't see why it decided, it shouldn't decide.

2. The agent chooses its checks, within a hard limit

The decision. The agent is not a fixed script. For each request it decides which tools to call, from a fixed set of twelve: find orders by email, get order, get policy, check return window, get courier status, get return history, check stock, look at photo, submit decision, schedule pickup, issue refund, create exchange.

Why it matters. Requests are messy. One customer gives an order number, another only an email address. One complains about size, another says the parcel never arrived. A fixed script either over-checks every request or misses the one check that mattered.

What we did. The agent plans its own path, with a step limit of 12 tool calls per request. If it hits the limit, the request is escalated with "Ran out of steps" instead of guessing. When a customer gives no order number, it looks the customer up by email. If that email has two possible orders, it asks which one rather than picking.

3. The model proposes. Code decides.

The decision. The language model reads, looks and proposes. It never has the final word on policy, and it never produces a number.

Why it matters. Return policies are exact: 15 days for apparel, 7 for home and beauty, 48 hours to report transit damage, a pickup fee only for change-of-mind or fit, no refunds on final-sale items. A model that is right 95% of the time on these is wrong on two requests out of every forty, and those two cost money.

What we did. Every rule lives in code and reads its values from the brand's policy file. After the agent proposes a decision, the rule check runs. If the two disagree, the rules win, and the slip says "Rule check changed this" with the reason. No tool accepts an amount, a date or a count from the model. Refund amounts, pickup fees and day counts are calculated, then filled into the reply draft.

Principle: let the model handle language and images. Keep money and policy in code.

4. The photo is evidence, not the verdict

The decision. The agent looks at the customer's photo with a vision model and compares it with the order line. It reports only what it can see.

Why it matters. Photos are where returns fraud lives, and also where honest customers prove their case. Treating the photo as the answer fails both ways.

What we did. In our test batch, one customer ordered an olive kurta and sent a photo of a mustard one. Olive in her size was in stock, so Slipdesk approved the exchange, booked the pickup and created the exchange order with no human involved.

A second customer sent the same mustard photo and made the same "wrong colour" claim. This time the order really was mustard. The photo matched the order, the claim didn't hold, and Slipdesk escalated it to a person.

Same picture, opposite answers, because the agent checks the photo against the order and not on its own.

5. Risky calls wait for a person

The decision. Slipdesk clears the safe calls and holds the rest. Rejections, escalations, any refund or exchange over ₹2,000 paid, and customers with 3 or more returns in 90 days all go to a person.

Why it matters. Automation that rejects customers on its own damages the brand. Automation that waves through high-value refunds loses money. The value of the agent is in clearing the volume, not in removing judgment.

What we did. In the test batch, a customer returned a dress claiming a defect. The photo showed stain marks and removed tags, and her history showed 4 returns in 90 days. Slipdesk proposed a rejection and held it. A ceramic planter set arrived broken. The courier record showed a dented carton at the hub and the photo confirmed the break, but the refund was ₹2,650, over the limit, so it was held for sign-off.

At the end of the run, a handover sheet lists every request with its stamp and puts the held calls on top. The ops lead keeps or changes each one and signs off the batch in one action. Only then do the held refunds, pickups and rejection replies run.

6. Messy messages are normal input

The decision. Customers don't write in tidy forms. Slipdesk reads messages as they arrive, including Hinglish and Tamil-English, and turns them into structured facts: the reason, whether they want a refund or an exchange, the size they want, whether the product is unopened, and whether they mention a health reaction.

What we did. A health reaction is never auto-handled. A customer who mentioned a skin reaction to a face serum was escalated to a person straight away, whatever the policy said about opened beauty products.

7. The result on a full weekend batch

We ran Slipdesk on a 40-request weekend batch built to cover the cases that trip up real returns teams: missing order numbers, late damage claims, final-sale items, non-returnable earrings, out-of-stock exchanges, a "not received" claim against an OTP-verified delivery, and repeat returners.

  • 40 requests worked
  • 23 cleared by the agent: 11 refunds, 7 exchanges, and 5 replies asking the customer for a photo or order number
  • 17 held for a person: 8 proposed rejections, 3 escalations, and 6 refunds or exchanges over the limit or from repeat returners
  • Every amount and day count calculated in code and checked against an independently computed answer key
  • Time to clear all 40: [X minutes, from the real run]
  • Cost of one full run: [₹X, from the real run]

Every decision comes with a full log: each check, what went in, what came back, and how long it took.

What this means for a returns team

The agent doesn't replace the returns team. It replaces the part of their day spent opening the same five screens for every request. They walk in to a sheet of seventeen decisions instead of forty investigations.

How much of your team's Monday is spent finding out what happened, rather than deciding what to do about it?

Talk to us at thworks.org. We build agents like Slipdesk on your own policy, store platform, courier and helpdesk.


Next step

Tell us what is breaking, and what it costs you.

A scoping call is 30 minutes and gets you a fixed estimate. If we are the wrong people for it, we will say so.

See the work
  • Reply within one business day
  • Fixed price, fixed scope
  • You own the code