Skip to main content
All CollectionsIntegrationsZendesk
How to trigger customized surveys from Zendesk
How to trigger customized surveys from Zendesk

Triggered customized Wootric surveys from Zendesk using incoming webhooks and custom properties

Kayla Hord avatar
Written by Kayla Hord
Updated over a year ago

NOTE: You must be an admin or an agent in a custom role with permission to create webhooks in Zendesk to complete this setup.

Additionally, if you do not see Zendesk as an option, it means this feature is not currently enabled for your account. Please contact us to enable this feature.

Choose a section below to jump directly to the step where additional support is needed or start at step 1 for a complete walkthrough.

Step 1: Enable the Zendesk Trigger in your InMoment Dashboard

Log into the InMoment dashboard that you would like to set up a Zendesk Trigger for, click into Settings >> Trigger Surveys (left-hand menu) >> Trigger surveys from Zendesk >> "set up"

Scroll to the bottom of this page and click "enable".


Step 2: Setting Up Your Zendesk Webhook

  1. Once you have enabled the Trigger in the step above, copy the Webhook URL that corresponds to the survey channel of your choice.

  2. In a new window or tab, open your Zendesk Dashboard >> Access Your Admin Panel >> Apps and Integrations >> Webhooks and click "Create Webhook".
    For additional support check out this Zendesk Support Article on how to create webhooks.

  3. Paste the Webhook URL that you copied from the InMoment dashboard into the Endpoint URL field. Set the Method to "POST" and the Request Format to "JSON"

  4. Once you have completed that, click "Test webhook". A panel will open on the right-hand side for you to utilize in Step 3 below.

Step 3: Testing + Creating Your Zendesk Webhook

  1. In the right-hand panel, "Test webhook", from step 2, set the Test Event Source to the Custom Test option in the drop-down menu.

  2. To populate the Request JSON Body field in the Zendesk webhook testing panel, copy + paste the Sample JSON body below.

    {
    "emails" : your@email.com,
    "subject" : "Sample subject",
    "intro" : "Sample intro",
    "email_delay": 0
    }

    Note: in this help article, our examples are showing the most commonly used channel by our customers for this trigger setup - email. For reference JSON with SMS please see the FAQ at the bottom of the article.

  3. Replace "your@email.com" in the sample JSON body with your email.

  4. Click "Send Test". To confirm your webhook is working, expect to receive a response code 200 OK.

  5. Check your inbox to verify that the test email survey arrived. Once verified that the webhook works properly and you received the sample survey, hop back into the Zendesk Webhook Setup tab and click "Create" at the bottom of the Test webhook panel.

Step 4: Set Up Your Zendesk Trigger

  1. Once you have created your Zendesk Webhook, navigate to your Zendesk Admin Center >> Business Rules >> Triggers


  2. Select Add Trigger. Fill in the name and description.

  3. Scroll down to the "Actions" menu. Select the drop-down option Notify active webhook >> Choose the webhook you created in Step 3.

  4. Paste the JSON you used in Number 2 of Step 3.

  5. To test, first enter your email address in JSON. When you are happy with your testing; you can send multiple emails, for example:

    { "emails": ["{{current_user.email}}","{{ticket.requester.email}}"] }

  6. Press "Create".

Step 5: Passing Properties from Zendesk

If you want to pass properties in to Wootric to create a dashboard filter, be sure to include the "key" : "value" pairs in your trigger's JSON body.


Important: You can pass up to 5 properties. Contact Wootric if you need to pass more.

  • To add properties, in Zendesk navigate to Triggers >> Choose Your Trigger >> JSON Body >> Follow steps below

The property format is:

"property_name": "value"

Check out the different property types and their dashboard behavior here.

Note: For any "_date" properties, we only accept dates in UNIX 10 Digit timestamp format.

You can also use a Zendesk placeholder as a property value. In the example below, we will include the Ticket ID and date as properties. To find available placeholders in your Zendesk instance, scroll down to "Actions" >> View available placeholders

Important: If you are planning to send your CSAT response data from Wootric back to Zendesk, ticket_id will be a required property for that to work properly.

{
"emails" : "{{ticket.requester.email}}",
"subject" : "Please, give us your feedback on ticket #{{ticket.id}}",
"intro" : "Please, give us your feedback on ticket #{{ticket.id}}",
"ticket_id": "{{ticket.id}}",
"Year_date": "1512000000"
}

Step 6: Email Survey Customization

With email surveys, you can customize the "subject", "intro", "email_delay" and "survey_settings". The email delay is in minutes.


The "survey_settings" is an object that can contain these values:

  • language

  • audience_text

  • product_name

  • custom_messages

Note: If you will need to send your survey in multiple languages, please review these additional instructions to ensure proper setup.

custom_messages is also an object that can contain the following values:

  • promoter_followup_text

  • promoter_thank_you_link_text

  • promoter_thank_you_link_url

  • promoter_thank_you_main

  • promoter_prompt_text

  • passive_followup_text

  • passive_thank_you_link_text

  • passive_thank_you_link_url

  • passive_thank_you_main

  • passive_prompt_text

  • detractor_followup_text

  • detractor_thank_you_link_text

  • detractor_thank_you_link_url

  • detractor_thank_you_main

  • detractor_prompt_text

Here's an example of all customizable parameters:

