While embedding surveys in solved ticket trigger notification emails within Zendesk is a common practice, utilizing event-based emails offers greater control over the email content and enables the implementation of suppression rules to avoid over-surveying customers.
Create a survey
Start by creating a new survey.
Choose the Direct email delivery option followed by the Event-based option.
Customize your email content according to your specific needs.
Personalize the intro and outro text using tags for customer name, team member name, ticket ID, and subject.
Configure follow-up emails to send to non-responders, aiding in improving response rates.
Configure delivery rules
Under the Delivery tab, you can configure both Suppression and Delay rules.
Suppression helps in limiting the frequency of emails to ensure that each customer only receives one survey within a set timeframe.
Delay sets the time in hours to hold off sending the email after the trigger is activated.
Create a new webhook in Zendesk
Navigate to Apps and integrations > Webhooks in Zendesk. (See Zendesk's documentation on webhooks)
Create a new webhook and select the Trigger or automation option.
Name it something descriptive like "Simplesat event-based email survey."
Copy the endpoint URL from your Simplesat account and paste it into the Endpoint URL field in Zendesk's webhook settings.
Choose API key as the authentication option and enter
X-Simplesat-Token
for the Header name. The Value is your Simplesat account key, available in your Simplesat Account settings.
Testing the webhook
Copy the response body in Simplesat, remove the comments, and paste it into Zendesk's Request JSON Body field.
Look for a
200 OK
message to confirm success; if it fails, double-check the JSON body and authentication details.
Create a Zendesk trigger
Navigate to Objects and rules > Triggers in Zendesk.
Add a new trigger with a condition of
Ticket status
>Change to
>Solved
.
Add an action with Notify active webhook and select the previously created webhook.
Paste the Request body from Simplesat into the JSON body field, replacing the sample values and removing any comments.
You can use the pre-built code below that works within Zendesk, adding any custom attributes necessary.
{
"customer": {
"name": "{{ticket.requester.name}}",
"email": "{{ticket.requester.email}}",
"company": "{{ticket.organization.name}}",
"custom_attributes": {
"Plan": "ticket.requester.custom_fields.1234"
}
},
"team_member": {
"id": "{{ticket.assignee.id}}",
"email": "{{ticket.assignee.email}}",
"name": "{{ticket.assignee.name}}"
},
"ticket": {
"id": "{{ticket.id}}",
"subject": "{{ticket.title}}",
"custom_attributes": {
"group": "{{ticket.group.name}}"
}
}
}
Save the webhook!