Search search
Help sections

API token for Zendesk

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


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 [ ... ].



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

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.


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 and [3] Attribute name.
  6. Press [4] Submit button.

    extensions configuration

  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.