{
"emails" : "your@email.com",
"subject" : "This is the email's subject. It can contain placeholders like {{ticket.id}} or {{agent.name}}",
"intro" : "This is an intro message.",
"survey_settings" : {
"language" : "EN",
"product_name" : "Examply",
"audience_text" : "a colleague",
"custom_messages" : {
"promoter_followup_text" : "Thanks for your feedback! Would you please tell us about your experience?",
"promoter_prompt_text" : "What did you like the most?",
"promoter_thank_you_link_text" : "Join our referral program!",
"promoter_thank_you_link_url" : "https://examply.com/referrals",
"promoter_thank_you_main" : "Thanks for your feedback!",
"passive_followup_text" : "Thanks for your feedback. How can we improve?",
"passive_prompt_text" : "Help us improve!",
"passive_thank_you_link_text" : "Return to our Support Center",
"passive_thank_you_link_url" : "https://examply.com/support",
"passive_thank_you_main" : "Thank you for your feedback!",
"detractor_followup_text" : "Thank you for your feedback. How can we improve your experience?",
"detractor_prompt_text" : "Please tell us how we can do better.",
"detractor_thank_you_link_text" : "Return to our Support Center",
"detractor_thank_you_link_url" : "https://examply.com/support",
"detractor_thank_you_main" : "We hear you. Thank you for your feedback!"
}
}
}


  1. To start, first navigate to Triggers >> Your Trigger >> Scroll Down to Actions >> "View Available Placeholders". Copy the placeholder of your choice.

  2. Enter the available placeholder in brackets {{ example.placeholder }} into the desired location of your JSON body.

  3. For further customization, such as adding a Zendesk placeholder to your survey question, enter the placeholder in the "product_name" of the JSON body, like below:

    {
    "emails" : "your@email.com",
    "subject" : "This is the email's subject. It can contain placeholders like {{ticket.id}} or {{agent.name}}",
    "intro" : "This is an intro message.",
    "survey_settings" : {
    "language" : "EN",
    "product_name" : "{{ticket.assignee.first_name}}"
    }
    }

    Note: When customizing your survey question with a Zendesk placeholder using the "product_name" key as outlined in the code above, the "product_name" text within your Wootric Dashboard survey customization (Wootric Dashboard >> Settings >> Customize Survey >> Step 1) will be overridden. For CSAT Surveys, the "product_name" text is any text following "How was your experience with".

  4. Leave "Customize entire question" unchecked in your Wootric dashboard survey setup.

    • When using the "product_name" key to customize your survey question in ZenDesk we recommend to input {{PRODUCT_NAME}} in the Wootric dashboard survey question settings (Wootric Dashboard >> Settings >> Customize Survey >> Step 1). The placeholder keeps your team aware your survey question is customized in a Zendesk Trigger.

    Press Save.

    Important: Once you remove "product_name" or any other customizable parameters listed above from your JSON body in Step 3, your email survey will display as is saved in your Wootric Survey Dashboard.

  5. Navigate back to your ZenDesk Trigger. Save your new Trigger settings.

    Note: The above example shows what the survey would look like with
    "product_name" : "{{ticket.assignee.first_name}}" and is not utilizing our default CSAT scale of 1-5.

  6. You can also add text to the "product_name" field if you want to make it more specific:

    {
    "emails" : "your@email.com",
    "subject" : "This is the email's subject. It can contain placeholders like {{ticket.id}} or {{agent.name}}",
    "intro" : "This is an intro message.",
    "survey_settings" : {
    "language" : "EN",
    "product_name" : "the help you received from {{ticket.assignee.first_name}}"
    }
    }

    Note: The example above is not utilizing our default CSAT scale of 1-5.

FAQ:

How can I send the survey to the CCs of the ticket?
To retrieve the cc emails from the ticket, you can use ticket.ccs

If you want a specific trigger to only be sent to all the cc's of a ticket, you can iterate the ticket.ccs variable with Zendesk's Liquid markup and add those to the email  an array of the payload:

{
  "emails" : ["{% for cc in ticket.ccs %}'{{cc.email}}',{% endfor %}''"]
}

I'm setting up the survey to send via SMS/WhatsApp not Email. What needs to be different in my configuration?

When setting up for SMS/WhatsApp, the first step is always to work with our team to ensure your account is configured properly with an acquired phone number and proper company validation. Once that is complete, there are a few small differences in how you will need to configure your JSON payload inside Zendesk. All other instructions related to configuring the webhook, configuring properties/survey settings are the same as the email example above.

The example below captures the most common types of customizations with an SMS/WhatsApp implementation, namely:

  • passing a phone number

  • including a language variable for surveys sent in multiple languages

  • customizing the survey question with zendesk variables

{
"phone_numbers" : "17034515115",
"survey_settings" : {
"language" : "EN",
"product_name" : "the help you received from {{ticket.assignee.first_name}}"
}
}

Other Notes on phone number configuration:

  • Phone numbers should be in E.164 format
    e.g. 17034515115

  • Phone numbers that don’t accept SMS will be ignored.

  • At least one phone number that matches the end user country should be configured in your Wootric Settings. Otherwise the phone number will be ignored.

  • We accept a maximum of 30 phone numbers per request.

  • We will automatically create an end user with that phone number in our system if they don’t exist.

Did this answer your question?