Setting up a workflow that sends notifications in Slack when a ticket is rated negatively allows proactive handling of concerns and improves customer satisfaction. Achieve this goal through a combination of a custom Slack app with an incoming webhook, Zendesk webhook, and trigger.

The workflow includes the following step:;

  • Step 1: Create an app in Slack and an incoming webhook
  • Step 2: Create a webhook in Zendesk to send CSAT tickets to your new Slack webhook
  • Step 3: Create a trigger to send negative CSAT tickets to your Slack channel

Step 1: Create an app in Slack and an incoming webhook

  1. Create a custom Slack app following the Slack API document: Your Apps
    In this example, the Slack app is named CSAT Notifier.
  2. In Slack, the settings enable Incoming Webhooks using the toggle under Features > Incoming Webhooks.
  3. At the bottom of the Incoming Webhooks page, select Add a New Webhook to Workspace. As you configure the webhook, choose what channel should receive the notifications from the drop-down option. In this example, a unique Slack channel #zendesk-bad-csat was created to receive the notifications.
  4. After creating the URL, the system brings you back to a list of URLs for your app. Copy the one you just created using the Copy button.

For more information on creating Slack webhooks, see the Slack documentation: Sending messages using Incoming Webhooks.

Step 2: Create a webhook in Zendesk to send CSAT tickets to your new Slack webhook

  1. In Zendesk, create a new webhook.
  2. Use the following configuration
      • Name | Send negative CSATs to Slack
      • Endpoint URL | [Paste the Slack incoming webhook URL copied from step 1.4]
      • Request method | POST
      • Request format | JSON
      • Authentication | None
    Note: No credentials are required. The URL itself includes the secret required to POST messages.

The webhook should appear similar to the below image.

Step 3: Create a trigger to send negative CSAT tickets to your Slack channel

Lastly, create a trigger to specify what tickets should be sent to your channel. For this example, notify any tickets that receive a Bad or Bad with Comment CSAT. Follow the steps below to create this workflow.

To create the trigger

  1. Create a new trigger
  2. Under Meet ALL of the following conditions, add:
    • Object > Ticket > Ticket | Is | Updated
  3. Under Meets ANY of the following conditions, add:
    • Object > Ticket > Satisfaction | Changed to | Bad
    • Object > Ticket > Satisfaction | Changed to | Bad with comment
  4. Under Actions, add:
    • Other > Notify by > Active webhook | Select the webhook you created
    • In the Body, enter the Slack notification formatted in JSON. For example:
      {"text":"You've received a negative CSAT. See information below \n ticket ID:{{ticket.id}} \n ticket link: {{ticket.link}} \n csat rating: {{satisfaction.current_rating}} \n csat comment: {{satisfaction.current_comment}}"}
  5. Click Create trigger

Trigger to post in Slack when a ticket gets a negative rating.png

In the example above, the JSON body is configured to send the ticket ID, a link to the ticket, the CSAT rating, and the CSAT comment to the Slack channel.

JSON is highly customizable. Configure formatting options for Slack webhooks and include ticket-specific information with Zendesk placeholders. To customize the Slack message, you must startthe JSON body with {"text":} for the call to be received in proper formatting.

After the webhook and trigger are created, you receive the formatted Slack notification when your account receives a bad CSAT rating.

Tip: To configure other notifications in Slack, see the tip contributed by Jacob in the Community article: Push notifications from Zendesk to Slack.
Powered by Zendesk