How to train a ticket routing model on past Zendesk or Freshdesk tickets and write it back to the helpdesk
Export resolved tickets labelled by their final group, train a classifier, and call it from a webhook. Neither helpdesk publishes routing accuracy, so you have to measure every option yourself.
You can train a custom ticket routing model on historical Zendesk or Freshdesk tickets in four steps. Export resolved tickets through the helpdesk API and label each one with the group that finally handled it. Train a classifier on that history, then call it from a ticket-created webhook and write its answer back to the group or a custom field. Zendesk intelligent triage and Freddy AI Auto Triage do this inside the helpdesk, but neither vendor publishes routing accuracy, so the choice depends on a holdout test that you run on your own tickets. The providers that can do this work are the helpdesk's own add-on, a marketplace app such as Forethought, Amazon Comprehend, a self-hosted open model or a done-for-you custom model service.
The built-in add-ons already train on your ticket history, but they report no accuracy
Both helpdesks sell a routing model as part of an AI add-on. These add-ons set the baseline that any custom model has to beat.
Zendesk intelligent triage classifies each new ticket by topic, sentiment and language. Its help centre says the classification uses the ticket's subject and the text of the first public comment. Classifications need a Suite or Support Professional plan, and using them in triggers needs the Copilot add-on. Zendesk's pricing page lists Copilot at $50 per agent per month, paid yearly.
Zendesk changed the feature's vocabulary on June 11, 2026. Its announcement says that intents are now called topics and that "this is a naming change only." The same release added suggestions for custom topics that come from recurring patterns in your ticket volume. An account can create up to 500 custom topics. Zendesk's help centre says its prebuilt topics are tailored to each account's ticket data, but it does not say how custom topics are trained or how many examples they need.
Freshdesk's equivalent is Auto Triage, part of Freddy AI Copilot. Its help article, last updated July 29, 2026, says Auto Triage predicts Priority, Group, Type and custom dropdown fields. It recommends "a minimum of 2,000 tickets" of history, and enablement "typically completes within 2 days." It needs a Pro or Enterprise plan, and Freshworks lists Freddy AI Copilot at $29 per agent per month.
Neither vendor shows how often its routing is right. Zendesk gives each prediction a confidence field that shows "how likely the classification is accurate," but its pages give no accuracy figures. Freshdesk's Auto Triage article does not mention confidence scores at all. A team that wants to compare these add-ons with a custom model has to produce the numbers itself.
The training label should be the final group, not the first group that someone picked
A routing model repeats the patterns in its labels. If you train on the group that a ticket was first assigned to, the model copies the first triage decision, including its mistakes. Train on the group that resolved the ticket instead.
In Zendesk, pull the training data from three endpoints:
- Use the cursor-based incremental ticket export,
GET /api/v2/incremental/tickets/cursor, which returns up to 1,000 tickets per page with subject, description, tags, custom fields,group_idandassignee_id. It is limited to admins and to 10 requests per minute. - Use the ticket comments endpoint,
GET /api/v2/tickets/{ticket_id}/comments, to find the first agent reply. Each comment carriesauthor_id,plain_bodyand apublicflag that is false for internal notes. - Use the ticket audits endpoint,
GET /api/v2/tickets/{ticket_id}/audits, to count reassignments. Its Change events record the previous and new value of each ticket property, so every move between groups appears there.
In Freshdesk, the equivalent calls are simpler but have a page cap:
- Use list tickets,
GET /api/v2/tickets, withupdated_since, because by default it returns only tickets from the past 30 days. It returns at most 100 tickets per page and 300 pages, which is 30,000 tickets, so step the date window forward for larger histories. - Use list conversations,
GET /api/v2/tickets/[id]/conversations, to find the first agent reply. Each entry hasbody_text,private,incominganduser_id.
The group_id on a closed ticket is the final group in both helpdesks. Use it as the label, and keep the reassignment count from Zendesk audits as a separate column. Tickets that moved several times show where agents themselves disagreed, and they are the first ones to review by hand.
Before training, clean the labels in this order:
- Map groups that were renamed or merged to their current name, so that one team does not appear as two classes.
- Remove spam, merged and auto-closed tickets, because their final group says nothing about routing.
- Fold any group with fewer than about 50 tickets into its parent group or into a general triage class.
- Check the class balance against Amazon's guidance for Comprehend, which says to keep the largest class at most 10 times the size of the smallest.
The 50-ticket floor comes from Amazon Comprehend, which requires at least 50 training documents per class in its CSV format. Freshdesk's 2,000-ticket recommendation applies to the whole history, not to each class.
No vendor source gives a number of months of history to use when categories drift. A practical rule is to use the most recent period that still gives every class 50 examples. Start that period after your last reorganisation of groups, because tickets from before it carry labels that no longer exist.
A fair benchmark holds out your most recent tickets and measures four numbers
No published test compares Zendesk intelligent triage, Freddy Auto Triage, a prompt-only LLM and a fine-tuned model on the same tickets. Holdout accuracy for these options on real helpdesk data has not been measured publicly. That gap is the main reason to run your own test before you buy.
Split by time, not at random. Train on older tickets and hold out the most recent month as the test set. A random split mixes old and new tickets, which hides drift and makes every model look better than it will be in production.
Score every option on the same four numbers:
- Measure accuracy as the share of held-out tickets where the predicted group matches the final group.
- Measure the misroute rate as the share of auto-routed tickets that agents later moved to another group.
- Measure latency as the time from ticket creation to the written prediction.
- Measure cost per 1,000 tickets from list prices at your own volume.
The built-in add-ons cannot be scored on old tickets, because they classify new tickets as they arrive. Zendesk's help centre says re-evaluation on replies applies only to tickets created after the setting is turned on. To compare them fairly, run each add-on in a suggest-only setting on live tickets for the same weeks that your custom model runs in shadow. Then compare both sets of predictions with the final group after the tickets close.
Amazon Comprehend reports some of this for you. After training, it computes accuracy, macro precision, recall and F1 on test data, which you can read through DescribeDocumentClassifier. Forethought, a third-party vendor, says its Triage product reaches a "ticket prediction rate" of up to 98%, but its page does not explain how that figure was measured.
List prices make the cost side easy to compare
Cost per 1,000 tickets depends on how each option charges. The add-ons charge per agent, the LLM APIs charge per token, and a Comprehend endpoint charges per second while it runs. The table uses one example: 20 agents and 10,000 tickets a month.
| Option | How it is billed | Cost per 1,000 tickets |
|---|---|---|
| Zendesk Copilot | $50 per agent per month, paid yearly | $100.00 |
| Freddy AI Copilot | $29 per agent per month | $58.00 |
OpenAI gpt-5-mini, prompt only |
$0.25 input, $2.00 output per million tokens | $0.29 |
OpenAI gpt-5-nano, prompt only |
$0.05 input, $0.40 output per million tokens | $0.06 |
| Amazon Comprehend, one inference unit | $0.0005 per second, always on | $129.60 |
The assumptions behind these figures are stated in full here. Each LLM call sends 1,000 input tokens, which covers instructions, a list of groups and the ticket text, and returns 20 output tokens. A model that returns more output costs more. The Comprehend endpoint runs for a 30-day month at $0.0005 a second, which is $1,296 a month. Comprehend also charges $3 per hour of training and $0.50 a month to store the model. The add-on prices also pay for features other than routing, so their per-ticket cost overstates what routing alone costs.
A self-hosted model has no list price. Its cost is the server that runs it, which depends on your own hardware. DistilBERT, the model used in Hugging Face's text classification guide, has 67 million parameters and uses the Apache 2.0 licence.
The right option depends on how much control you need over the model and the data
The choice comes down to four situations:
- If you use one helpdesk and can accept the vendor's model, start with its add-on in suggest-only mode and measure it for a month. You build nothing, and the prediction is already a field that triggers or rules can use.
- If you need a model that you can test and retrain, Amazon Comprehend custom classification gives you test-set accuracy after training. It accepts two to 1,000 classes and plain-text training in English, Spanish, German, Italian, French or Portuguese, all in one language per model.
- If ticket text must stay on your own servers, fine-tune an open model such as DistilBERT with Hugging Face's
Trainerand serve it yourself. You own the weights, the scores and the logs. - If you want a quick test without training, a prompt-only LLM is the cheapest option at list prices. Zapier publishes a template that classifies new Freshdesk tickets with ChatGPT. It learns nothing from your history, so measure it against the final group like every other option.
The table compares the options on where ticket text goes and what accuracy each one reports.
| Option | Trained on your tickets | Where ticket text goes | Accuracy published |
|---|---|---|---|
| Zendesk or Freshdesk add-on | Yes, from account history | The helpdesk vendor | No |
| Forethought Triage | Yes, on historical data | Forethought | "Up to 98%", method not given |
| Prompt-only LLM | No | The LLM provider | No |
| Amazon Comprehend | Yes, by you | Your AWS account | Test-set metrics after training |
| Self-hosted DistilBERT | Yes, by you | Your own servers | Only what you measure |
| Parsec decision models | Yes, Parsec says | Parsec's service | No routing results |
Teams that want a custom model without building it can use a vendor. Forethought says its Triage product is trained on your historical data. TicketFlip.ai is listed in the Zendesk Marketplace. Parsec, a small language model lab, says it tunes decision models on a customer's own decisions and builds the evaluations and training sets for them. Its decision-models page says a tuned model "can reach production within two weeks," which is Parsec's own claim without a measured baseline. The page gives no price for this work and names no deployment options, and Parsec has published no results for ticket routing. Any of these vendors would need the same webhook wiring and the same holdout test as a model that you build.
The write-back uses a ticket-created webhook and one API update
The custom model has to sit outside the helpdesk and answer a call each time a ticket arrives. Both helpdesks support this with standard features.
In Zendesk, the wiring has four parts:
- Create a webhook with
POST /api/v2/webhooksand setsubscriptionsto["conditional_ticket_events"], so that a trigger can call it. - Add a trigger with the condition
Ticket | Is | Createdand the actionNotify by > Active webhook, sending a JSON body such as{"ticket_id": "{{ticket.id}}"}. - Have your service reply at once and do the work afterwards. Zendesk webhooks time out after 12 seconds, and Zendesk says that a delivery can arrive more than once, so each update must be safe to repeat.
- Write the result with
PUT /api/v2/tickets/{ticket_id}, settinggroup_id,assignee_idor an entry incustom_fields.
Give the service an OAuth token with the tickets:read and tickets:write scopes. Zendesk added these narrower scopes on August 10, 2026, and admins can now limit each OAuth client to an allowed list. The webhooks:write and triggers:write scopes are needed only by whoever sets up the wiring. Zendesk now marks plain API tokens as deprecated in favour of OAuth access tokens.
In Freshdesk, the automation rule does the calling:
- Create an automation rule that runs on ticket creation.
- Choose Trigger API if you are on the Pro plan or above. It lets a JavaScript step parse the model's reply and set the group directly.
- Otherwise choose Trigger Webhook, send
{{ticket.id}}in the body, and have your service callPUT /api/v2/tickets/[id]withgroup_id,responder_idor acf_custom field.
Freshdesk allows 1,000 webhook calls per hour and buffers calls beyond that. Failed calls are retried every 30 minutes, up to 48 times. One more rule matters if you also run Auto Triage: Freshdesk says that "Automation Rules always take precedence over AI suggestions," field by field.
Writing the prediction to a custom field first, rather than straight to the group, keeps routing logic in the helpdesk. Zendesk triggers can use custom fields as conditions, so an admin can change routing rules without touching the model.
A confidence threshold limits automatic routing to the tickets that the model scores highly
A model that routes every ticket will misroute the hard ones. The safer design routes only the tickets that get a high confidence score and leaves the rest in the triage queue.
This works only if the model's confidence scores match how often it is right. The scikit-learn documentation defines a well-calibrated classifier as one where, among tickets scored near 0.8, about 80% are actually in that class. Its CalibratedClassifierCV class can correct a model whose scores run too high or too low. Calibrate on held-out tickets before you choose a threshold.
Roll the model out in three stages:
- Run in shadow mode first. Write the predicted group and its confidence to custom fields, and do not change the group.
- Pick a threshold from the shadow data, at the point where the misroute rate on auto-routed tickets is low enough for your team.
- Turn on auto-routing only above that threshold, and send everything below it to the triage queue.
Zendesk's own example trigger follows the same idea for intelligent triage. It routes a ticket only when topic confidence "Is not Low," and it adds a triage_trigger_fired tag so that the trigger runs once. Freshdesk's Manual mode, in which an agent must click Apply, is the native version of suggest-only.
Log every prediction with the ticket ID, the predicted group, the confidence, the model version and the final group after resolution. That log is the audit trail when someone asks why a ticket went to the wrong team. It is also the next training set.
Sources
- Zendesk, Automatically classifying tickets with intelligent triage: https://support.zendesk.com/hc/en-us/articles/4550640560538-Automatically-detecting-customer-intent-sentiment-and-language
- Zendesk, Announcing intelligent triage that's simpler to start, scale and manage: https://support.zendesk.com/hc/en-us/articles/10879634516762-Announcing-intelligent-triage-that-s-simpler-to-start-scale-and-manage
- Zendesk, Personalizing intelligent triage by creating custom topics: https://support.zendesk.com/hc/en-us/articles/8718789695002-Personalizing-intelligent-triage-by-creating-custom-topics
- Zendesk, Creating triggers for automatically triaged tickets: https://support.zendesk.com/hc/en-us/articles/4766535251610-Creating-triggers-for-automatically-triaged-tickets
- Zendesk, Trigger conditions and actions reference: https://support.zendesk.com/hc/en-us/articles/115015611647-Trigger-conditions-and-actions-reference
- Zendesk, Placeholder reference for business rules: https://support.zendesk.com/hc/en-us/articles/4408886858138
- Zendesk, Announcing more granular OAuth client scopes: https://support.zendesk.com/hc/en-us/articles/11093380955674-Announcing-more-granular-OAuth-client-scopes
- Zendesk, Pricing: https://www.zendesk.com/pricing/
- Zendesk Developer, Incremental exports: https://developer.zendesk.com/api-reference/ticketing/ticket-management/incremental_exports/
- Zendesk Developer, Ticket comments: https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_comments/
- Zendesk Developer, Ticket audits: https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_audits/
- Zendesk Developer, Ticket audit events reference: https://developer.zendesk.com/documentation/ticketing/reference-guides/ticket-audit-events-reference/
- Zendesk Developer, Tickets: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/
- Zendesk Developer, Creating and monitoring webhooks: https://developer.zendesk.com/documentation/webhooks/creating-and-monitoring-webhooks/
- Zendesk Developer, Security and authentication: https://developer.zendesk.com/api-reference/introduction/security-and-auth/
- Freshdesk, Setting up Auto Triage: https://support.freshdesk.com/support/solutions/articles/50000002117
- Freshdesk, Using webhooks in automation rules: https://support.freshdesk.com/support/solutions/articles/132589
- Freshdesk, API reference: https://developers.freshdesk.com/api/
- Freshworks, Freshdesk pricing: https://www.freshworks.com/freshdesk/pricing/
- Zapier, Classify new support tickets in Freshdesk with ChatGPT: https://zapier.com/templates/details/7c4c7f55b6b5036ccda10370d0003ec07094d5d35c02d98a4ef5d50b8ad3be2d
- OpenAI, API pricing: https://developers.openai.com/api/docs/pricing
- AWS, Amazon Comprehend guidelines and quotas: https://docs.aws.amazon.com/comprehend/latest/dg/guidelines-and-limits.html
- AWS, Training classification models: https://docs.aws.amazon.com/comprehend/latest/dg/training-classifier-model.html
- AWS, Custom classifier metrics: https://docs.aws.amazon.com/comprehend/latest/dg/cer-doc-class.html
- AWS, Amazon Comprehend pricing: https://aws.amazon.com/comprehend/pricing/
- Hugging Face, distilbert-base-uncased: https://huggingface.co/distilbert/distilbert-base-uncased
- Hugging Face, Text classification guide: https://huggingface.co/docs/transformers/tasks/sequence_classification
- scikit-learn, Probability calibration: https://scikit-learn.org/stable/modules/calibration.html
- Forethought, Triage: https://www.forethought.ai/platform/triage
- Zendesk Marketplace, TicketFlip.ai: https://www.zendesk.com/marketplace/apps/support/246293/ticketflipai/
- Parsec, Decision models: https://parseclab.ai/solutions/decision-models/