đź“… Fireside Chat: Future of Analytics on the Modern Data Stack with Hex, Transform, and RudderStack

Register Now →
By Rudderstack Team

How to load data from Zendesk to SQL Data Warehouse

How may I load data from Zendesk to SQL Data Warehouse for further analysis? The purpose of this post is to help you define a process or pipeline for receiving your subscription-related data from Zendesk and load it into SQL Data Warehouse for further analysis. We will see how to access and extract your data from Zendesk through its API and how to load it into SQL Data Warehouse. This process requires you to write the code to get the data and make sure that this process will run every time new data is generated. Alternatively, you can use products like RudderStack that can handle this kind of problem automatically for you.

About Zendesk

Zendesk provides a cloud-based customer service platform, that includes ticketing, self-service options, and customer support features. Zendesk focuses on improving the communication between your customers and your company. It brings all your customer communication into one place. The supported communication channels are:

  • Mail. Zendesk helps to organize all the emails you receive from your customers.
  • Social. You can connect your Facebook and Twitter account with Zendesk.
  • Voice. Take customer calls from within Zendesk.
  • Chat. Zopim Chat allows you to communicate with your customers from within your product.

Zendesk’s help desk software helps streamline customer support with time-saving tools like triggers and automation. And it’s intuitive, built with the experience of customer service and support desk agents in mind. Some important features of the ticketing system that Zendesk offers are:

It helps to Solve tickets better with teammates through a collaborative environment where information can be shared.

Get access to relevant information across teams. Zendesk comes with an internal Knowledge Base that allows agents to quickly refer to information and processes without losing their place.

Make everyone inside your company a support agent. With light agents, everyone inside your company can view tickets and make private comments.

Additionally, Zendesk offers a suite of analytics tools that will help you to get closer to your user through data. With these tools you can:

  • Gain visibility into customers interactions
  • Measure your team’s performance
  • See the business impacts of great service

It is possible to track a large number of metrics related to your customers, support teams, and your business.

But in case that you would like to run some more engaged analysis with your Zendesk data, or fuse the customer support related data with data from other sources like your transactional database and logs, Zendesk exposes a rich ecosystem of APIs and tools that you can use to access and pull your data among other functionalities.

About Microsoft Azure SQL Data Warehouse

SQL Data Warehouse is the data warehousing solution that you can use if you are a user of Microsoft Azure. It’s an elastic data warehousing as a service solution, emphasizing its enterprise focus. It also speaks SQL like the previous two solutions and it supports querying both relational and non-relational data. It offers a number of enterprise-class features like support for hybrid cloud installations and strong security. It’s probably the less mature solution compared to the two others though, it’s still in “Preview” mode although accessible to existing Azure subscribers.

Extract your data from Zendesk

Zendesk APIs are not specific to pulling data, Zendesk provides more than a hundred different APIs for you to integrate with. So you can easily manage your users, enhance your team’s productivity and create seamless integrations. You can create integrations or even enrich Zendesk with data from external sources. Zendesk API is a RESTful API that can be accessed through HTTP. As a RESTful API, interacting with it can be achieved by using tools like CURL or Postman or by using http clients for your favorite language or framework.

A few suggestions:

Additionally, Zendesk offers a number of SDKs and libraries so you can access the API from your framework of choice without having to deal with the technicalities of HTTP. API clients are available for the following languages:

Zendesk API Authentication

Zendesk’s API is an SSL-only API, regardless of how your account is configured. You must be a verified user to make API requests. You can authorize against the API using either basic authentication with your email address and password, with your email address and an API token, or with an OAuth access token.

Zendesk rate limiting

The API is rate-limited. It only allows a certain number of requests per minute depending on your plan and the endpoint. Zendesk reserves the right to adjust the rate limit for given endpoints to provide a high quality of service for all clients. The current limits are the following:

Pagination

By default, most list endpoints return a maximum of 100 records per page. You can change the number of records on a per-request basis by passing a per_page parameter in the request URL parameters. Example: per_page=50. However, you can’t exceed 100 records per page on most endpoints.

When the response exceeds the per-page maximum, you can paginate through the records by incrementing the page parameter. Example: page=3. List results include next_page and previous_page URLs in the response body for easier navigation:

{
"users": [ ... ],
"count": 1234,
"next_page": "https://account.zendesk.com/api/v2/users.json?page=2",
"previous_page": null
}


Endpoints and Available Resources

The Zendesk REST API exposes a large number of resources and endpoints that allow the user to interact with the platform in every possible way. Thus it is possible to create new applications on top of the Zendesk platform, integrate external systems with it, and of course, pull data out of the platform. The most important resources are the following:

  • The tickets that your customers create through Zendesk.
  • Ticket events. Changes that have occurred to the tickets.
  • Organizations.
  • Users.
  • Ticket metrics. These are metrics related to your tickets.
  • Data related to the Net Promoter Score.
  • Articles

Let’s assume that we want to pull all the tickets we have on Zendesk. To do that we need to perform a GET request to the appropriate end-point, like this: GET /api/v2/incremental/tickets.json?start_time=1332034771

curl https://{subdomain}.zendesk.com/api/v2/incremental/tickets.json?start_time=1332034771 \
-v -u {email_address}:{password}

And a sample response: