Skip to main content
Manual ticket triage is expensive — someone reads every incoming request, decides who handles it, and forwards it. That person becomes a bottleneck, and response times suffer. This recipe uses AI classification to route tickets automatically the moment they arrive.
Before you start: you’ll need a support inbox connected (a form submission endpoint or an inbound email handler) and a team with defined roles.

The Flow at a Glance

Classify

AI reads the ticket and picks a category

Route

Assign to the right person or channel

Acknowledge

Confirm receipt with the customer

Step 1: Create the Workflow

1

Open Workflows

In your project, go to Workflows > New Workflow. Name it Support Ticket Routing.
2

Add a Webhook trigger

Click Add Trigger > Webhook. Wire this URL to your support form submission handler or inbound email parser. The trigger payload should include at minimum email, subject, and body.

Step 2: AI Classification

Add an AI Prompt action:
Store the result in a variable named category.
Keep the prompt short and constrained. “Return just the category name, lowercase” is load-bearing — without it, the model often returns full sentences that break downstream conditions.

Step 3: Route by Category

Add a Condition block with branches for each category:
1

Billing branch

  • Assign ticket to billing@yourco.com
  • Send Slack message to #billing-support
  • Set priority based on amount mentioned
2

Technical branch

  • Assign to tech lead
  • Slack to #dev-support
  • Include any error messages or stack traces from the body
3

Sales branch

  • Assign to the next sales rep in rotation
  • Slack to #sales
  • Tag with company size / deal potential if detected
4

General branch

  • Round-robin among the support team
  • Slack to #general-support

Step 4: Create a CRM Task or Ticket

Use an HTTP Request action to create the ticket in your support tool — Linear, Zendesk, HelpScout, Intercom, or just an internal tickets table. Include:
  • Customer email and name
  • Category (from AI step)
  • Priority (if detected)
  • Original subject and body
  • Ticket ID that customer can reference

Step 5: Acknowledge the Customer

Send an auto-reply so the customer knows their ticket was received. Customize per category:
  • Billing: “We’ve received your billing question. A specialist will respond within 4 business hours.”
  • Technical: “Your technical request (#{{ticket.id}}) is assigned to our engineering team. Expected response: 24 hours.”
  • Sales: “A sales rep will reach out within the day. Meanwhile, here’s a case study that might help.”
  • General: “Thanks for reaching out. We’ll get back to you within 1 business day.”
Never auto-reply without a human-sounding tone. Generic “Your request has been received” emails erode trust. Match the category’s voice.

Priority Detection

Extend the AI step to also return urgency:
Urgent tickets get paged to on-call via SMS (Twilio). Normal goes to standard channels. Low gets filed for weekly review.

Language Detection

For international teams, detect language and route accordingly:
Route non-English tickets to the matching language queue, or use the language to pick which translation template to use for the acknowledgement.

Auto-Resolve Simple Tickets

Some tickets don’t need a human. Common examples:
  • Password reset requests → reply with self-serve link
  • “How do I change my email?” → link to settings page
  • Refund status inquiries → query your DB and respond with the refund state
Add a condition after classification: if category is general AND body matches known patterns, send the canned response and close the ticket without assigning.
Start with one auto-resolve pattern, watch it for a week, then add more. Premature auto-resolution gives customers the wrong answer and turns them into angry humans asking again.

SLA Tracking

Based on category and priority, set SLAs and monitor them: Add a scheduled workflow that runs every hour, checks for tickets older than their SLA without a response, and pings the assignee or their manager.
Monitor AI classification accuracy weekly. If wrong categories creep in, improve the prompt with examples from misrouted tickets — few-shot prompting dramatically improves consistency.

Verify It Worked

1

Submit a test ticket

Use your support form or send an email to the support inbox with content like: “My credit card was charged twice this month, can you help?”
2

Confirm classification

Check the workflow run log. AI should classify it as billing.
3

Confirm routing

See the Slack message in #billing-support. Confirm the billing team member is assigned.
4

Confirm acknowledgement

Check the customer’s inbox for the auto-reply. Confirm the tone matches billing context.

Troubleshooting

Improve the prompt with few-shot examples from tickets that got routed wrong:
Pull 5-10 real misrouted tickets each week and add them to the prompt.
The category list is too narrow. Add subcategories — “billing_refund”, “billing_invoice”, “technical_auth”, “technical_performance” — so AI has more precise buckets. More categories means less “general” fallback.
Customize messaging per category instead of using one generic template. Write each reply in a voice that matches the context — billing is calm and precise, sales is warm and quick, technical is competent and specific.
Integrate with your time-off calendar. Before assigning, filter the on-rotation list by is_out_of_office = false. Or use availability-aware round-robin that respects explicit OOO status in Slack or your HR system.
Check the priority detection — the JSON parsing step may be dropping malformed AI output. Add a validator that defaults to normal if the AI returns unexpected content, and log unparsed output so you can tune the prompt.

What’s Next?

Webhook Patterns

Handle inbound form and email webhooks reliably

Connect Slack

Pipe alerts and ticket notifications into Slack