How Does Fivetran Sync Zendesk Ticket Data Incrementally?
Question
How does Fivetran sync Zendesk ticket data incrementally?
Environment
Connector: Zendesk Support
Answer
We use Zendesk's Incremental Exports API to sync ticket data. We use the following request and adjust the start_time parameter to fetch all the tickets that have changed since the specified time: GET /api/v2/incremental/tickets/cursor.json?start_time={unix_time}
See the example response below:
{
"tickets": [...],
"after_url": "https://example.zendesk.com/api/v2/incremental/tickets/cursor.json?cursor=MTU4MDc1Mzc5OC4wfHw0MzJ8",
"after_cursor": "MTU4MDc1Mzc5OC4wfHw0MzJ8",
"end_of_stream": false
}
If the end_of_stream field of the response is false, the response is too large. In such cases, we submit another request to retrieve the next set of results using the cursor provided in the after_cursor and after_url fields. For example: GET /api/v2/incremental/tickets/cursor.json?cursor=MTU4MDc1Mzc5OC4wfHw0MzJ8.
We repeat the process until the end_of_stream field is true. After receiving all tickets, we review the audit events and sync the related ticket tables, such as TICKET_TAG_HISTORY and TICKET_FIELD_HISTORY.