How to Push CSAT Ratings to Slack

Last Updated -

This article shows you how to configure a notification from Desk to Slack anytime a customer leaves a happy or sad CSAT rating.

Note: In this example we use the two smiley face rating system, but this can also apply to the four smiley face rating system.

  • Admin permissions
  • Slack Admin permissions 
  1. Go to: and click Custom Integrations on the left:

  1. Click on Incoming Webhooks:

  1. Click on Add Configuration on the left:

  1. Pick a Slack Channel to be the default for this Webhook (you can override this later, so don't worry if you pick the wrong one).

Click Add Incoming WebHook once you've picked the right Channel.
  1. Copy your Webhook URL for later in the process.

  1. Scroll down to fill out Customize Name, pick an Icon (or upload your own), and Preview your message.

  1. Jump over to Desk and log in to your Admin. Next, go to Apps and install the Custom Action:

  1. Click Install Custom Action:

  1. Read and Accept the Terms of using the custom action:

  1. Enter a Name for your Action. This is important because it will be used as a Rule.
  2. Set your Authentication Method to None (Slack uses the token in our Webhook URL).
  3. Paste your Webhook URL that we copied from Slack's admin in Step 5.
  4. Make sure the Action is Active and toggled to 'on.'
  5. Click Create:

  1. Now that the App is added, we can add Actions to it.
  2. Click on Add Action to add the first one:

  1. Now configure a push from Desk to Slack when a Smiley rating is submitted.
  2. Enter a Name for your Action such as "Happy rating to Slack."
  3. Select the Action type of "POST a JSON string to a URL" (that URL is the Webhook in the App's settings).
  4. Use this JSON to POST:
{"channel": "#general", "username": "CSAT Bot", "text": "", "icon_emoji": ":thumbsup:", "attachments": [ { "fallback": "{{customer.first_name | replace: ''', '\u0027'}} {{customer.last_name | replace: ''', '\u0027'}} ({{ | replace: ''', '\u0027'}}) gave {{}} a WOW", "pretext": "Great job {{}}!", "title": "{{customer.first_name | replace: ''', '\u0027'}} {{customer.last_name | replace: ''', '\u0027'}} ({{ | replace: ''', '\u0027'}}) gave {{}} a WOW", "text": "Subject: {{case.subject | replace: ''', '\u0027' | replace: ''', '\u0027' | replace: '"', '\u0022'}}\nCase <{{case.direct_url}}|{{}}>\n*Feedback:* _{{case.notes.last.note | newline_to_br | replace: ''', '\u0027' | replace: '"', '\u0022' | strip_html}}_", "color": "#7CD197", "mrkdwn_in": ["text", "pretext", "fields"] } ] }

Which will output the following data:
  • The Customer's Name
  • The rated Agent's name
  • The subject of the Case
  • The CaseID
  • A link to the Case
  • A thumbs up emoji
  • A positive affirmation to the Agent

Note: The JSON here is just an example. Use any formatting or liquid variables that suit your needs.

At present it is not possible to include the written feedback with the post. We hope to add this in down the road, but it is not currently possible.
  1. Repeat Steps 17-20, but this time set up a Sad push to Slack, with this JSON:

This will output the following data:
  • The Customer's Name
  • The rated Agent's name
  • The subject of the Case
  • The CaseID
  • A link to the Case
  • A thumbs down emoji
  • A message to try harder to the Agent

  1. Make sure that both of the Actions are turned 'on,' like this:

If you see them grayed out with an 'X,' they're turned off. Just click on the 'X' to toggle them 'on.'
  1. Now configure a Rule to trigger each of the Actions.
  2. Click Cases at the top of the screen.
  3. Now click  Rules on the left, then CSAT Submitted

The CSAT Submitted Rules run when a customer submits their CSAT through your Support Portal, or by clicking a smiley in one of your Resolved Emails.

  1. Click Add Rule at the top.
  2. Give it a Name (e.g., Push Happy to Slack)
  3. Add two conditions under All:
  • Customer Satisfaction Score is 3
  • Case Status is Resolved
Note:  "3" is the smiley face when using the 2 smiley scoring system.
  1. Add one condition under Actions:
Trigger App Action CSAT Bot: Happy rating to Slack (or whatever you named your Action)

  1. Repeat Steps 26-29, but with the Sad Rule settings:
All conditions:
Customer Satisfaction Score is 0
Case Status is Resolved

That's it! Your Rules will now trigger any time a Customer submits a happy or sad score, and push right to your Slack channel.

Your output will look like this if you use the JSON provided in this Article:

Happy rating:

Sad rating: