Recent searches
No recent searches
Restricting Satisfaction Surveys by Date
Posted Oct 03, 2017
Introduction
Customers with many tickets can become overwhelmed with satisfaction surveys. This frustrates the customer and can lead to invalid satisfaction metrics. This guide will show how to suppress a customer's notifications after a recent survey.
The inspiration and code comes from Moderator Joel Hellman. The typos are all mine.
Method
To capture the last survey date, create:
- A user field to hold the notification date value
- An Webhook to populate the user field with a date
To suppress notifications:
- Create a new automation offering satisfaction without a notification
- Change the standard automation to record the satisfaction notification date
- Order your automations to ensure the new automation fires before the standard automation
Custom date field
Go to Admin>Manage>User Fields and create a new date field, 'Last Satisfaction Date'.
Ensure you have a field key value, 'last_satisfaction_date'. The Webhook will use this.
Webhook
Go to the Admin Centre>Apps and Integrations>Webhooks.
Use the Action menu to create a new Webhook
Title: PUT API/ Users/Ticket Requester ID
URL: https://YOURURL.zendesk.com/api/v2/users/{{ticket.requester.id})
Method: PUT
Content type: JSON
Ensure you replace YOURURL with your own Zendesk.
For authorisation, tick the Basic authentication box. Enter an administrator's email address and password or create an API token.
The screen may look like this:
Create a new customer satisfaction automation
Go to Admin>Business Rules>Automations. Find your automation that sends satisfaction notifications. The default is 'Request customer satisfaction rating (System Automation)'. Clone this automation.
Rename the cloned automation to 'Customer satisfaction rating (Notification recently sent)'. Here is an example of the conditions.
Here the automation will fire if the ticket is not closed, has been solved for an hour and the satisfaction rating is not offered.
Add a further condition to check when satisfaction was last offered by email.
The trigger will now only fire if the satisfaction notification was sent in the last week.
In the Action section, remove the notification action. An action is still need to offer satisfaction to allow the customer to rate the ticket in the Help Centre.
For reporting, you can add a further action adding a tag to the ticket. You can then use Insights to track the impact of suppressing notifications.
Change the standard automation
Go to Admin>Business Rules>Automations and edit the standard satisfaction automation. Add a new action to notify target and select the 'PUT API/User/Ticket Requester ID' created earlier.
In the JSON body, paste the code:
{
"user":{
"id":{{ticket.requester.id}},
"user_fields": {
"last_satisfaction_date" : "{{ 'now' | date: '%Y-%m-%d' }}"
}
}
}
The action should look like this:
Order your automations
Ensure this new automation appears before the standard automation. Select 'Reorder page' from the more actions menu. Drag the new automation above the system automation.
Customers with a recent notification can rate their tickets in the Help Centre.
Customers without a recent notification will receive a new satisfaction survey notification. The user account custom date holds the last notification date.
0
44 comments
Jessie Schutz
Thanks for posting this, Graeme! I know that lots of folks will find this helpful!
1
Heather Rommel
This is incredible! Thank you!
0
James Rago
This is good. My troubles is that I do not want to offer satisfaction at all if they already rated a ticket within lets say 5 days. In order to do this I think I would scrap the 1st automation and only do the normal one, but add the http target in the perform. My issue is that the condition on the Last Satisfaction Date need to be "NOT within the previous x days". Effectively it would mean if more than 5 days has passed since you were offered, then I want this automation to fire.
Any thoughts on how to accomplish this?
1
Thomas D'Hoe
James, Thanks!
I need also the same thing as you!
1
Joel Hellman
Hi James and Thomas. Ah that missing condition *tears hair out*. It's certainly a very frustrating oversight by Zendesk when working with automations.
Regardless of the outcome, you might want to add your voice to this product feature request to fix that:
Anyway, I have the same approach you request, in that I don't offer CSAT at all if the last CSAT on the customer was too recent. But it's awkward to set up. The solution we presented here is much more straight forward and easier to adopt.
I won't go into the details but - if you want to go the prevent-CSAT-being-offered route - what I do is a bit different:
Maybe an illustration from my triggers adds some context.
The last trigger will trigger the CSAT firing, but if any of the skip check triggers matches before that, it will not get fired. (Again, the automation only adds a tag on Solved tickets in the time span for a CSAT, to start this trigger loop)
Some reasons we don't present this alternative approach is that much harder to explain and more prone to mistakes if not set up correctly.
The version we present here also has the benefit it lets customers rate the tickets on the Help Center if they want, which is pretty neat. (One downside: the satisfaction response rate will be a bit off. )
0
James Rago
Joel,
What you have done is amazing. I was wondering if you might have some time to have a 1 on 1 discussion about the specifics? I too have a very convoluted trigger set up similar to yours since we use a 3rd party satisfaction software called Customer Thermometer. I would like to share with you what I current do as well in GoodData base don reporting and get your thoughts on how to get a working solution as you have built.
Any thoughts on how we can connect?
0
Nadia De Vriendt
We have a similar process in place, but it requires a lot less triggers. We do leave tickets on 'solved' longer than the default in zendesk though. But it'll depend on your cooldown period, I guess.
(https://www.checkmarket.com/kb/how-to-add-a-cool-down-period-to-the-survey-sent-via-zendesk/)
Add a custom user field in Zendesk
First add a custom user field to your Zendesk:
Add a new automation
This automation will make sure that the Send survey? field is set back to “Yes” after the cool-down period. That way a new survey invitation can be sent when the requester contacts your support team again. And the ticket can finally be closed as this will be the final action to take on it.
Add a new trigger
This trigger will recognize when a survey is NOT sent. That way you can recognize these tickets and close them faster.
Edit 2 existing automations
1.”Send survey 24 hrs after ticket is solved”
You need to add a few additional conditions and actions so that the survey is no longer sent for each ticket that is set to “Solved”.
2. Close ticket 24 hours after it’s set to “Solved”
Automations will only fire for tickets that are less than “Closed”. That’s why you’ll need to tweak this automation a bit.
This one is specific for people who send their satisfaction survey with CheckMarket, but I'm guessing it would work for other external software as well.
0
Jessie Schutz
Hi Nadia! Thanks for sharing your set up with us!
If you're willing, it would be awesome if you added this as a new post here in Tips & Tricks. This will help your fellow members find it, plus you'll be featured in our Community Roundup and get swag. :)
0
Nadia De Vriendt
hi Jessie, just did, thanks for reminding me :-)
0
Sheldon Dickinson
Hi Graeme,
I was about to disable CSAT until I saw this.
I've just tried testing, but seem to be getting the below error. Would you have any insight on this?
0
ZZ Graeme Carmichael
Sheldon
Glad you have not given up on CSAT. Can you paste a screenshot of the JSON part of your trigger? It may just take some fresh eyes to spot the problem.
0
Thomas D'Hoe
Hi everyone,
Could it be that the automatisation "notification recently sent" doesn't works when you have 3 surveys for the same customer on the same day?
I have an example where the survey question was sent for 3 ticket to the same customer on the same day.
As you can see in the screenshots, the "last satisfaction date" was on 26 March 2018.
I have 3 ticket examples where the automatisation for survey was fired on that date (26/03/2018)
One.
Two.
Three.
Normally my automatisations are correct:
=> ask for survey
Notifaction recently sent:
Overview:
Can someone help me? Thanks!
Thomas
0
ZZ Graeme Carmichael
Thomas
Can you please check if there has been any API failures on the earlier tickets. If the API failed, then for earlier tickets, the user custom field may not have held the expected date.
Go to Admin>Channels>API and check the Target Failures tab.
0
Thomas D'Hoe
Indeed, there where some problems.
0
EdgeStar Support
Hi - I am wondering if anyone can help with JSON for a future date. Specifically, I am less concerned about when the last satisfaction was sent and more interested in when the next satisfaction might be sent. I was hoping that the JSON referenced above could be 'now' + 30 days but I am unsure how to alter the JSON body correctly. Any ideas? Thanks!
0
ZZ Graeme Carmichael
James
You need to use a bit of crazy maths to add days to the date. So, as everyone knows, there are 86,400 seconds in a day. So to add one day, you will use:
"last_satisfaction_date" : "{{ 'now' | date: '%s' | plus:86400 | date: '%Y-%m-%d' }}"
And to add 30 days you need 30 x 86400 =2,592,000
"last_satisfaction_date" : "{{ 'now' | date: '%s' | plus:2592000| date: '%Y-%m-%d' }}"
If you are testing this, you may need to refresh your browser (CTR F5) to see the updated value in the custom field.
0
EdgeStar Support
Graeme - Thank you!!! Worked like a charm. I really appreciate the help.
0
Emilie Duveau
Hello Graeme,
Thanks for the example, it really fits our need.
However, I have the same error Sheldon got (but I can't find an answer on how to fix it).
I send this JSON:
and I have this result:
The update is correctly done for the field "test_trigger" which is a text field.
If I hard-code the date, the "last_modification_date" field is correctly updated.
Any idea about what I miss here?
Thanks a lot!
0
ZZ Graeme Carmichael
Emilie
I am not sure how you custom fields are updating without the specifying the user in your JSON.
I would expect to still see the line with:
"id":{{ticket.requester.id}},
0
Emilie Duveau
Graeme,
I call the URL https://myzendesk.zendesk.com/api/v2/users/userID.json.
It updates the given end-user. It perfectly works like this for the update of the field "test_trigger".
Thanks.
0
ZZ Graeme Carmichael
Emilie
That makes sense Try a copy and paste of the liquid date code to a macro or use in a test ticket. It could be a bad space or the wrong quote character.
This works for me....
{{ 'now' | date: '%Y-%m-%d' }}
0
Emilie Duveau
Graeme,
It worked when I didn't copy/pasted it directly from this page - good to know!
Thanks a lot!
0
Stacy Win
Graeme,
I'm hoping you can help me. I believe your HTTP target solution could help me with a similar use case. I cannot seem to get the JSON to work.
Use Case: the support supervisor would like the date the survey was responded to added to a ticket field. So they don't have to search for it. Out of the box to find the survey response date, one has to change the conversation to events and then scroll through the events and find the specific survey event. Instead, they would like a field added to the ticket that houses this information.
I created two custom fields for this information. One field with the type Date, and the other field with the type Text.
I wrote the JSON code two ways. One way was trying to get the Satisfaction Rating Date stored in Zendesk. The other way was using the timestamp method you provided for when the automation ran. This wouldn't be the exact time but it would pit would be a close estimate, as the time stamp would be within the hour of the survey submission.
The JSON sets the ticket status to open and should populate the custom field. What happens is the ticket status is updated but I cannot get either of the custom fields to populate. Can you please shed any light on changes I need to make to get the date populated?
0
ZZ Graeme Carmichael
Stacy
Rather than using the custom field ID number, can you try the field key?
0
Stacy Win
Graeme
So we want the field placed on the ticket, not the user. So it is a custom ticket field. I don't see a field key on custom ticket fields. So I don't believe this is a change I can make.
Stacy
0
ZZ Graeme Carmichael
Stacy
Ah, I don’t have access at the moment. Let’s see if someone is available to help. ;)
0
ZZ Graeme Carmichael
Stacy
I was able to set the ticket date field.
First create your HTTP target with:
URL: https://YOURDOMAIN.zendesk.com/api/v2/tickets/{{ticket.id}}.json
Method: PUT
Content Type: JSON
In your trigger, the JSON will be:
...which just mirrors your code with the closing bracket on line 11.
If this fails, you can go to API>Target Failures and check if a recent HTTP client call failed. This will give a clue as to the problem.
When testing, after you update the ticket and the target fires, you may need to refresh your browser to see the updated custom field value. Alternatively, close the ticket tab and re-open it again.
Please note that updating ticket fields in this way is not recommended or supported by Zendesk as it can cause technical problems.
Hope that helps.
0
Stacy Win
Thanks. I still cannot get the field(s) to populate. I refreshed the browser and still nothing.
There are no API error messages as the code runs, the status is switched back to open, the satisfaction score date field just isn't getting populated.
As this solution is not recommended by Zendesk, I'll call it quits on this. I'll let the business know there is no solution for their ask.
0
Tim McMacken
Hi,
I can not seem to get the HTTP target to work. I am getting the following error in the API Target Failure log:
{ "error": "Couldn't authenticate you" }
I think this is related to the fact that we use Google to sign into our zendesk rather than a standard email and password. In the how-to for this article is listed that we could use an API Token to authenticate, but I can not find where to enter the token I generated. Could someone point me in the right direction for entering the API Token?
Thanks,
Tim
0
Olala Homes - System message
Hi Tim
Did you get this solved?
I have got very same issue here.
Thanks!
0