All Collections
Integrations & API
Zendesk
Zendesk: Survey In-Channel via Link
Zendesk: Survey In-Channel via Link
Updated over a week ago

Survey In-Channel via Link

For some teams, sending surveys to customers via email after a ticket is solved isn't always possible. Some social or text (SMS) channel tickets don't have a customer email present, or client contact policies restrict contact with clients. To allow the most flexible sending options for our Zendesk integrated clients, we've built a feature that allows you to send a survey link inside of your Zendesk ticket automatically when the ticket is solved!

Enabling this feature is simple, but some basic configuration in Zendesk is required. In this article, we'll go over those configuration steps.

Step 1: Create Webhook in Zendesk

NOTE: If you've already set up a target for Stella Connect in Zendesk, you can skip this step and move on to setting up your triggers!

In Zendesk Admin, select Apps & Integrations -> Webhooks -> Actions -> Create Webhooks.

There will be a number of fields you'll need to fill in with the information below:

Note: Because we do not actually send surveys out when using your Test API Key, this integration requires that you use your Production API key to see survey links as public comments when your agent solves a ticket. You can add a condition to your trigger to help test - simply add Tags Contain At Least One of The Following surveylinktest or something similar. You'll add that tag to any test ticket you create to see survey links in action. When you're ready to go live, you can remove that condition from your trigger.

To test the configuration, select Test Webhook. In the dialog box that opens, paste this test JSON body, and then click Submit.

{ "customer": { "name": "liz", "email": "liz@stellaconnect.io" }, "do_not_send": true, "employee": { "email": "liz@stellaconnect.io" }, "channel": "phone" }

If the test is successful, you'll receive an HTTP/1.1 200 OK response.

When testing is complete, click Create at the bottom of the page to Create the webhook.

Step 2: Create Your Trigger

Next, we'll need to create a trigger in Zendesk that tells us when to send a survey. The conditions on your trigger will be the business rules you use to state which tickets are eligible for a survey link and when that survey link should be sent.

You'll need to know which channels your team uses to communicate with customers before setting up your trigger, and you should take some time to consider the conditions you set for your trigger, as well. Everyone's Zendesk instance and agent workflows are different!

In general, you can learn more about Zendesk triggers here!

Now let's get started!

To Create a Trigger:

  1. Click the gear icon in the left-hand side menu to access the Zendesk Admin panel

  2. Under the Business Rules section, select Triggers

  3. Click the blue Add Trigger button on the right-hand side of the screen

  4. You can name your trigger whatever you'd like, but we suggest being as specific as possible, so you'll know what the trigger does if you look back at it later! For example, we could call our new trigger "Deliver Stella Connect Survey via Link".

  5. Enter a description for your trigger. You can enter a description like "This trigger will send a Stella Connect survey link to the customer when an agent solves their support ticket".

  6. Now the fun part! Conditions! You can add conditions specific to your Zendesk setup and agent workflow, but we suggest at least adding the following conditions:

  • Ticket Status is Changed To Solved

  • Assignee is not -

  • Comment is Present, and Requester Can See It

  • Channel Is whichever channels you'll send survey links for

  • In the example below, my conditions state the ticket status has been changed to solved by the agent, that the tags on the ticket do not include stellaconnect_service_recovery, that there is a public comment visible by the requester when I solve the ticket, and the channel of interaction for the ticket is Twitter. You'll want to think about which tickets you do want survey links sent for, and which you do not. Conditions are very powerful, so with some tinkering, you can build a very sophisticated trigger!

7. Add an Action at the bottom of your trigger page. You'll want to select Notify Active Webhook and choose the name of your Stella Connect webhook.

Once you select your webhook, you'll see a field appear for a JSON body. We've provided the basic JSON template for you below. Remove the brackets Zendesk has in the text box and then simply paste this in:

For SMS Channel:

{ "employee": { "email": "{{ticket.assignee.email}}" }, "channel": "sms", "customer": { "name": "{{ticket.requester.name}}", "email": "{{ticket.requester.email}}", "phone_number": "{{ticket.requester.phone}}" }, "ext_interaction_id": "{{ticket.id}}", "do_not_send": "{{ticket.ticket_field_YOURCUSTOMFIELDIDHERE}}", "external_url": "{{ticket.link}}", {% assign raw_tags = ticket.tags | split: ' ' %}"tags": [{% for tag in raw_tags %}"{{tag}}"{% unless forloop.last %},{% endunless %}{% endfor %}], "deliver_via": "zendesk_support", "brand": "{{ticket.brand.name}}" "language" : "en"}

For Social Media Channels:

{ "employee": { "email": "{{ticket.assignee.email}}" }, "channel": "social", "customer": { "name": "{{ticket.requester.name}}", "email": "{{ticket.requester.email}}", }, "ext_interaction_id": "{{ticket.id}}", "do_not_send": "{{ticket.ticket_field_YOURCUSTOMFIELDIDHERE}}", "external_url": "{{ticket.link}}", {% assign raw_tags = ticket.tags | split: ' ' %}"tags": [{% for tag in raw_tags %}"{{tag}}"{% unless forloop.last %},{% endunless %}{% endfor %}], "deliver_via": "zendesk_support", "brand": "{{ticket.brand.name}}" "language" : "en"}

  • Make sure to replace the bolded placeholders in the JSON to match the channel and brand data specific to your trigger. The appropriate channel name which may be "email" or "facebook" or "twitter", for example. The channel must match one that exists within your Stella Connect account - your CSM will help to set up any custom channels you may need!

  • For the line referencing do_not_send, please make sure to paste in the ticket field ID number for your Do Not Send Stella Connect Survey checkbox!

Now you can Save and your new trigger is complete!

Additional Considerations:

  • Please make sure that for whichever channel you are planning to send surveys via link, there are no existing triggers that will also send Email surveys for the same tickets. You'll want to check each of your existing Stella Connect triggers if some already exist, and ensure that you're correctly specifying for which channel Email surveys should go out and for which link surveys should go out.

  • Channels for which agents need to solve a ticket at a later time (like Zendesk Chats, for instance) may not be a great use case for this feature, as the customer will have already left the chat before the ticket is solved.

  • Currently, we can only report on deliverability metrics by channel, not by delivery method.

  • In order for Zendesk to automatically redact the survey link so that is not visible/clickable for your agents, you'll need to enable the Zendesk feature Agents can delete tickets. This is a Zendesk limitation, and unfortunately, we are not able to work around it. If you decide that you do want survey links redacted so that agents cannot see the link or fill out the surveys themselves, please note that redaction can take up to a few seconds. Again, this is a limitation of Zendesk's redaction functionality.

Did this answer your question?