Zendesk
Zendesk is a cloud-based customer service and support platform. It offers a range of features including ticket management, self-service options, knowledge-base management, live chat, customer analytics, and conversations.
ingestr supports Zendesk as a source.
The Zendesk supports two authentication methods when connecting through ingestr:
- OAuth Token
- API Token
For all resources except chat resources, you can use either the API Token or the OAuth Token to fetch data. However, for chat resources, you must use the OAuth Token specific to Zendesk Chat.
URI format
The URI format for Zendesk based on the authentication method:
For OAuth token authentication:
zendesk://:<oauth_token>@<sub-domain>For API token authentication:
zendesk://<email>:<api_token>@<sub-domain>URI parameters:
subdomain: the unique Zendesk subdomain that can be found in the account URL. For example, if your account URL ishttps://my_company.zendesk.com/, thenmy_companyis your subdomainemail: the email address of the userapi_token: the API token used for authentication with Zendeskoauth_token: the OAuth token used for authentication with Zendesk
Setting up a Zendesk Integration
Option 1: API Token Authentication
- Log in to your Zendesk Admin Center
- Go to Apps and integrations → APIs → Zendesk API
- Click the Settings tab and make sure Token Access is enabled
- Click Add API token
- Enter a description (e.g., "Data Integration")
- Click Copy to save the token (it won't be shown again)
- Click Save
You'll need your email address and the API token for authentication.
Option 2: OAuth Token Authentication
- Log in to your Zendesk Admin Center
- Go to Apps and integrations → APIs → Zendesk API
- Click OAuth Clients tab
- Click Add OAuth client
- Fill in the client name and description
- Set the redirect URL (can be
http://localhostfor testing) - Click Save and note the Client ID and Client Secret
- Use the OAuth flow to obtain an access token
For Zendesk Chat Resources
Chat resources require a separate Zendesk Chat OAuth token:
- Go to Zendesk Chat Admin
- Navigate to Settings → Account → API & SDKs
- Create a new API client and complete the OAuth flow
- Use the resulting access token for chat-related tables
Finding Your Subdomain
Your subdomain is part of your Zendesk URL. For example, if your Zendesk URL is https://mycompany.zendesk.com/, then mycompany is your subdomain.
Once you have your credentials, if you decide to use an OAuth token, you should have a subdomain and an OAuth token. Let's say your subdomain is mycompany and your OAuth token is qVsbdiasVt.
ingestr ingest --source-uri "zendesk://:qVsbdiasVt@mycompany" \
--source-table 'tickets' \
--dest-uri 'duckdb:///zendesk.duckdb' \
--dest-table 'dest.tickets' \
--interval-start '2024-01-01'If you decide to use an API Token, you should have a subdomain, email, and API token. Let's say your subdomain is mycompany, your email is john@get.com, and your API token is nbs123.
ingestr ingest --source-uri "zendesk://john@get.com:nbs123@mycompany" \
--source-table 'tickets' \
--dest-uri 'duckdb:///zendesk.duckdb' \
--dest-table 'dest.tickets' \
--interval-start '2024-01-01'The result of this command will be a table in the zendesk.duckdb database.
Tables
Zendesk source allows ingesting the following sources into separate tables:
| Table | PK | Inc Key | Inc Strategy | Details |
|---|---|---|---|---|
| tickets | id | updated_at | merge | Retrieves all tickets, which are the means through which customers communicate with agents |
| ticket_metrics | - | – | replace | Retrieves various metrics about one or more tickets. |
| ticket_metric_events | id | time | append | Retrieves ticket metric events that occurred on or after the start time |
| ticket_forms | - | replace | Retrieves all ticket forms | |
| users | - | – | replace | Retrieves all users |
| groups | - | – | replace | Retrieves groups of support agents |
| organizations | - | – | replace | Retrieves organizations |
| brands | - | – | replace | Retrieves all brands for your account |
| sla_policies | - | – | replace | Retrieves different SLA policies. |
| activities | - | – | replace | Retrieves ticket activities affecting the agent. |
| automations | - | – | replace | Retrieves the automations for the current account |
| targets | - | – | replace | Retrieves targets where as targets are data from Zendesk to external applications like Slack when a ticket is updated or created. |
| calls | id | updated_at | merge | Retrieves all calls specific to channels |
| addresses | - | – | replace | Retrieves addresses information |
| greetings | - | – | replace | Retrieves all default or customs greetings |
| phone_numbers | - | – | replace | Retrieves all available phone numbers. |
| settings | - | – | replace | Retrieves account settings related to Zendesk voice accounts |
| lines | - | – | replace | Retrieves all available lines, such as phone numbers and digital lines, in your Zendesk voice account. |
| agents_activity | - | – | replace | Retrieves activity information for agents |
| legs_incremental | id | updated_at | merge | Retrieves detailed information about each agent involved in a call. |
| chats | id | update_timestamp/ updated_timestamp | merge | Retrieves available chats. |
Use these as --source-table parameter in the ingestr ingest command.