An AI Returns Assistant That Knows When to Escalate
The customer says the item arrived damaged. The policy allows ordinary returns, but damage claims need a different review. A fluent reply that applies the wrong policy would create more work than it saves.
How can AI assist returns without approving refunds?
An assistant can classify a return request, retrieve the permitted order details and draft a response grounded in the applicable policy version. A rules service should decide ordinary eligibility from dates and product conditions. Missing evidence, ambiguous intent and policy exceptions go to support staff. Refund authorization remains outside the model. The system records the evidence, draft and reviewer decision so the team can inspect why a response was suggested.
Interactive demo
Read the conversation with the policy beside it
Open the customer message, compare it with the applicable policy and inspect the suggested reply. The damage-claim path stops for missing evidence.
Local interactive demo
Returns review session
Fictional records
I would like to return an unopened item.
Agent review / not a customer send
No draft prepared
Select a ticket and prepare its policy-grounded internal note.
Refund execution is outside the assistant’s permissions.
Agent approval remains separate from deterministic eligibility checks.
A standard return, a damage claim and a request for a policy exception can sound similar in a customer message. They need different evidence and may need different people. The assistant’s job is to prepare that distinction for review.
Before the draft
Retrieve only the right customer context
A ticket event triggers a Lambda handler. FastAPI verifies ticket ownership and customer identity before querying the commerce order source. The order API and durable audit storage are separate integration dependencies.
Outside the model
Keep policy decisions outside the draft
Version the policy and evaluate return windows, final-sale flags and required evidence in code. Claude receives approved excerpts and minimal order fields, then returns a structured classification, evidence references and draft. Treat ticket text as untrusted content, never as tool instructions.
A recommendation needs the right reviewer
Calibrate classification thresholds against labeled historical tickets rather than trusting a model confidence statement. Missing citations, conflicting policies, sensitive complaints and low-confidence classifications all block automatic handling. Initially save every suggestion as an internal note for agent approval.
Eligibility
Versioned policy rules
Response
AI draft, agent approval
Refund
Separate authorized decision
Language fluency is not an eligibility check. The policy version and order facts must be established before the assistant prepares a reply.
Review the reply before celebrating the response time
A faster draft is useful only when it is grounded in the right order and policy. Review quality and escalation routing beside preparation time. These are evaluation criteria, with no measured improvement claimed.
Time to a usable reply
First response preparation time
Time from ticket assignment to approved draft, compared with a matched manual sample.
Policy and factual quality
Draft correction rate
Reviewed drafts requiring factual or policy changes divided by reviewed drafts.
Correct review route
Escalation precision
Specialist-confirmed escalations divided by all escalations in a labeled review sample.
Customer privacy
Unauthorized data exposure
Count failed access-control tests and confirmed cross-customer retrieval incidents; review both before expanding scope.
Technical details
The model drafts inside a permission boundary
Ticket retrieval, eligibility rules and response drafting have different responsibilities. Refund authority stays outside the model’s tool access.
AWS LambdaTicket event
Handle ticket events and scheduled recovery checks.
→verified event
Zendesk APIAssigned ticket
Read assigned tickets and save internal draft notes.
Authorized context and deterministic rules
FastAPICustomer and policy gate
Enforce eligibility rules and tool permissions.
RedisScoped, short-lived cache
Cache short-lived context and coordinate rate limits; not the audit store.
ClaudeClassify intent · draft with citations
Classify intent and draft grounded replies.
Only approved excerpts and minimal order fields enter the model context.
Refund tools: no accessSupport approves replies. Refund authorization follows a separate process.
Simplified implementation architecture. Open a technology to inspect its responsibility.
Customer isolation and review evidence
Apply least-privilege ticket scopes and customer-level authorization in the API. Store policy version, retrieved record IDs, model version, draft, reviewer and decision in durable encrypted audit storage. Cache keys include tenant and customer scope with short expiry. Alert on failed lookups and draft backlog; never put secrets or full payment data in prompts.
Challenge the assistant with the wrong policy and customer
Evaluate false eligibility decisions on an anonymized labeled set. Include policy changes, malicious ticket instructions, wrong-customer references and unavailable order APIs. Deduplicate ticket events by ticket revision; retry transient reads with limits and send persistent failures to support. Roll out internal notes before considering any permitted automated replies.
What the assistant may say and who decides
Can the assistant issue refunds?
The model has no refund tool. An authorized person follows a separate finance or support approval process.
How does it know which return policy applies?
The policy service supplies the approved version applicable to the purchase and product. Conflicting versions stop the workflow for review.
What does low confidence mean?
Routing uses thresholds evaluated on labeled examples plus evidence-completeness checks. A model saying it is confident is not sufficient.
Can customers manipulate the assistant through a ticket?
Ticket content is untrusted. Server-side permissions and allowlisted read tools restrict what the model can access even if malicious instructions appear in the text.
Start with a policy your support lead can explain and a small set of anonymized tickets. We can map what the assistant may retrieve, what it may draft and which decisions remain with your team.