Tutorial: Setting up an inbound webhook from Zendesk (Console)
Console > Integrations > Tutorial: Setting up an inbound webhook from Zendesk (Console)
This article walks through how to set up an inbound webhook from Zendesk in Console.
Prerequisites
This tutorial requires that you:
Have a basic understanding of how to use API testing tools like Postman
Have administrative access to a Zendesk account. Please refer to Zendesk’s documentation for more information.
Overview
In Console, you can use inbound webhooks to receive data from third-party applications. When an inbound webhook receives data, a workflow linked to the inbound webhook runs and processes the inbound data.
There are four types of inbound webhooks, classified by the type and origin of the data they transmit:
Set up an inbound webhook from Salesforce (article coming soon)
Zendesk inbound webhooks receive data from Zendesk whenever a Zendesk event or a trigger/automation occurs. Zendesk webhooks are useful when you want to connect the ticketing functionality of Zendesk to the CX functionality of your Avaya.cx account. For example, when a ticket is created in Zendesk, you can configure it to use a webhook to automatically create a task in Queue.
This article covers how to create a Zendesk inbound webhook, including:
How to create a workflow for testing
How to create an inbound webhook in Console
How to create an outbound webhook in Zendesk
How to use API testing tools to verify that the inbound webhook is working correctly
Continue reading this article to learn how to set up a generic inbound webhook to Zendesk data to your account.
Before starting
We recommend that you read this overview article on inbound webhooks before proceeding with these steps. It will help familiarize you with inbound webhooks in general.
Part 1: Setting up a test workflow
In our system, an inbound webhook triggers a workflow to run whenever it receives data. The easiest way to determine whether an inbound webhook is working correctly is to create a test workflow that runs when the inbound webhook receives data.
Create a workflow with three modules:
Start module
Create Interaction
End module
Configure the Create Interaction module so that, for messaging interactions, it maps the following fields from the following variables (see the screenshot above for an example of how this should look)
Subject – Variable – ticketTitle
Notes – Variable – ticketDescription
See the screenshot above for an example of how this should look.
Note: The variables you enter must match exactly the name of the data sent via the webhook. For example, if the webhook receives data called ticketTitle, the variable must also be called ticketTitle.
Publish the workflow.
Part 2: Creating an inbound webhook
The next step to creating an inbound webhook for processing Zendesk data is to create an inbound webhook.
Follow the steps in this article to learn how to create an inbound webhook: Create an inbound webhook
Note: Make sure to connect the workflow you created in Part 1 to the inbound webhook you create during this step.
Once you’ve created an inbound webhook in Console (Account > Integrations), return to this article to continue to Part 3 and test sending data via the webhook.
Part 3: Creating a webhook in Zendesk
1. Log into your Zendesk account.
Note: You must have administrative access to perform these steps. Please refer to Zendesk’s documentation for more information.
2. Click the Zendesk App Browser icon in the top-right corner of the screen.
3. Click Admin Center.
4. In the Admin Center, use the left sidebar to navigate to Apps and Integrations > Webhooks > Webhooks.
5. Click the Create webhook button in the top-right corner of the screen.
6. Choose Trigger or automation. Then, click Next.
7. Fill out details for the webhook, including:
Name: An identifier for the webhook. We recommend making this descriptive of what the webhook will do.
Description: A short description of the webhook.
Endpoint URL: This was generated in Part 2 when you created the inbound webhook in Console. See this article for details on how to get the URL: Create an inbound webhook.
Request method: This must be POST.
Request format: JSON
Authentication: None
You can skip clicking the Test webhook button; we’ll test it later on in this process.
8. Click Create webhook.
9. After creating your webhook, a notification modal will appear telling you that you need to connect the webhook to a business rule. Continue on to do this.
10. In the left sidebar, navigate to Objects and rules > Business rules > Triggers.
Note: Triggers aren’t your only option for business rules you can apply to a Zendesk webhook. You can also apply automations, service level agreements, or schedules. For the purposes of this tutorial, however, we’ll use triggers.
11. Click the Add trigger button to create a new trigger.
12. We’re going to create a trigger that runs the webhook when a ticket is opened in Zendesk. To do this, fill out the following information.
Trigger name: A name for the trigger
Description: A basic description of what the trigger does
Category: Initial category (or any category you prefer)
Conditions: Ticket is Created
Actions: Notify Active Webhook and select the webhook you created.
13. After choosing the webhook, a JSON body field appears. You can click the View available placeholders link to see a list of values you can send in the webhook.
14. For this example, we’ll choose the following since this is what we set up for our testing workflow:
{{ticket.title}}
{{ticket.description}}
{
"ticketTitle": "{{ticket.title}}",
"ticketDescription": "{{ticket.description}}"
}
15. Click Save to create the trigger.
Part 4: Test the Zendesk webhook connection
Let’s review what we’ve covered in the preceding parts.
In Part 1, we created a test workflow. The workflow should create a task interaction with a Zendesk ticket’s title as the subject and details as its notes.
In Part 2, we created an inbound webhook in Console. We hooked up the workflow we made in Part 1 to it so that the workflow runs when the inbound webhook receives data.
In Part 3, we created a webhook in Zendesk. We also created a trigger so that, whenever a new ticket is created in Zendesk, it sends the ticket’s title and description to your account.
To put everything together, we can test creating a ticket and seeing if it creates a corresponding interaction in queue.
1. In the Zendesk agent view, click Add. Then, click Ticket.
2. Fill out the ticket information. The two most important fields for this tutorial are Subject and the Details fields.
3. Click Submit as New.
4. After clicking Submit as New, we can log into App and view the queue we configured the interaction to be created in.
5. Your user account should receive an interaction in queue immediately after submitting the Zendesk ticket (assuming your account is configured to accept interactions in the queue you chose).
6. You should see that the webhook successfully brought over the ticket’s title and detail and mapped them to the subject and notes.
Read more
Now that you’ve configured a simple inbound webhook from Zendesk, you’re ready to start building more complex webhooks and workflows. In this tutorial, we sent just basic data, but you can configure an inbound webhook to receive virtually any data.
Click any of the links below to learn more about inbound webhooks or about workflows to start building webhook integrations into your account.