Recently, we received a splendid request from one of our users

Could I receive a link to Klaus for a conversation that got a bad rating on Zendesk?

Now, since this requires some work on the help desk to be set up, we thought it would be great to document the process so that others could also up their productivity game!

Note that we'll use Zendesk as an example here, but this will work for any event in your help desk, as long as they support webhooks. For Intercom, the event that we're looking into would be conversation.rating.added.

To get yourself more acquainted with webhooks, be sure to check out Zendesk's general guide on them and also how to send them to Slack. The e-mail notification flow is largely similar, but instead of the HTTP Target that we'll explain in the next section, you'd need to create an Email Target instead.

A lot of these steps are covered in Zendesk's Slack guide, but to recap:

  1. Go ahead and set up a new Incoming webhook in Slack
  2. As a Zendesk admin, navigate to Settings Extensions Add target
  3. Choose HTTP Target
  4. Add the Incoming webhook's URL that you generated in step 1 as the target URL
  5. Set the target's method to POST and the Content type to JSON
  6. You may test the target and pass in an example message, for example { "text": "Hello Klaus!" }
  7. If you received the message on Slack, then go ahead and Submit your new HTTP target 🎉
  8. If for some reason you did not receive the message, Zendesk offers some additional debugging information on the API Target Failures page

We're now ready to configure different triggers that can use this target to send messages to our Slack.

In Zendesk, let's head over to Settings Business Rules Triggers

  1. Click Add Trigger and give it a name with a cat emoji (highly important)
  2. We'll leave the conditions up to you, but for our original question,
    Satisfaction Is Bad worked out well. Note that you can mix-and-match the conditions as well.
  3. Click Add action and from the two dropdowns, first select Notify target and then select the name of the target we previously created.
  4. In the Message field, we will enter a JSON payload, that will look like this
{
"text": "You received some feedback on a ticket. <https://kibbles.klausapp.com/conversations?externalTicketId={{ticket.id}}|Review it on Klaus>"
}

Please see our "Link to Klaus from your help desk" article for details on how we construct the link and the externalTicketId query parameter.

That's it! Whenever your trigger's conditions are fulfilled, you will receive a Slack notification. 🔔

(Optional) Lastly, you can spruce up that Slack message with some advanced formatting and even add custom buttons. Slack has a great Message Formatting tool that lets you preview the JSON payload as a real Slack message

Did this answer your question?