> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuring the Zendesk Agent

[Back to Agent Transfer Integrations](https://koreai.mintlify.site/ai-for-service/integrations/overview.md#agent-transfer)

The Zendesk Agent integration allows you to hand off AI Agent conversations to live agents on Zendesk. The AI Agent acts as an intermediary between users and Zendesk agents.

## Configuration On Zendesk

1. Sign in to your Zendesk account and navigate to Admin Center > Apps and integrations > Integrations > Conversations integrations.

2. Click Create an integration.

3. In the integration configuration, copy the Webhook URL from the Sunshine Conversations channel configuration page on the platform and paste it into the corresponding field in Zendesk.

4. Under Subscriptions, select the following events:
   1. Switchboard pass control
   2. Switchboard release control
   3. Conversation message

5. Click Save to create the integration.

6. After the integration is created, click the three-dot menu next to the integration and select View details.

7. Copy the App ID displayed in the integration details. You will need to enter this ID in the Sunshine Conversations channel configuration in the platform.

8. Navigate to Admin Center > AI > AI Agents > AI Agents > Marketplace Bots.

9. Locate the integration you created, click the three-dot menu, and select Set as Default for All Channels.

## Configurations On Platform

1. Log in to the Platform.
2. Navigate to Channels & Flows > Channels > Digital > All > Sunshine Conversations Channel.
3. Enter the App ID copied from Zendesk.
4. Enter your Zendesk subdomain. For example, if your Zendesk URL is `https://koreai-1234.zendesk.com`, enter `koreai-1234` as the subdomain.
5. Navigate to: Admin > Apps and Integrations > APIs > Conversations API.
6. Generate or copy (if applicable)
   1. API Key ID
   2. API Secret

**Ignore Events From**

Provide a list of BotKit authors whose messages should be excluded from being sent to the Zendesk agent.

**Configure Ticket Field IDs (Agent View)**

Ticket fields (labels visible to agents) must be configured on the Zendesk configuration page. These field IDs determine the label name to the agent during conversations.

**Configure Third-Party Integration Events**

1. If you are using a third-party integration URL, copy the URL where you want to listen to the events sent by Zendesk.
2. Navigate to the Zendesk Conversations Integrations page: `https://{{subdomain}}.zendesk.com/admin/apps-integrations/integrations/conversations-integrations/integrations`.
3. Select the events you want to subscribe to.
4. Copy the exact event names.
5. Provide these event names in the Platform configuration.

**Authorize**

1. Click Authorize.

2. Enter your Zendesk subdomain and click Sign In.

3. When prompted, click Allow to grant the required permissions.

**Conversation Type**

Choose Single Conversation if you want to maintain a one-to-one relationship between the user and a single persistent record. Select Multiple Conversations if you want each chat session to generate a unique Conversation ID for distinct tracking and reporting.

## Additional Details

### Configure Conversation Context Variables

To pass specific user and conversation details during agent transfer, use the following context variables:

* Zendesk Internal User ID: `context.session.BotUserSession.agentHandoffMeta.zendeskInternalUserId`

* Zendesk Conversation ID: `context.session.BotUserSession.agentHandoffMeta.zendeskConversationId`

### Zendesk Account Usage Limitation

* A Zendesk account can be used with only one AI Agent at a time.
* If you want to reuse the same account:
  * Remove the existing agent configuration first.
  * Then configure it with the new AI Agent.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.