Classify and route support tickets without reading them one by one
Every incoming query gets tagged by topic, urgency and intent, and routed to the right team before a human opens it.
- Level
- Low code
- Requires a simple automation or an API call.
- Time
- Half a day for the first version
- Published
What it costs
To test, the free plan of claude.ai is enough. In production it runs through the API and you pay per query processed: with a fast model, classifying one ticket costs a fraction of a US cent. The automation can be free if you use self-hosted n8n.
guided mode // I ask, you answer
ready to start
Do it with me, step by step
I will ask you 3 questions about your business, use your answers to get the prompt ready to copy, and then walk you through the 5 steps, one at a time. Like a Thermomix: you just answer and move on.
Who it is for
Support, sales or after-sales teams that receive more than 30 queries a day by email, web form or WhatsApp and distribute them by hand.
The problem
Someone on the team spends the first hour of the day reading everything that came in, deciding what is urgent, what is a complaint and what is a sale, and forwarding it. That work creates no value, the criteria change depending on who is on shift, and urgent queries wait just as long as trivial ones.
What changes
Every message arrives already tagged with a category, an urgency level and a one-line summary. The team opens what matters first and nobody classifies by hand again. The criteria are written down in the prompt, so they are the same every day.
Ingredients
- An inbound channel with programmatic access: email, web form, or the WhatsApp Business API
- API access to a model (Claude or similar)
- An automation tool (n8n, Make, Zapier) or a 40-line script
- A closed list of the real categories in your business, defined before you start
Step by step
- 1
Define the categories with your team, not with the AI
Pull the 6 to 10 categories that actually exist from your last 100 tickets (for example: quote, complaint, warranty, order status, technical question, other). If a category shows up fewer than 3 times, drop it. A closed list is what makes the classification consistent.
- 2
Write the prompt with the list and real examples
Use the prompt below. Replace the categories with yours and paste 2 real, anonymized examples of each. The examples carry more weight than any instruction.
- 3
Ask for the answer in a fixed format
The model must always return the same three lines: category, urgency (high/medium/low) and a one-sentence summary. A fixed format is what lets the automation read it without breaking.
- 4
Test with 50 old tickets before connecting anything
Run 50 old queries whose classification you already know and compare. If it gets fewer than 90% right, the problem is almost always overlapping categories: merge them or define the boundary better.
- 5
Connect and route, but leave the reply to a human
The automation tags and assigns. Do not let it reply to the customer in this first version: build confidence in the classification first, which is where the time savings are.
The prompt
Replace what is in brackets with your company details, or use the guided mode above: it asks you and fills it in for you.
You are the query classification assistant for [COMPANY NAME], a Chilean [INDUSTRY] company. Your only task is to read a customer query and classify it. You do not reply to the customer. Possible categories (use exactly one): - quote: asks for the price or availability of a product or service - complaint: expresses annoyance about something that went wrong - warranty: product with a fault within the warranty period - order_status: asks where something they already bought is - technical_question: doubt about how to use or install something - other: does not fit any of the above Urgency: - high: the customer cannot operate, there is money at risk, or they mention a deadline of today - medium: needs an answer today or tomorrow - low: informational query with no rush Examples: [PASTE HERE 2 REAL ANONYMIZED QUERIES PER CATEGORY, WITH THEIR CORRECT CLASSIFICATION] Reply ONLY with these three lines, no explanation: category: <one from the list> urgency: <high|medium|low> summary: <one sentence of at most 15 words with what the customer needs> Query to classify: [QUERY TEXT]
What usually goes wrong
- ✕Overlapping categories ("query" and "general question"): the model will hesitate just like a person would. Define them by what the team does next, not by how the message sounds.
- ✕Letting the model invent new categories. Enforce the closed list and make "other" a valid output.
- ✕Connecting the automatic reply to the customer on day one. Classify first, measure, and only then consider replying.
When not to use this recipe
If you receive fewer than 20 queries a day, classifying them by hand takes 10 minutes and does not justify setting anything up. And if your categories change every week, stabilize them first: the prompt needs a fixed list to be consistent.
Source and real case
Customer service
This is the pattern Anthropic documents as one of the most common and lowest-risk deployments: the classification does not talk to the customer, so a mistake costs little and is fixed quickly.
Official use-case guide:Ticket routing — Claude Platform Docs · Anthropic
Last verified:Checked against Anthropic's official guide. The prompt follows its recommended structure: a closed list of categories and a fixed output format.
Share it
If someone on your team could use this recipe, send it in one click. The suggested text copies itself.
Want to apply it in your business? Message Cristián directly.
Telegram