Customer Support Classification Automation
Classify, prioritise and route inbound tickets with drafted replies and clean escalation.
- Workflow orchestration
- OpenAI API
- Helpdesk API
- PostgreSQL
Overview
An assistive triage layer: the system sorts and drafts, a human still owns the send. Confidence is treated as a first-class routing input.
The problem
Support requests arrive unsorted. Urgent issues sit behind routine questions, routing depends on who reads first, and repeated questions get rewritten from scratch every time.
Existing process
- 01All tickets land in one queue, ordered by arrival time.
- 02An agent reads each one to work out topic and urgency.
- 03Routing is manual and inconsistent across shifts.
- 04Common answers are rewritten instead of reused.
Proposed system
- Normalise tickets from email and helpdesk into one schema.
- Classify topic, urgency and sentiment in a single structured call.
- Priority is computed from urgency, customer tier and SLA remaining — not from the model alone.
- Retrieve related past resolutions to ground a suggested reply.
- Route to a queue; low-confidence or high-risk tickets go to a senior review lane.
The system, node by node
- 01
Ticket intake
Email + helpdesk normalised into one record
- 02
Preprocess
Strip signatures and quoted history, detect language
- 03
Classification
Topic, urgency, sentiment as structured output
- 04
Prioritisation
Urgency × tier × SLA remaining → priority band
- 05
Routing
Queue assignment with a senior review lane
- 06
Suggested reply
Grounded draft attached, never auto-sent
- 07
Escalation
Churn-risk language or repeat contact flags a lead
- Ticket intake
- Preprocess
- Classification
- Prioritisation
- Routing
- Suggested reply
- Escalation
Business logic
- Never auto-send
- Drafts are attached to the ticket; an agent approves every outbound reply.
- Priority formula
- Model urgency is one input; contract tier and SLA remaining can override it.
- Repeat contact
- Third message on one issue escalates regardless of classified topic.
- Confidence < 0.7
- Sent to the senior lane with the classification shown as a suggestion only.
- Billing and security topics
- Always human-reviewed, no draft reuse.
Failure handling
- Unknown or mixed topic
- Labelled 'needs review' instead of forced into the nearest class.
- Model or API outage
- Falls back to keyword rules; tickets still route, flagged as degraded.
- Duplicate thread
- Merged on message-id and thread reference before classification runs.
- PII in ticket body
- Redaction pass before anything leaves the system boundary.
Demonstration
Simulation notice
This project is a portfolio simulation using a synthetic ticket set written to include edge cases — mixed-topic messages, angry repeat contacts, and malformed forwards. Accuracy figures are from that synthetic set and are not client results.
Design decisions
Confidence is a routing signal
The most useful output was not the label, it was how sure the model was. That number decides whether a human sees it first.
Keep the human on the send
Drafting saves most of the time; auto-sending adds most of the risk. The split was easy once framed that way.
Business rules outrank the model
Contract tier and SLA are facts. The model contributes an opinion, and facts win when they disagree.
Want a process mapped like this?
Contact Me