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.

  1. In Zendesk, open Apps & Integrations > Webhooks > Actions, and then click Create Webhook.
  2. Configure the following fields, as described below:
    • TitleStella Connect Service Recovery
    • Endpoint URLhttps://api.stellaconnect.net/v1/recoveries
    • Request MethodPOST
    • Request FormatJSON
    • AuthenticationBasic Authentication
    • Usernameconnect
    • Password — Your Agent Connect Test API Key.
  3. 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"
    }
  4. 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.

  1. In Zendesk, open Admin > Business Rules > Triggers, and then click Add a trigger.
  2. Name the trigger Stella Connect - Service Recovery.
  3. At minimum, specify the following meets-all conditions:
    • Status - Changed to - Solved
    • Tags - Contains at least one of the following - stellaconnect_service_recovery
  4. Specify the following meets-any conditions:
    • Channel - Is - Email
    • Channel - Is - Web Form
    • Channel - Is - Web Widget
  5. Under Actions, select Notify Active Webhook, and then select the webhook you created in Creating a webhook for service recovery, above.
  6. 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.
  7. In the JSON code, replace CUSTOM_ID with the actual ID of the custom field you created for your Do Not Send Stella Connect Survey field. For more information, see Integrating surveys with Zendesk.
  8. 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.

  1. In Zendesk, open the webhook you configured earlier in the procedure.
  2. Change the Password to your Agent Connect Production API Key (available on the Integrations screen in Agent Connect).
  3. In the dropdown at the bottom of the screen, select Update, and then click Submit.