Restricting Satisfaction Surveys by Date



image avatar

ZZ Graeme Carmichael

Community Moderator

已于 2017年10月03日 发布

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

46

46 条评论

Hi Diana,

The Requester: Last Satisfaction Date field is not natively listed as one of the Conditions or Actions in creating an Automation. As stated above, you will have to create a new/custom date field by following the full instructions above in order for this date to show up in the dropdown option for Conditions or Actions.

Hope this clears it out. Cheers! :)

0


I'm not seeing the "Requester: Last Satisfaction Date" field in the automations dropdown. Was this removed??

0


Hey Dominic,

I'm going to create a ticket on your behalf so our Customer Care team can look into this error with you.

You'll receive an email shortly stating your ticket has been created.

Cheers!

-1


Hi, 

My message is a longshot as this thread might not receive attention after 2-3 years, but it's work a shot:

My target failure is 401, it says "error": "Couldn't authenticate you"

I have checked in the API and it says  HTTP client call failed.

Any ideas what the problem could be?

Kindly,

Dominic 

 

0


Tim McMacken and Morvan le boulanger, I had the same problem last week where I was creating an HTTP target, and got back status HTTP 401 Unauthorized with { "error": "Couldn't authenticate you" }. I solved it (with help from Zendesk support) as follows: In the target settings where you put in your email address, add the string "/token". Where you put in your password, paste in your token.

We use SSO to sign into Zendesk, so not sure if this solution would apply to everybody.

0


Hey Morvan,

If you're using Google Sign-in then you'll still want to set up a native Zendesk password you can use for this target. To set up a native Zendesk login, navigate to subdomain.zendesk.com/access/help and enter your email address to trigger a password reset email.

You'll replace subdomain with the actual subdomain of your Support account.

I hope this helps!

0


Hi Tim

 

Did you get this solved? 

 

I have got very same issue here.

 

Thanks!

0


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


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


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


登录再写评论。

找不到所需的内容?

新建帖子