- Ticket triage is any recurring job of reading a request, deciding what kind it is, and sending it somewhere: the classic support inbox loop.
- This is the rare loop where the honest build actually needs AI at runtime. Deciding what a ticket is about takes language understanding, not a threshold check.
- The first build is a prompt: paste in a ticket and get back a category, a priority, and a suggested queue in seconds.
- The second build is a short script that classifies every new ticket automatically and writes the tag, priority, and routing straight back to your ticketing tool.
- The same shape works for any inbound stream of free text that needs sorting before someone can act on it, so once you can automate your support team's ticket triage, you can point it at the next queue too.
Welcome to The Loop. Every Wednesday we take one real, repetitive workflow that someone does by hand and unwind it into something you can run. This week's loop lives at the top of nearly every support queue in the world: the moment a ticket arrives and someone has to decide what it is before anyone can fix it.
Here's the reframe. Reading a ticket and deciding its category feels like judgment, and it is, the first hundred times. By ticket one thousand, it's pattern matching you could do half asleep, because the categories never change and the signals that separate "billing question" from "bug report" are the same signals every time. That consistency is a specification hiding in plain sight. If you want a head start on writing loops like this down before you automate them, our guide on how to write a workflow spec covers the habit. Once you can describe the pattern, a machine can apply it as fast as tickets arrive.
This week's loop is the one nearly every support team lives inside without naming it: reading, tagging, prioritizing, and routing every ticket that lands in the queue. Let's watch it happen, count what it costs, and turn it into a build by the end of the page.
The Loop, in Full
Before you can automate anything, you have to see the loop clearly, so here it is, start to finish. Picture a Tuesday morning at a fifteen-person software company with one shared support inbox.
Maria, the support lead, opens the queue and finds eighteen new tickets since yesterday afternoon. Some are billing questions. A couple are bug reports with screenshots attached. One is an enterprise customer asking, politely but urgently, why their integration stopped syncing overnight. None of them are pre-sorted. Maria reads each one, decides what kind of issue it is, sets a priority based on how bad it sounds and who's asking, and assigns it to herself, a teammate, or the engineering queue. Then she moves to the next ticket. This takes the first ninety minutes of her day, every day, before she does anything that actually resolves a customer's problem.
Written out as steps, the by-hand version looks like this:
- Open the queue and read each new ticket, subject and body.
- Decide the category: billing, bug, onboarding, feature request, or other.
- Set the priority based on urgency language and the customer's account tier.
- Assign the ticket to the right person or team queue.
- Move to the next ticket and repeat until the queue is clear.
Nothing here requires deep expertise. It requires reading comprehension and consistency applied over and over, which is exactly the kind of work a machine does without losing focus on ticket seventeen.
The Manual Tax
The real cost of a triage loop is never just the ninety minutes on the clock. It's the ninety minutes, plus the tickets that land in the wrong queue anyway, plus the days those misrouted tickets sit waiting for someone to notice. Add those up and you get the manual tax.
Start with the accuracy, because it's worse than most support leads assume. In research compiled by Unthread, manual ticket categorization runs just 60 to 70% accurate on the first pass, and every ticket that lands in the wrong queue costs at least $22 in extra handling before anyone even starts solving the customer's actual problem.
Then add the two costs that hide behind the accuracy number:
- Errors. Two agents read the same kind of ticket differently: one tags it "Bug," the other tags it "Other." Multiply that inconsistency across a team and your reporting dashboard stops telling you anything real about what customers actually struggle with.
- Latency. A misrouted ticket doesn't get worked on. It sits in the wrong queue until someone happens to notice and reroutes it, and every hour it sits is an hour the customer is waiting on a reply that was never coming from that queue.
A support queue where tags depend on who happened to read the ticket isn't a system. It's a coin flip with extra steps.
So the goal isn't to save Maria ninety minutes. The goal is to stop paying the tax: every ticket read, categorized, and routed the same way every time, whether it's ticket one or ticket four hundred.
Unwinding the Loop
Automating starts with description, not code. You describe the loop precisely enough that a machine could follow it without you in the room, and most of the hard part is done before a line of anything gets written. This is the part BYOBot does through conversation, and it's the difference between a triage system that keeps working when a weird ticket shows up and one that quietly mis-tags it and moves on.
Here's the same loop, captured as a spec. Notice that the interesting parts are the categories and thresholds, not the reading itself:
| Part of the loop | What it is for this workflow |
|---|---|
| Trigger | A new ticket arrives in the support inbox. |
| Input | The ticket's subject, body text, and the customer's account tier. |
| Decision: category | Which of a fixed set of categories the ticket belongs to: billing, bug, onboarding, feature request, other. |
| Decision: priority | Urgent, high, normal, or low, based on urgency language and account tier together. |
| Output | A tagged, prioritized ticket assigned to the right person or queue. |
| Success signal | First-assignment accuracy holds steady, and nothing needs a manual re-route. |
That table is the whole automation. Everything after this is choosing how hands-off you want it to be. If you want to see this same conversation happen live, that's exactly how BYOBot turns a task into a spec, one question at a time.
Describe your own version of this loop and BYOBot will turn it into a spec, then a build you can run.
The Build: One Loop, Three Ways to Run It
The same described loop becomes three different builds depending on how hands-off you want it. Start at the top. For a quiet queue, the prompt alone might be all you ever need.
The Prompt
The prompt build is straightforward prompt engineering: paste one ticket's subject, body, and account tier into any AI chat tool, and it hands back a category, a priority, and a suggested queue. You still apply the tag yourself, but the reading and deciding, the part that eats the ninety minutes, happens in seconds per ticket.
You are triaging an inbound support ticket. I will paste the ticket subject, body, and the customer's account tier. Assign: - Category: exactly one of Billing, Bug, Onboarding, Feature Request, Other. - Priority: Urgent, High, Normal, or Low, based on urgency language and account tier together. - Suggested queue: which team should own this. - Never invent details that aren't in the ticket text. Return: 1. Category 2. Priority 3. Suggested queue 4. One-line summary for whoever picks it up Here is the ticket: [paste subject and body] [paste account tier]
That prompt works the same in ChatGPT, Claude, or Gemini, because the prompt is never locked to one vendor. For a low-volume queue this might be the whole answer. Once tickets arrive faster than one person can paste them, you move down a tier, the same way you'd automate your Zendesk workflows once the manual version stops keeping up.
The Script
The script is where this loop looks different from most others in this series, and it's worth saying plainly: the honest build here actually calls an AI model at runtime. Deciding what a ticket is about is language understanding, not a threshold check, so unlike a loop that's really just arithmetic in disguise, this one keeps the model in the loop even once it's automated.
The script reads new tickets through the Zendesk Tickets API, sends each one to whichever AI provider's chat completion API you already use, and writes the result straight back with the same API. Anything urgent also gets flagged immediately. The shape of it is small enough to read in one sitting:
// pseudo-shape of the script BYOBot generates for you
const tickets = await zendesk.getNewTickets(lastRunAt);
for (const ticket of tickets) {
const result = await ai.classify({ // one call to your AI provider
subject: ticket.subject,
body: ticket.body,
accountTier: ticket.requester.tier,
});
await zendesk.updateTicket(ticket.id, {
tags: [result.category],
priority: result.priority,
group_id: QUEUE_MAP[result.queue],
});
if (result.priority === 'Urgent') {
await slack.postMessage(SUPPORT_CHANNEL, `Urgent: ${ticket.subject} (#${ticket.id})`);
}
}
You don't write this from a blank page. BYOBot generates the full version, including the file to create, the commands to run, and the exact credentials to paste in. Your job is to fill in the keys and run it once against real tickets to confirm the tags land where you expect, then let it post the urgent alert straight to Slack so nothing time-sensitive waits for someone to refresh the queue.
The Schedule
The schedule here is barely a leap, because tickets don't arrive on a clock, they arrive whenever a customer hits send. Instead of polling on a timer, wire the script to fire on your ticketing tool's own ticket-created trigger, and every new ticket gets classified within seconds of arriving. If you'd rather poll than wire a webhook, a scheduled GitHub Actions workflow running every few minutes gets you most of the way there for free.
Here's how the three builds stack up, so you can pick your stopping point:
| Build | What runs it | Setup | Runs unattended? |
|---|---|---|---|
| The prompt | You, pasting into any AI chat tool | Minutes | No |
| The script | A short script you run when you want | An hour, once | On demand |
| The schedule | The same script, triggered on arrival | A few extra minutes | Yes |
Steal This Build
Here's the whole loop as a spec you can hand to BYOBot or build yourself this afternoon. Copy it, swap in your own categories and tools, and you have your own version.
- Trigger: a new ticket arrives in the queue.
- Read: the subject, body, and account tier.
- Classify: category, priority, and destination queue from a single AI call.
- Write: apply the tag, priority, and routing back to the ticketing tool.
- Alert: flag anything urgent to the right channel immediately.
This week's loop ran on Zendesk, but the shape is universal. Any inbound stream of free text that has to be read and sorted before someone can act on it fits this exact mold, and support tickets are just the most obvious case: sales inquiries, contact-form submissions, and internal IT requests all run the same read-classify-write pattern, which is exactly the kind of connected setup our guide to automating the support stack walks through end to end. Learn it once and you'll start spotting inboxes that need the same treatment.
Tell BYOBot about a loop in your week
Describe the task you keep doing by hand and BYOBot will design the full playbook: the prompt, the script, and the schedule that runs it for you.
Frequently Asked Questions
-
If every ticket that comes in gets read, sorted into one of a known handful of categories, and sent to a known handful of destinations, it's a loop. The categories and destinations are the giveaway: they already exist in your head or your ticketing tool's settings, which means the decision has already been made in general, you're just re-making it one ticket at a time. If every ticket needs a genuinely novel judgment call, it's not a loop yet, it's still specialist work.
-
No. BYOBot writes the full script for you, including the file to create, the commands to run, and the exact credentials to paste in. Your job is to fill in the blanks and run it once against real tickets to confirm it behaves. That's the whole point of a solid customer support workflow automation: you describe the loop in plain language and walk away with the implementation, not a blank editor.
-
It's riskier to let it run unchecked than to use it at all, so build in a seatbelt. Log every classification decision, review a sample each week, and route anything the model flags as low-confidence to a human queue instead of guessing. Most teams find the AI's first-pass accuracy beats a rushed human doing the same job at ticket forty of the day, but the review habit is what keeps that true over time.
-
The spec doesn't change, only the API calls do. Freshdesk, Intercom, Help Scout, and a shared inbox all expose the same basic shape: a way to list new tickets, a way to write tags and priority back, and a way to assign an owner or queue. Point the same script at whichever ticketing tool's API you actually use, and the read-classify-write-alert loop from this article works the same way, the same reasoning applies to any support-stack automation built around a different core tool.
