Build a Zendesk ticket-routing agent
Copy page
Auto-tag every incoming Zendesk ticket with the team that owns the problem area.
Overview
In this tutorial, you'll build a ticket-routing agent in the Inkeep Visual Builder. When a new ticket lands in Zendesk, the agent will:
- Read the ticket and identify the actual problem
- Pick the team that owns that problem area
- Write the team tag to a Zendesk custom field
The result is an inbox that sorts itself.
Prerequisites
- Access to Inkeep Enterprise — schedule a demo if you don't have it yet
- A Zendesk org where you can create a custom field for ticket routing (e.g., a dropdown field named "Ticket type" with one value per team)
- A Zendesk MCP server registered in your project, with a tool that writes a value to a ticket's custom field. If you don't have one yet, see Build Custom MCP Servers for how to wrap the Zendesk API as an MCP server.
Create the Classifier agent
In the Visual Builder, go to the Agents tab in the left sidebar and click Create agent.
Click the Default Sub Agent on the canvas to configure it. Fill in:
- Name:
Classifier - Description:
Reads a Zendesk ticket, picks the owning team, and writes the team tag to a custom field. - Prompt: Paste the prompt below
About the taxonomy in the prompt: the # Team taxonomy section below is your product map in plain English. When your team reorgs or adds a new product surface, you edit this section — no code changes, no retraining. The taxonomy shown is an example for an Inkeep-style team structure; replace it with your own team names and the categories they own.
Prompt:
Things to substitute before you save:
- Replace
[YOUR_CUSTOM_FIELD_ID]with the numeric ID of your Zendesk custom field (find it in Zendesk Admin → Objects and rules → Fields). - Replace the example team taxonomy + values with your own teams.
- If your Zendesk MCP names its custom-field-write tool something other than
update_ticket_custom_field, swap that name in the prompt to match.
Connect the Zendesk MCP tool
On the agent canvas, drag and drop an MCP block from the top left toolbar.
Select your Zendesk MCP and connect it to the Classifier sub agent.
Click on the MCP block and restrict Active Tools to only the tool that updates a ticket's custom field — in our example MCP that's update_ticket_custom_field, but your MCP may name it differently. This agent only writes one thing, so leaving other tools enabled invites mistakes.
Click Save Changes in the top right corner.
Create the webhook trigger
The trigger is the door Zendesk knocks on to wake the agent up.
Go to Triggers in the left sidebar and click New Webhook Trigger.
Select the Classifier agent you just built as the agent this trigger will invoke, then click Continue.
Fill in:
- Name: e.g.
Zendesk new-ticket trigger - Authentication:
None— the URL itself is the secret
Click Create Trigger. Copy the webhook URL that appears — you'll need it in the next section.
Wire Zendesk to fire the trigger
Now set up Zendesk so every new ticket POSTs to the trigger URL you just copied.
See Trigger Inkeep agents from Zendesk tickets — paste your trigger URL into the Zendesk webhook's Endpoint URL. Come back here when you're done.
Test the agent
From an outside email address, send a test ticket to your Zendesk support address with a question that clearly belongs to one of your teams (e.g., "How do I update my billing details?" for the Account team).
Switch to the Zendesk tab, find the new ticket, and refresh.
Within about 10 seconds, the ticket's custom field flips from blank to the matching team value, written by the agent.
Escalation
Teach your assistant when to hand off to a human — and wire it up to your ticketing system so the support team gets the question with full conversation context already attached.
Internal-note draft
Draft a KB-grounded reply as a private comment on every new Zendesk ticket — the human rep reviews and sends.