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:
- Create the ticket: Begin by creating the ticket in Zendesk.
- Wait for the token: Wait approximately 10 seconds to allow the server to update the ticket with the token.
- 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.
- Send the survey link: Once the token is confirmed, proceed to send the survey link.
Automated ticket creation and survey sending (using Power Actions)
If you're creating tickets automatically and want surveys sent as soon as the survey token is added, you can use Power Actions to do this.
Using Power Actions
Configure a Power Actions trigger with:
Trigger condition:
When the “Survey Token” field is present on the ticket.Action:
Apply a comment that includes the survey link/token.
Using Power Actions for this is important because it lets you set who the comment is authored by.
A standard Zendesk trigger could also send a notification when the token appears, but those replies come from the generic “auto-reply” identity - impersonal and not ideal for customer-facing survey requests.
Power Actions, on the other hand, posts the survey comment as a real agent, giving it personality.
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.