Search search
Help sections
FAQ

API token for Zendesk

This feature will allow you to automatically add an email and other selected information from Zendesk to SurveyLab and then basing on this information customize and send a survey.

SURVEYLAB


STEP 1. Generate and get access to SURVEYLAB API TOKEN

  1. Go to account S Settings.
  2. Go to Integrations.
  3. Go to SURVEYLAB API TOKEN section and press RESET API TOKEN button.
    API Token

STEP 2. Create and set up survey collector

  1. Go to your survey list and select survey and press [C] COLLECT RESPONSES button.
    Survey list
  2. Press + ADD COLLECTOR button.
    Add collector
  3. Enter the collector name.
  4. You can select between Email and Email embedded (single question).
  5. Press SAVE button.

STEP 3. Get API connector URL

  1. Go to your survey collector.
  2. Press [S] SETTINGS button.
    New collector
  3. Press API link button.
  4. Copy selected survey link and replace information in brackets [ ... ].

URL structure

https://www.surveylab.com/api.php?apiToken=[TOKEN]&cId=[COLLECTOR ID]&email=[DYNAMIC RESPONDENT EMAIL]&crk=[DYNAMIC CRK DATA]&referrer=[DYNAMIC RESPONDENT DATA]&language=[DYNAMIC LANGUAGE]

Example

https://www.surveylab.com/api.php?apiToken=yadfhjs&cId=8379821739721&email={{ticket.requester.email}}&crk={{ticket.id}}&referrer={{ticket.url}}&language={{ticket.requester.language}}

  Description Example
apiToken API token generated in SurveyLab. yadfhjs
email Email on which system will send survey. email={{ticket.requester.email}}
crk Response Key (must be unique). crk={{ticket.id}}
refferer Any kind of information. referrer={{ticket.url}}
language Survey language. language={{ticket.requester.language}}
custom1 Custom information. custom1={{ticket.id}}
custom2 Custom information. custom2={{ticket.id}}
... ... ...
custom8 Custom information. custom8={{ticket.id}}
 

NOTE. Pair of email and crk must be unique per Collector, it means that with the above example URL setting you can have only one survey response for each ticket. If you need more than one response per ticket then crk value must be more complex and contain additional data that will make it unique.


ZENDESK


STEP 4. Set up Extensions in Zendesk

  1. Log into Zendesk and go to Admin panel.
    Zendesk Admin
  2. Go to Extensions.
  3. Press add target button.
  4. Select URL target ».
  5. Set [1] Title, [2] URL target (URL that you have copied from surveylab.com) and [3] Attribute name.
  6. Press [4] Submit button.

    extensions configuration

NOTE. URL
  1. When you copy / paste chunks of URL (for example API token) it is important to check for extra spaces that may be added by Zendesk.
  2. It is important to use the suggestion feature for Zendesk variables.
  3. Zendesk suggester only works when you add each variable after the previous one, so you can't add a variable to the end of URL and then to its beginning.
 
NOTE. Submit / testing
  1. Default action of "submit" is to send test ping to API URL, when it is done right a test email should be visible on your collector contacts list (eg. [email protected]).
  2. If you tested properly then switch the "submit" action to Create target using previously added extension.

STEP 5. Set up Triggers in Zendesk

  1. Go to Triggers.
  2. Press Add trigger button.
  3. Enter trigger name.
  4. In Meet ALL of the following conditions press Add condition button and select Status | Is |Solved.
  5. In Actions, press Add action button and select Notify target | SurveyLab survey.
  6. Enter Message.
  7. Press Create button.
triggers configuration

NOTE. Please remember that Zendesk trigger message can't be empty.

* Functionality is available in the Professional and Enterprise plan.