Support email triage

Sorts each customer email by topic and urgency, looks up the order, and drafts a reply for a person to check.

What it does

An online homeware shop gets a steady stream of customer emails: late parcels, refunds, broken items, questions. This Python script reads each new email and asks Claude to sort it into one of five topics with an urgency from 1 to 3. Anything that sounds like a safety problem is always treated as most urgent.

The script then finds the order number, looks up the order, and asks Claude to draft a reply that follows the shop's policy and tone. Urgent emails and high-value orders are flagged for a manager. A person on the support team reviews each draft before it goes out.

Built with: Python (standard library only), the Anthropic API, a CSV order table

How it works

How support email triage works A new customer email is sorted by topic and urgency, the order is looked up, Claude drafts a reply following the shop's policy, urgent or high-value emails are flagged for a manager, and a person on the support team reviews each draft before it goes out. New customer email from the shop's inbox email text Sort topic and urgency Claude, first prompt topic, urgency Look up the order plain code, order table order details Draft a reply Claude, second prompt, shop policy draft, manager flag Person: checks the draft support team; manager if flagged Automated A person does this
Blue steps are automated. The dashed orange step is done by a person.

Try it: pick an example

Input

Show the prompt sent to the model

Output

How this demo was made safe

This page was built from a private project. Every name, message and number here is invented. The project's own logic and prompts ran on those invented inputs.

What this demo does not show:

    The full record of what was found, what was kept, faked or removed, and the leak-scan results is in SANITISATION.md.