Zoho Desk Integration

Zoho Desk Integration

Connect Zoho Desk to TR-AI using OAuth2 client credentials.

Note:Zoho Desk uses OAuth 2.0 client credentials flow — no user login or redirect URI required. You need a Server-based OAuth Client (not a Self-Client) with Desk scopes.
Warning:Zoho Desk is a backend-only integration. The onboarding UI does not include a Zoho Desk tab — setup is done via the Dashboard credentials card or the API directly.

Credentials required

FieldWhere to find it
Client IDZoho API Console → Your Server-based OAuth Client → Client ID
Client SecretZoho API Console → Your Server-based OAuth Client → Client Secret
Org IDZoho Desk → Setup → Developer Space → API → Org ID
Portal IDZoho Desk → Setup → Channels → Help Center → Portal name or ID

Step 1 — Create a Server-based OAuth Client

  1. 1
    Open Zoho API Console
    Go to https://api-console.zoho.com and click Add Client → Server-based Applications.
  2. 2
    Configure the client
    Set any valid Redirect URI (e.g. https://ticketresolve.ai/oauth/callback) — it is not used for client credentials flow. Click Create.
  3. 3
    Note the credentials
    Copy the Client ID and Client Secret.
Tip:The client credentials grant requires a Server-based OAuth Client. Self-Client tokens expire after 10 minutes and cannot be refreshed automatically — do not use them.

Step 2 — Find your Org ID and Portal ID

  • Org ID: Zoho Desk → Setup → Developer Space → API → Org ID (numeric).
  • Portal ID: Zoho Desk → Setup → Channels → Help Center → your portal name or numeric ID.

Step 3 — Enter credentials in TR-AI

In your TR-AI Dashboard, open the Zoho Desk credentials card. Enter Client ID, Client Secret, Org ID, and Portal ID. Click Save. TR-AI exchanges credentials for a token and calls GET /api/v1/departments?limit=1 to verify access.

Step 4 — Configure the Zoho Desk webhook

  1. 1
    Open Automation
    Go to Zoho Desk → Setup → Automation → Workflows → New Rule.
  2. 2
    Set the trigger
    Module = Tickets. Event = Ticket Created.
  3. 3
    Add a webhook action
    Add action: Webhook. Set Method = POST and URL:
Webhook URL
https://ticketresolve.ai/api/integrations/zoho-desk/webhook/{your-trial-id}

How TR-AI sends replies

TR-AI posts replies via POST /api/v1/tickets/{ticketId}/sendReply with channel: 'EMAIL'. This ensures the reply is emailed to the ticket requester — without channel: 'EMAIL', Zoho posts a web/portal reply only and no email is sent.

Reply content is wrapped in minimal HTML (<br> for newlines) since Zoho Desk renders the content field as HTML.

OAuth token caching

Tokens are cached per org and refreshed automatically on expiry. The cache key is {orgId}:{clientId[:16]}. Pass force=true to bypass the cache (used internally on 401 responses).

Token scope requested: Desk.tickets.ALL,Desk.contacts.READ.

Triage behaviour

When TR-AI cannot auto-resolve a ticket, it:

  • Posts a public acknowledgement reply via sendReply with channel: 'EMAIL'.
  • Assigns the ticket to a department named Triage if one exists — otherwise leaves it open and unassigned.
  • Sets ticket status to Open so agents see it.
  • Sends a Slack notification if configured.

Ticket status values

StatusWhen TR-AI sets it
OpenTriage path — ticket needs human attention
ClosedAuto-resolved — reply posted successfully