The main thing that the Survey app's code snippet does is to place some HMTL into your trigger to ask for a score from 0 - 10. Simple right? Well not exactly, there's a little more to it than that...
In order to make sure a customer can only rate their own tickets (ie. the rating is secure), the survey app stores a user token on an invisible user field. The way that it does this is that when a ticket gets created or updated, the survey app will check the user and make sure they have a token. If they don't, then at this point it generates one and adds it to the user.
So when the survey is sent, the magical code snippet (as discussed in this article) pulls in that token and uses it as part of the link so that SweetHawk servers know what ticket is being rated and who is rating it.
The thing to note here is around how a user is assigned a token. As mentioned above, this takes place on any ticket update. But, if the first update of the ticket triggers the survey to be sent (eg. you create a ticket and mark it solved at the same time) then the app has not had enough time to grant the token, and so the survey element will not be shown in the email.
This is also something to consider when you first start using the app, since you'll have a lot of tickets in all different states. For some of them, the very next update will be the automation that sends the survey. So, in order to help make the transition smoother, we've added a rule into the code snippet that essentially says, "If the user does not have a token, then send the regular Zendesk satisfaction survey." The regular CSAT survey won't push any data into the survey app, but it will keep your email from not making any sense :-) ...OR, if you'd like to avoid the regular CSAT appearing on any ticket update, then a workaround might be to run a global automation workflow that adds a tag to every ticket in a less than solved state, and then removes it the next hour - if this sounds like something you'd like to try and you're not sure how to go about it, email us at email@example.com and we'll give you a hand.