How the Survey app link and token work

Overview

The Survey App integrates seamlessly with Zendesk to collect feedback through surveys sent to customers. To ensure that the survey link functions properly, a unique token is added to each ticket. This article explains the process of generating the survey link and the role of the token.


How the survey link and token work

1. Token generation process

  • When a ticket is created in Zendesk, SweetHawk servers are automatically notified of the new ticket.

  • Within approximately 5-10 seconds, the server updates the ticket by adding a unique token.

  • This token is required for the survey link to work. Without it, any survey link generated will show an error message such as "Survey expired."

2. Why the token is necessary

The token serves as an identifier that validates the survey link. Without the token, the link will be invalid, and the recipient will not be able to access the survey. This mechanism ensures that survey responses are tied to the correct ticket and prevents expired or invalid links.


Best practices for sending surveys on tickets

Manual testing and sending surveys

When manually creating tickets and sending survey links, follow these steps:

  1. Create the ticket: Begin by creating the ticket in Zendesk.

  2. Wait for the token: Wait approximately 10 seconds to allow the server to update the ticket with the token.

  3. Verify the token: Open the events log of the ticket to confirm that the token has been added. You should see an event indicating that the ticket was updated with the token.

  4. Send the survey link: Once the token is confirmed, proceed to send the survey link.

Automated ticket creation and survey sending

If you're wanting to create a ticket and instantly send a survey, or you're using an automated process to create tickets and send surveys (for example, using our Recurring tickets app), you need to ensure the token has been added to the ticket before the survey is sent. There are a couple of ways to delay this until the token is added.

  • Using the Timers App:

    • The Timers App can delay sending the survey link by 30 seconds until the token has been added to the ticket.

  • Using Zendesk automations:

    • You can configure a Zendesk automation to check for the presence of the token and then send the survey link. This will mean that the ticket will need to exist for about 1 hour before the surveys will actually be sent. 


Summary

To avoid issues with survey links, it is important to understand that:

  • The survey link requires a token to function.

  • The token is automatically added within 5-10 seconds after ticket creation.

  • Ensure that the token is present before sending the survey.

By following the best practices , you can efficiently handle the survey link generation process and avoid errors.


Was this article helpful?
0 out of 0 found this helpful