Zendesk Integration
Connect Zendesk to TR-AI via webhook and API token for automated ticket resolution.
Credentials required
| Field | Where to find it | Auth method |
|---|---|---|
| Subdomain | Your Zendesk URL prefix — e.g. acme from acme.zendesk.com | Both |
| Your Zendesk admin email address | API Token only | |
| API Token | Admin Center → Apps & Integrations → APIs → Zendesk API → API Tokens → Add API Token | API Token only |
| Client ID | Admin Center → Apps & Integrations → APIs → OAuth Clients → Client ID | OAuth only |
| Client Secret | Admin Center → Apps & Integrations → APIs → OAuth Clients → Client Secret | OAuth only |
Step 1 — Enter credentials in TR-AI
In your TR-AI Dashboard, open the Zendesk card. Enter your subdomain and either your Email + API Token, or your OAuth Client ID + Client Secret. Click Save. TR-AI will verify the credentials immediately.
Step 2 — Create a Zendesk webhook
- 1Open Webhook creationGo to Admin Center → Apps & Integrations → Webhooks → Create webhook. Select Trigger or automation as the connection type.
- 2Configure the endpoint
Use your scoped webhook URL — this avoids routing ambiguity when multiple trials exist:
Webhook endpoint URLhttps://ticketresolve.ai/api/integrations/zendesk/webhook/{your-trial-id}Set Method =
POST, Request format =JSON. - 3Save the webhookClick Create webhook. Copy the webhook ID — you will need it when creating triggers.
Step 3 — Create two Zendesk triggers
TR-AI requires two triggers: one for new tickets and one for customer follow-up replies. Both send to the same webhook URL.
Trigger 1 — New ticket
- 1Create the triggerGo to Admin Center → Objects and rules → Business rules → Triggers → Add trigger.
- 2Set conditionsUnder Meet ALL of the following conditions, add:
Update type | Is | Created. - 3Set actionUnder Actions, add Notify active webhook, select your TR-AI webhook, and paste this JSON body:
{
"ticket_id": "{{ticket.id}}",
"subject": "{{ticket.title}}",
"description": "{{ticket.latest_comment.value}}",
"latest_comment": "{{ticket.latest_comment.value}}",
"requester_name": "{{ticket.requester.name}}"
}Trigger 2 — Customer follow-up reply
When a customer replies to a solved ticket, Zendesk automatically reopens it (status → open). This trigger fires on that transition.
- 1Create the triggerAdd a second trigger named TR-AI — process customer follow-up reply.
- 2Set conditionsAdd ALL three conditions:
Update type | Is | ChangedStatus | Is | OpenComment is public | Is | True
- 3Set actionNotify active webhook with the same TR-AI webhook and this body:
{
"ticket_id": "{{ticket.id}}",
"subject": "{{ticket.title}}",
"description": "{{ticket.description}}",
"latest_comment": "{{ticket.latest_comment.value}}",
"requester_name": "{{ticket.requester.name}}"
}latest_comment with description. When they differ, it answers only the new message — not the original ticket description.How TR-AI routes webhook payloads
TR-AI resolves the correct trial account in this order:
- URL param (preferred):
:trialIdin the webhook URL — always use the scoped URL. - Body field:
account_idorsubdomainmatched against your configured subdomain. - Single-trial fallback: if only one active Zendesk trial exists, it is used automatically.
Triage behaviour
When TR-AI cannot auto-resolve a ticket (confidence below threshold), it:
- Posts a public acknowledgement reply to the customer.
- Moves the ticket to a group named Triage if one exists in your Zendesk account — otherwise adds a
triagetag. - Leaves the ticket status as
openso agents see it in their queue. - Sends a Slack notification if a Slack webhook URL is configured.
Supported body shapes
TR-AI accepts two Zendesk trigger body formats:
| Format | Fields |
|---|---|
| Flat (recommended) | ticket_id, subject, description, latest_comment, requester_name, account_id |
| Nested | { ticket: { id, subject, description, requester: { name } } }, account_id |