Using Incremental Ticket Export and Show Survey Response for CSAT results
A customer satisfaction, or CSAT, survey encourages your customers to provide feedback about their support experience by rating their solved tickets. The survey is designed to maximize the response rate by being quick and simple while also gathering the essential data.
If you are using the legacy CSAT option, you must deactivate the legacy CSAT and manually deactivate any custom CSAT automations and triggers before you can activate the updated CSAT option. You can have only one CSAT option activated at a time.
This article describes how to combine survey response submitted events and the Survey Responses object to retrieve survey details with the updated CSAT.
Getting detailed CSAT responses
Getting detailed CSAT responses is a two-step process:
- Export ticket data to get the survey response id.
- Use the survey response id to extract detailed survey responses.
Using the Incremental Ticket Export API to get the survey response id
The Incremental Ticket Export API lets you retrieve tickets updated within a specific time frame. This is useful for syncing ticket data periodically without needing to pull the entire dataset.
curl https://{subdomain}.zendesk.com/api/v2/incremental/tickets.json? \
start_time={unix_epoch_time} -v -u {email_address}/token:{api_token}
This endpoint returns tickets and their associated audit events, which can include SurveyResponseSubmitted
. Each survey response submitted event should have a survey_response_id
that links to a specific survey response. Example:
{
"tickets": [
{
"id": 123,
"subject": "Issue with product",
"status": "open",
"updated_at": "2024-01-01T12:00:00Z",
"audit_events": [
{
"id": 456,
"type": "Comment",
"body": "Please assist with resolving this issue",
"author_id": 789
},
{
"id": 11654650767636,
"type": "SurveyResponseSubmitted",
"assigned_user_id": 123123,
"assigned_group_id": 30768,
"survey_response_id": "01J8M766YV6FTKCCBQ0Z85YND5",
"survey_type": "CustomerSatisfaction"
},
]
},
...
]
}
Using the Show Survey Responses endpoint to extract survey responses
Once you get survey_response_id
from the ticket events, you can use the Show Survey Response endpoint to get detailed feedback from that survey.
curl https://{subdomain}.zendesk.com/api/v2/survey_responses/ \
{survey_response_id} -v -u {email_address}:/token:{api_token}
Example:
{
"survey_response": {
"id": "01J8M766YV6FTKCCBQ0Z85YND5",
"expires_at": "2024-08-14T12:00:00.000Z",
"survey_id": "01J58KJ9RAE0D2EK7HRVM7Z8F2",
"survey_version": 1,
"answers": [
{
"created_at": "2024-08-14T12:00:00.000Z",
"question": {
"alias": "customer satisfaction rating",
"headline": {
"key": "dc.surveys.customer_satisfaction.questions.rating",
"type": "dynamic",
"value": "How would you rate your experience?"
},
"id": "01J1WBE8QR0YQVE373K2JDJR0F",
"options": [
{
"label": {
"key": "dc.surveys.customer_satisfaction.question.rating.options.bad_rating",
"type": "dynamic",
"value": "Bad"
},
"rating": 1
},
{
"label": {
"key": "dc.surveys.customer_satisfaction.question.rating.options.good_rating",
"type": "dynamic",
"value": "Good"
},
"rating": 2
}
],
"sub_type": "customer_satisfaction",
"type": "rating_scale_numeric"
},
"rating": 1,
"rating_category": "bad",
"type": "rating_scale",
"updated_at": "2024-08-14T12:00:00.000Z"
}
]
}
}
Integrating the data
With both the ticket information and detailed survey responses, you can perform analyses, such as linking customer satisfaction scores directly to specific ticket handling times, root cause analysis, or agent interactions.
You can also identify customers who provided low survey ratings and had unresolved or problematic tickets. You can follow up with these customers to address their concerns and improve their experience.
Automation and regular updates
If you have a high volume of tickets, consider using automation. For example:
- Automate the API calls and data processing using a script or a server-side application.
- Schedule these scripts to run at regular intervals, such as every 24 hours, aligning with the
start_time
parameter based on the last successful fetch. - Store results in a database for historical tracking and trend analysis.