# Zendesk Chat

Zendesk Chat is a live chat software platform that allows businesses to provide real-time customer support directly on their website or app.

Zendesk Chat integration replicates data using the [Zendesk Chat API](https://developer.zendesk.com/api-reference/live-chat/introduction/).

See the [Schema](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Zendesk-Chat.htm#Schema) section for a list of objects available for replication.

## Preparing for authentication

To access your data, you need to authenticate the connection with your account credentials.

Information noteMake sure that the account you use has read access to the tables you want to fetch.

To generate your client ID and secret:

1. Log into your Zendesk chat domain, for example: https://my-sub-domain.zendesk.com/chat.

2. Expand the Settings menu on the left of the page and click Account.

3. Select the API and SDKs tab at the top of the page.

4. Select or add an API Client. Your client ID is displayed on the page.

5. Copy and save the client secret in a secured file. You will need it to connect to the application.

## Creating the connection

For more information, see [Connecting to SaaS applications](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/Landing/connecting-web-applications.htm).

1. Click Authenticate when you have filled in the required connection settings.

   You may be asked to log in to the source application.

   A window is displayed with an authentication code.

2. Copy the code to the clipboard and return to the connection dialog.

3. Paste the code in Complete authentication with the code provided by the source and click Verify.

   Tip noteYou may need to scroll down to see this field.

   When status is Verified, the authentication is verified.

4. Provide a name for the connection in Connection name.

5. Select Open connection metadata to define metadata for the connection when it has been created.

Connection settings

| Setting | Description |
| --- | --- |
| Data gateway | Select a Data Movement gateway if required by your use case.<br><br>Information note<br><br>This field is not available with the Qlik Talend Cloud Starter subscription, as it does not support Data Movement gateway. If you have another subscription tier and do not want to use Data Movement gateway, select None.<br><br>For information on the benefits of Data Movement gateway and use cases that require it, see [Qlik Data Gateway - Data Movement](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Gateways/replication-gateway.htm). |
| Start Date | Enter the date, in the format `MM/DD/YYYY`, from which the data must be replicated from your source to your target. |
| Zendesk Subdomain | The subdomain of your Zendesk site. For example, the subdomain of `qlik.zendesk.com` would be `qlik`. |
| Client ID | Client ID. |
| Client Secret | Client secret. |

## Schema

Information note

Schemas and naming conventions can change from version to version. It is recommended to verify your version before continuing.

Depending on your destination, table and column names may not appear as they are outlined below.

### account

The `account` table contains info about accounts within your Zendesk Chat account.

| **Replication Method** | Full Table |
| --- | --- |
| **Primary Key** | account\_key |
| **Useful links** | [Zendesk Chat API method](https://developer.zendesk.com/api-reference/live-chat/chat-api/accounts/ "Opens in new tab: Zendesk Chat API method") |

account table foreign keys

| Join account with | on |
| --- | --- |
| [goals](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Zendesk-Chat.htm#goals) | ```<br>account.plan.goals = goals.id<br>``` |
| [chats](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Zendesk-Chat.htm#chats) | ```<br>account.plan.goals = chats.conversions.goal_id<br>```<br><br>```<br>account.plan.goals = chats.history.conversion.goal_id<br>``` |

account table schema

| **account\_key**<br><br><br>STRING |
| --- |
| **billing**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li>additional_info: STRING</li><li>address1: STRING</li><li>address2: STRING</li><li>city: STRING</li><li>company: STRING</li><li>country_code: STRING</li><li>email: STRING</li><li>first_name: STRING</li><li>last_name: STRING</li><li>postal_code: STRING</li><li>state: STRING</li></ul> |
| **create\_date**<br><br><br>DATE-TIME |
| **plan**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li>agent_leaderboard: BOOLEAN</li><li>agent_reports: BOOLEAN</li><li>analytics: BOOLEAN</li><li>chat_reports: BOOLEAN</li><li>daily_reports: BOOLEAN</li><li>email_reports: BOOLEAN</li><li>file_upload: BOOLEAN</li><li>goals: INTEGER</li><li>high_load: BOOLEAN</li><li>integrations: BOOLEAN</li><li>ip_restriction: BOOLEAN</li><li>long_desc: STRING</li><li>max_advanced_triggers: STRING</li><li>max_agents: INTEGER</li><li>max_basic_triggers: STRING</li><li>max_concurrent_chats: STRING</li><li>max_departments: STRING</li><li>max_history_search_days: STRING</li><li>monitoring: BOOLEAN</li><li>name: STRING</li><li>operating_hours: BOOLEAN</li><li>price: NUMBER</li><li>rest_api: BOOLEAN</li><li>short_desc: STRING</li><li>sla: BOOLEAN</li><li>support: BOOLEAN</li><li>unbranding: BOOLEAN</li><li>widget_customization: STRING</li></ul> |
| **status**<br><br><br>STRING |

### agents

The `agents` table contains info about agents within your Zendesk Chat account.

| **Replication Method** | Full Table |
| --- | --- |
| **Primary Key** | id |
| **Useful links** | [Zendesk Chat API method](https://developer.zendesk.com/api-reference/live-chat/chat-api/agents/ "Opens in new tab: Zendesk Chat API method") |

agents table foreign keys

| Join agents with | on |
| --- | --- |
| [chats](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Zendesk-Chat.htm#chats) | ```<br>agents.id = chats.agent_ids<br>```<br><br>```<br>agents.departments = chats.department_id<br>```<br><br>```<br>agents.departments = chats.history.prev_department_id<br>``` |
| [departments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Zendesk-Chat.htm#departments) | ```<br>agents.departments = departments.id<br>``` |
| [shortcuts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Zendesk-Chat.htm#shortcuts) | ```<br>agents.departments = shortcuts.departments<br>``` |

agents table schema

| **create\_date**<br><br><br>DATE-TIME |
| --- |
| **departments**<br><br><br>ARRAY |
| **display\_name**<br><br><br>STRING |
| **email**<br><br><br>STRING |
| **enabled**<br><br><br>BOOLEAN |
| **enabled\_departments**<br><br><br>ARRAY |
| **first\_name**<br><br><br>STRING |
| **id**<br><br><br>INTEGER |
| **last\_login**<br><br><br>DATE-TIME |
| **last\_name**<br><br><br>STRING |
| **login\_count**<br><br><br>INTEGER |
| **role\_id**<br><br><br>INTEGER |
| **roles**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li>administrator: BOOLEAN</li><li>owner: BOOLEAN</li></ul> |
| **scope**<br><br><br>STRING |
| **skills**<br><br><br>ARRAY |

### bans

The `bans` table contains info about bans created in your Zendesk Chat account.

| **Replication Method** | Full Table |
| --- | --- |
| **Primary Key** | id |
| **Useful links** | [Zendesk Chat API method](https://developer.zendesk.com/api-reference/live-chat/chat-api/bans/ "Opens in new tab: Zendesk Chat API method") |

bans table schema

| **created\_at**<br><br><br>DATE-TIME |
| --- |
| **id**<br><br><br>INTEGER |
| **ip\_address**<br><br><br>STRING |
| **reason**<br><br><br>STRING |
| **type**<br><br><br>STRING |
| **visitor\_id**<br><br><br>STRING |
| **visitor\_name**<br><br><br>STRING |

### chats

The `chats` table contains info about the chats within your Zendesk Chat account.

| **Replication Method** | CDC |
| --- | --- |
| **Primary Key** | id |
| **Replication Key** | timestamp |
| **Useful links** | [Zendesk Chat API method](https://developer.zendesk.com/api-reference/live-chat/chat-api/chats/ "Opens in new tab: Zendesk Chat API method") |

chats table foreign keys

| Join chats with | on |
| --- | --- |
| [agents](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Zendesk-Chat.htm#agents) | ```<br>chats.agent_ids = agents.id<br>```<br><br>```<br>chats.department_id = agents.departments<br>```<br><br>```<br>chats.history.prev_department_id = agents.departments<br>``` |
| [departments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Zendesk-Chat.htm#departments) | ```<br>chats.department_id = departments.id<br>```<br><br>```<br>chats.history.prev_department_id = departments.id<br>``` |
| [shortcuts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Zendesk-Chat.htm#shortcuts) | ```<br>chats.department_id = shortcuts.departments<br>```<br><br>```<br>chats.history.prev_department_id = shortcuts.departments<br>``` |
| [goals](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Zendesk-Chat.htm#goals) | ```<br>chats.conversions.goal_id = goals.id<br>```<br><br>```<br>chats.history.conversion.goal_id = goals.id<br>``` |
| [account](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Zendesk-Chat.htm#account) | ```<br>chats.conversions.goal_id = account.plan.goals<br>```<br><br>```<br>chats.history.conversion.goal_id = account.plan.goals<br>``` |

chats table schema

| **agent\_ids**<br><br><br>ARRAY |
| --- |
| **agent\_names**<br><br><br>ARRAY |
| **comment**<br><br><br>STRING |
| **conversions**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li>attribution: OBJECT, which is also a nested data structure.            <ul><li>agent_id: INTEGER</li><li>agent_name: STRING</li><li>chat_timestamp: DATE-TIME</li><li>department_id: INTEGER</li><li>department_name: STRING</li></ul></li><li>goal_id: INTEGER</li><li>goal_name: STRING</li><li>id: STRING</li><li>timestamp: DATE-TIME</li></ul> |
| **count**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li>agent: INTEGER</li><li>total: INTEGER</li><li>visitor: INTEGER</li></ul> |
| **department\_id**<br><br><br>INTEGER |
| **department\_name**<br><br><br>STRING |
| **duration**<br><br><br>INTEGER |
| **end\_timestamp**<br><br><br>DATE-TIME |
| **history**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li>channel: STRING</li><li>conversion: OBJECT, which is also a nested data structure.            <ul><li>attribution: OBJECT, which is also a nested data structure.                    <ul><li>agent_id: INTEGER</li><li>agent_name: STRING</li><li>chat_timestamp: DATE-TIME</li><li>department_id: INTEGER</li><li>department_name: STRING</li></ul></li><li>goal_id: INTEGER</li><li>goal_name: STRING</li><li>id: STRING</li><li>timestamp: DATE-TIME</li></ul></li><li>department_id: INTEGER, STRING</li><li>department_name: STRING</li><li>msg: STRING</li><li>msg_id: STRING, INTEGER</li><li>name: STRING</li><li>new_rating: STRING</li><li>new_tags: ARRAY</li><li>nick: STRING</li><li>options: STRING</li><li>prev_department_id: INTEGER, STRING</li><li>rating: STRING</li><li>skills_name: ARRAY</li><li>tags: ARRAY</li><li>timestamp: DATE-TIME</li><li>type: STRING</li></ul> |
| **id**<br><br><br>STRING |
| **message**<br><br><br>STRING |
| **missed**<br><br><br>BOOLEAN |
| **rating**<br><br><br>STRING |
| **referrer\_search\_engine**<br><br><br>STRING |
| **referrer\_search\_terms**<br><br><br>STRING |
| **response\_time**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li>avg: NUMBER, INTEGER</li><li>first: INTEGER</li><li>max: INTEGER</li></ul> |
| **session**<br><br><br>OBJECT |
| **started\_by**<br><br><br>STRING |
| **tags**<br><br><br>ARRAY |
| **timestamp**<br><br><br>DATE-TIME |
| **triggered**<br><br><br>BOOLEAN |
| **triggered\_response**<br><br><br>BOOLEAN |
| **type**<br><br><br>STRING |
| **unread**<br><br><br>BOOLEAN, INTEGER |
| **visitor**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li>email: STRING</li><li>id: STRING</li><li>name: STRING</li><li>notes: STRING</li><li>phone: STRING</li></ul> |
| **webpath**<br><br><br>ARRAY |
| **zendesk\_ticket\_id**<br><br><br>INTEGER |

### departments

The `departments` table contains info about departments within your Zendesk Chat account.

| **Replication Method** | Full Table |
| --- | --- |
| **Primary Key** | id |
| **Useful links** | [Zendesk Chat API method](https://developer.zendesk.com/api-reference/live-chat/chat-api/departments/ "Opens in new tab: Zendesk Chat API method") |

departments table foreign keys

| Join departments with | on |
| --- | --- |
| [shortcuts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Zendesk-Chat.htm#shortcuts) | ```<br>departments.id = shortcuts.departments<br>``` |
| [chats](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Zendesk-Chat.htm#chats) | ```<br>departments.id = chats.department_id<br>```<br><br>```<br>departments.id = chats.history.prev_department_id<br>``` |
| [agents](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Zendesk-Chat.htm#agents) | ```<br>departments.id = agents.departments<br>``` |

departments table schema

| **description**<br><br><br>STRING |
| --- |
| **enabled**<br><br><br>BOOLEAN |
| **id**<br><br><br>INTEGER |
| **members**<br><br><br>ARRAY |
| **name**<br><br><br>STRING |
| **settings**<br><br><br>OBJECT |

### goals

The `goals` table contains info about URL-based goals set within your Zendesk Chat account.

| **Replication Method** | Full Table |
| --- | --- |
| **Useful links** | [Zendesk Chat API method](https://developer.zendesk.com/api-reference/live-chat/chat-api/goals/ "Opens in new tab: Zendesk Chat API method") |

goals table foreign keys

| Join goals with | on |
| --- | --- |
| [chats](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Zendesk-Chat.htm#chats) | ```<br>goals.id = chats.conversions.goal_id<br>```<br><br>```<br>goals.id = chats.history.conversion.goal_id<br>``` |
| [account](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Zendesk-Chat.htm#account) | ```<br>goals.id = account.plan.goals<br>``` |

goals table schema

| **attribution\_model**<br><br><br>STRING |
| --- |
| **attribution\_period**<br><br><br>INTEGER |
| **description**<br><br><br>STRING |
| **enabled**<br><br><br>BOOLEAN |
| **id**<br><br><br>INTEGER |
| **name**<br><br><br>STRING |
| **settings**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li>conditions: ARRAY, which is also a nested data structure.            <ul><li>operator: STRING</li><li>type: STRING</li><li>value: STRING</li></ul></li></ul> |

### shortcuts

The `shortcuts` table contains info about shortcuts within your Zendesk Chat account.

| **Replication Method** | Full Table |
| --- | --- |
| **Primary Key** | name |
| **Useful links** | [Zendesk Chat API method](https://developer.zendesk.com/api-reference/live-chat/chat-api/shortcuts/ "Opens in new tab: Zendesk Chat API method") |

shortcuts table foreign keys

| Join shortcuts with | on |
| --- | --- |
| [departments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Zendesk-Chat.htm#departments) | ```<br>shortcuts.departments = departments.id<br>``` |
| [chats](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Zendesk-Chat.htm#chats) | ```<br>shortcuts.departments = chats.department_id<br>```<br><br>```<br>shortcuts.departments = chats.history.prev_department_id<br>``` |
| [agents](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Zendesk-Chat.htm#agents) | ```<br>shortcuts.departments = agents.departments<br>``` |

shortcuts table schema

| **agents**<br><br><br>ARRAY |
| --- |
| **departments**<br><br><br>ARRAY |
| **id**<br><br><br>STRING |
| **message**<br><br><br>STRING |
| **name**<br><br><br>STRING |
| **options**<br><br><br>STRING |
| **scope**<br><br><br>STRING |
| **tags**<br><br><br>ARRAY |

### triggers

The `triggers` table contains info about triggers within your Zendesk Chat account.

| **Replication Method** | Full Table |
| --- | --- |
| **Primary Key** | id |
| **Useful links** | [Zendesk Chat API method](https://developer.zendesk.com/api-reference/live-chat/chat-api/triggers/#list-triggers "Opens in new tab: Zendesk Chat API method") |

triggers table schema

| **definition**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li>actions: STRING</li><li>condition: STRING</li><li>event: STRING</li><li>version: INTEGER</li></ul> |
| --- |
| **description**<br><br><br>STRING |
| **enabled**<br><br><br>BOOLEAN |
| **id**<br><br><br>INTEGER |
| **name**<br><br><br>STRING |