---
title: "Delivery Setup - Zendesk"
description: "Currently Zendesk supports agent routing based on the team/webstore."
canonical: "https://docs.cm.com/marketplace/live-chat-integrations/zendesk-livechat/delivery-setup-zendesk"
---

# Delivery Setup - Zendesk

> Currently Zendesk supports agent routing based on the team/webstore.

Source: https://docs.cm.com/marketplace/live-chat-integrations/zendesk-livechat/delivery-setup-zendesk

### Routing in Zendesk Livechat

Currently Zendesk supports agent routing based on the team/webstore. To achieve agent routing ensure that property `webStoreReferrer` is passed correctly inside `context` in the handover message request body as shown below

```
{
    "chatId": "{chat_id}",
    "sessionId": "{session_id}",
    "accountId": "{account_id}",
    "channel": "CXWebConversations",
    "conversationHostId": "{conversation_host_id}",
    "conversationClientId": "{conversation_client_id}",
    "context": {
        "CustomerInfo": "{\"name\":\"Jane Doe\",\"email\":\"customer@example.com\"}",
        "UrlReferrer": "https://fiddle.jshell.net/a7em2doq/show/",
        "webStoreReferrer": "sales"
    }
}
```

the channel name will be displayed under tags in the agent portal like this as shown below

\[Zendesk agent portal showing channel name displayed under tags]

### Presence Check In Zendesk Livechat

- Presence check for agent in zendesk is determined when the agent puts the status to Online\
  if the agent status is online then the agent is set to be available.
- For environments with multiple groups, obtain the **Group IDs** from the customer (following [these steps](https://docs.cm.com/marketplace/live-chat-integrations/zendesk-livechat/customer-setup-zendesk)) and append them as a query parameter to the presence check endpoint: `https://api.cm.com/marketplace/livechat/v1/tenants/xxxxx/adapters/xxxxx/presence-check?ApiKey=xxxx&groupId=123456789`
- if the agent status is offline/away we simply create a ticket in agent inbox so that agent can get back to it later. so when the agent is not available simply call the endpoint below to create a ticket in inbox which agent can comeback to later

Go to Marketplace UI, Select the Integration created. And copy the `Custom Endpoint URL` as shown below

\[Marketplace UI showing the Custom Endpoint URL for the Zendesk integration]

Request Body:

```
{
  "action": "createTicket",
  "data": {
    "sessionId": "CHAT_SESSION_ID",
    "name": "USER_NAME",
    "email": "USER_EMAIL"
  }
}
```

This endpoints are custom per integration, It is completely optional.
