Service recovery in Zendesk
Service recovery integration creates follow-up tickets in your Zendesk instance when a Medallia Agent Connect survey response meets specific criteria. For example, if your criteria for a follow-up is a survey with 3 or fewer stars and includes a comment, Medallia Agent Connect creates a follow-up ticket in Zendesk whenever a Team Member receives a 1-star, 2-star, or 3-star survey response and a comment.
When the service recovery follow-up ticket is created in Zendesk, Agent Connect adds the stellaconnect_service_recovery tag to the ticket. Consider using this tag to create a View in Zendesk for organizing your Service Recovery workflow.
Work with your Agent Connect Client Success Manager to build an integration that meets your team's needs and objectives.
Creating a webhook for service recovery
Create a webhook that enables Zendesk and Agent Connect to share JSON-formatted information. The service recovery integration requires sending requests to a different Agent Connect API endpoint than the webhook used for survey integrations. When your team solves a follow-up ticket, your service recovery trigger (see Creating a trigger for service recovery, below) sends a request to the webhook, which sends a service recovery survey to your customer.
For more information about creating service recovery surveys in Agent Connect, see Service recovery.
- In Zendesk, open Apps & Integrations > Webhooks > Actions, and then click Create Webhook.
- Configure the following fields, as described below:
- Title — Agent Connect Service Recovery
- Endpoint URL — https://api.stellaconnect.net/v1/recoveries
- Request Method — POST
- Request Format — JSON
- Authentication — Basic Authentication
- Username — connect
- Password — Your Agent Connect Test API Key.
- In the JSON code box, enter the following code and then click Send Test:
{ "do_not_send": true, "tags": [ "compensation provided" ], "employee": { "email": "pete.sellar@blancapeak.com" }, "initial_feedback_request_id": "54bd2af9-28cb-48df-8c60-cd27de080cd4", "ext_interaction_id": "64664523", "external_url": "https://blancapeak.your-source-system.com/cases/64664523" }
- After a successful test (showing an HTTP/1.1 200 OK message), click Create.
Creating a trigger for service recovery
Create a trigger that enables Agent Connect to email follow-up surveys to customers automatically when your service recovery criteria are met.
- In Zendesk, open Admin > Business Rules > Triggers, and then click Add a trigger.
- Name the trigger Agent Connect - Service Recovery.
- At minimum, specify the following meets-all conditions:
- Status - Changed to - Solved
- Tags - Contains at least one of the following - stellaconnect_service_recovery
- Specify the following meets-any conditions:
- Channel - Is - Email
- Channel - Is - Web Form
- Channel - Is - Web Widget
- Under Actions, select Notify Active Webhook, and then select the webhook you created in Creating a webhook for service recovery, above.
- In the JSON code box, enter the following code:
{"employee": { "email": "{{ticket.assignee.email}}" }, "initial_feedback_request_id": "{{ticket.external_id}}", "ext_interaction_id": "{{ticket.id}}", "do_not_send": "{{ticket.ticket_field_CUSTOM_ID}}", "external_url": "{{ticket.link}}", {% assign raw_tags = ticket.tags | split: ' ' %}"tags": [{% for tag in raw_tags %}"{{tag}}"{% unless forloop.last %},{% endunless %}{% endfor %}]}
Note: The example code contains both JSON and Liquid tags to ensure Zendesk tags are parsed in the correct format for Agent Connect. - In the JSON code, replace CUSTOM_ID with the actual ID of the custom field you created for your Do Not Send Agent Connect Survey field. For more information, see Integrating surveys with Zendesk.
- Save the trigger.
Updating existing triggers for initial surveys
As part of the integration configured in Integrating surveys with Zendesk, you likely have triggers for sending emails when ticked are solved. Updating these triggers to exclude service recovery tickets ensures that when service recovery follow-up tickets are solved, the initial survey trigger does not fire, thereby sending the wrong survey to your customer.
For every trigger configured in Integrating surveys with Zendesk, add the following to your meets-all criteria: Tags - Contains none of the following - stellaconnect_service_recovery
Testing your service recovery integration
Create a ticket in Zendesk to test your workflow. Pretend you are the customer in this situation by sending in a support ticket from your own email address. Open the ticket in Zendesk, leave a comment, and then solve the ticket. Your original survey trigger should fire, sending you a Agent Connect survey. Respond to the survey, remembering that your response should fit your criteria for your service recovery trigger.
After you have responded, you should see a follow-up service recovery ticket created in Zendesk that references your test ticket as the original ticket number. Leave a comment on the new ticket and then solve that ticket. Your service recovery trigger should fire, sending you a follow-up survey. If you reply that follow-up survey, you can open the Stream to see how the response appears. Consider removing your test feedback from the Stream when testing is complete.
If needed, work with your Agent Connect Client Success Manager to test your automated integration, and to resolve any issues.
Moving your service recovery integration to production
When your integration is working as expected, move the integration to production.
- In Zendesk, open the webhook you configured earlier in the procedure.
- Change the Password to your Agent Connect Production API Key (available on the Integrations screen in Agent Connect).
- In the dropdown at the bottom of the screen, select Update, and then click Submit.