Zendesk Alerts
Zendesk is a cloud-based customer service platform that helps streamline customer support with little to no coding. Use this workflow to automatically notify on-call resources and allow your agents to take ownership of tickets from any mobile device.
How it works
When a new alert is created in Zendesk, it sends a JSON-formatted webhook to xMatters. A Zendesk trigger in xMatters parses the webhook and initiates a flow. The webhook includes essential incident data that xMatters uses to generate an alert and send notifications to groups or assignees. Users can respond to add a comment to the originating alert in Zendesk, or even resolve the alert with the tap of a button.
Install the workflow
The following instructions describe how to install the workflow through the xMatters one-click installation process.
- Go to the Workflows Templates page and click the Zendesk tile.
- On the Set up the Workflow tab, give the workflow a name that identifies its purpose (this must be unique in your instance), add an optional description, and set the default incident type (if applicable). Any built-in Initiate Incident steps in the workflow will automatically be set to the selected incident type.
- You can edit these later, if needed.
- Click Next to set up the connection.
- Choose the authentication method from the drop-down list.
- Copy all three trigger URLs — you’ll use them to configure the webhooks in Zendesk.
- The trigger URLs include the recipients parameter, which specifies who should be notified. By default, this parameter is set to notify you (the logged in user), but you can set it to target any user or group you want.
- Click Open Workflow to view and customize the workflow, or Close to return to the Workflows page.
Now that the workflow is installed and you have the trigger URL, let's to go to Zendesk and configure it to communicate with xMatters.
Configure Zendesk to send requests to the trigger URL
The following sections provide detailed instructions on how to configure Zendesk to send alerts to xMatters.
To configure Zendesk to send alerts to xMatters, you need to create a URL target for each Zendesk trigger on your canvas: Notify Assignee, Notify Group, and Terminate Alerts.
- Open the Zendesk Admin Center, expand Apps and Integrations, then select Targets.
- Click add target.
- Select URL Target from the list of options.
- On the URL Target page, fill in the following fields:
- Title: Give the target a unique name. For example, you could title the targets "xMatters Notify Assignee", "xMatters Notify Group", and "xMattersTerminate Alerts".
- Url: The URL you copied from the workflow installer that matches the name of the target.
- Method: POST
- Attribute Name: value
- Click Save.
- Repeat steps 1 - 5 so you have three Zendesk URL targets.
The next step is to create a Zendesk trigger that initiates the URL target. You will need to create a Zendesk trigger for each URL target.
- In the left-hand menu expand the Objects and rules section, then go to Business rules > Triggers.
- Click Add trigger.
- Enter a trigger name and description. For example, you might want the trigger name to match the URL target name.
- Expand the Category drop-down list and select Notifications.
- In the Conditions section, click Add condition under the "Meet ALL of the following conditions" heading.
- Set the conditions in which you want Zendesk to send a request to xMatters and initiate the flow.
- For the Notify Group trigger, use the drop-down menus to set the following conditions:
- Ticket Is Created
- Group Is not -
- Assignee Is -
- For the Notify Assignee trigger, use the drop-down menus to set the following conditions:
- Ticket Is Created
- Assignee Is not -
- For the Terminate Alerts trigger, use the drop-down menus to set the following condition:
- Ticket status Changed to Solved
- For the Notify Group trigger, use the drop-down menus to set the following conditions:
- In the Actions section click Add Action.
- Select Notify target from the drop-down menu, then select the target URL from the drop-down menu that matches the trigger.
- Copy the following payload into the Message field.
{
`Ticket ID`: `{{ticket.id}}`,
`Subject`: `{{ticket.title}}`,
`Description`: `{{ticket.description}}`,
`Status`: `{{ticket.status}}`,
`Initiator`: `{{ticket.requester.name}}`,
`Priority`:`{{ticket.priority}}`,
`Type`: `{{ticket.ticket_type}}`,
`Group Name`: `{{ticket.group.name}}`,
`Assignee`: `{{ticket.assignee.name}}`,
`Assignee ID`: `{{ticket.assignee.id}}`,
`URL`: `{{ticket.url}}`
}
- Click Save.
- Repeat steps 1 - 10 so you have three Zendesk triggers, each linked to its URL target.
For the Zendesk steps to send information to xMatters, enable Basic Authentication password access in Zendesk.
- In the left-hand menu expand the Apps and integrations section. then go to APIs > Zendesk API.
- In the Settings tab, go to the Password access toggle and enable it..
xMatters needs to know a user's Zendesk ID so it can map the assignee coming from Zendesk to a user in xMatters and send notifications to the people who need to be notified.
- Create a custom user property with the name Zendesk User ID.
- In this instance, we didn't select Required because not all users in this xMatters deployment have a Zendesk ID.
- Click Save.
The next step is to update the Zendesk User ID field in the profiles of any new or existing users to hold their Zendesk ID.
- On the Users tab, select the user you want to update and click their Profile tab.
- Enter their Zendesk ID in the Zendesk User ID field and click Save Changes.
- To find a user's ID in Zendesk go to the Admin section, then to Manage > Agents. Open the record for the user then copy the user ID portion of the URL. For example, in the URL ...zendesk.com/agent/users/369711711693/assigned_tickets, the user ID is the number listed after "users/".
To update multiple users, you can also export a list of users to a .csv file (make sure you do this after you add the custom field), add the Zendesk user IDs to the custom field column in the .csv file, and then use the User Upload feature to load that information into xMatters.
Add your groups to xMatters, making sure to use the same name assigned to the group in Zendesk. This is the name xMatters looks up when notifying a group. When you add your group, you can create shifts, add members, and set up escalations and rotations.
If you change the name of a group in Zendesk, make sure you update it in xMatters.
Set recipients in the trigger URL
The trigger expects the recipients in the trigger URL. When you copy the URL from xMatters, it includes the recipients parameter: recipients=<yourname>. Of course, you don’t want to receive all the alerts.
To change the recipients for alerts from this webhook, swap out your name for the people or groups you want to target.
- For URL authentication, use an ampersand to attach recipients. For example, if you want to notify Emma Pearson and the on-call members in the group responsible for the Antares service, you'd add &recipients=epearson,antares to the URL.
- For other authentication types, use a question mark to attach recipients. For example, if you want to notify Barry Gull and the on-call members in the group responsible for the Cassiopeia service, you'd add ?recipients=bgull,cassiopeia to the URL.
Remember to URL-encode any special characters, including spaces, in your group names.
We recommend using groups so you can take advantage of the xMatters group features — rotations, escalations, and absences — to reach the right on-call people to jump on an issue.
How to use the workflow
When a new incident is created in Zendesk, it sends a signal to xMatters, which creates an alert and notifies the individual or the on-call members of groups you set as recipients in the webhook URL. When the trigger receives a signal saying the issue is resolved, it automatically terminates related alerts in xMatters.
An agent responding to the notification has the following response options:
- Acknowledge: Acknowledges the notifications and stops escalations.
- Add a Comment: Add a comment to the alert in Zendesk.
- Resolve: Resolves and closes the alert in Zendesk, terminates the xMatters alert, and stops notifying all targeted recipients.
A group responding to the notification has the following response options:
- Acknowledge: Acknowledges the notifications and stops escalations.
- Add a Comment: Add a comment to the alert in Zendesk.
- Escalate: Immediately escalate to the next on-call resource.
- Resolve: Resolves and closes the alert in Zendesk, terminates the xMatters alert, and stops notifying all targeted recipients.
Next Steps
Now that you've installed the workflow, you can use it as-is, or customize it to suit your needs better. Here are some examples of things you can add to the workflow to customize it:
- Use Slack, Zoom, and Microsoft Teams steps to add collaboration channels to the flow.
- Update the message sent to resolvers to include the information most relevant to your team.
- Use the Zendesk Alerts trigger to build your own custom flows.
Previous version
While the previous, built-in version of this integration is no longer available, the instructions for it are included below for anyone who has it installed in their system already.
Zendesk Alerts
Zendesk is a cloud-based customer service platform that helps streamline customer support with little to no coding. Coupled with the power of xMatters, this workflow:
- Quickly notifies the assignee or on-call member of a group that they've been assigned to a ticket resource using their preferred devices.
- Automatically updates the ticket with information about the notification, including who responded and how, including any comments they added.
Get the workflow package then follow the instructions to import and configure it.
Got questions about using the Zendesk Alerts workflow? We've got you covered — take a live, online workshop led by one of our xPerts.
Download and import the package
- Download the package to your computer. Don't unzip it; you'll import the .zip file into xMatters.
- On the Workflows page, click Import.
- Browse to where you saved the file containing the workflow (usually your browser's default download location) or drag and drop the .zip file onto the Import Workflow dialog.
- Click Import.
- If a workflow of the same name already exists, give the workflow a new name (you can edit this later). If you do give the workflow a new name, make sure you update the Workflow Name constant.
Before you begin
Before you get started, you need to set up a user for this workflow to use to authenticate requests to Zendesk.
We recommend you add a user in Zendesk specifically for the workflow. xMatters uses their credentials to authenticate requests to Zendesk, and this user appears as the author of comments added by xMatters. The user needs to be an agent with permission to update tickets, and needs to have either password access or token access configured on the Admin > Channels > API page in Zendesk.
Prepare xMatters
There are a couple of things to do in xMatters before you import the workflow: create a custom field to hold a user's Zendesk ID, add users and update their profiles with the ID, and create groups.
xMatters needs to know a user's Zendesk ID so it can map the assignee coming from Zendesk to a user in xMatters and send notifications to the people who need to be notified.
- Create a custom user property with the name Zendesk User ID.
- In this instance, we didn't select Required because not all users in this xMatters deployment have a Zendesk ID.
- Click Save.
The next step is to create any new users and update the Zendesk User ID field in the profiles of any new or existing users to hold their Zendesk ID.
- On the Users tab, select the user you want to update and click their Profile tab.
- Enter their Zendesk ID in the Zendesk User ID field and click Save Changes.
- To find a user's ID in Zendesk, go to Manage > Agents in the Admin section. Open the record for the user then copy the user ID portion of the URL.
- To find a user's ID in Zendesk, go to Manage > Agents in the Admin section. Open the record for the user then copy the user ID portion of the URL.
To update multiple users, you can also export a list of users to a .csv file (make sure you do this after you add the custom field), add the Zendesk user IDs to the custom field column in the .csv file, and then use the User Upload feature to load that information into xMatters.
Add your groups to xMatters, making sure to use the same name assigned to the group in Zendesk. This is the name xMatters looks up when notifying a group. When you add your group, you can create shifts, add members, and set up escalations and rotations.
If you change the name of a group in Zendesk, make sure you update it in xMatters.
Set up the workflow in xMatters
There are two required tasks in xMatters before you head over to Zendesk (plus an optional check).
xMatters uses the Zendesk endpoint to update and add comments to tickets. To set up the endpoint, you need the credentials of the Zendesk user you set up.
- On the Flow Designer tab in the workflow, click the Components menu and select Endpoints.
- Select the Zendesk endpoint and copy the URL of your Zendesk instance into the Base URL field (for example, https://your-company.zendesk.com).
- Enter the username and password of the xMatters user in Zendesk.
- If you're using password access, make sure you come back here and update the password if the user's password changes.
- If you're using token access, append /token to the username (for example, xmattersuser@your-company.com/token) and use the API token as the password.
- Click Save.
If you want to use a different authentication method, you need to create a new endpoint and point any steps in the flow using the existing endpoint to the new one (look for the Zendesk logo to find the steps that update or add comments to Zendesk).
You need to retrieve and copy the URLs for each of the triggers you want to target from Zendesk.
- Click the Flow Designer tab and open the Notify Group canvas.
- Locate the Notify Group trigger — it should be the topmost trigger on the canvas.
- Double-click the trigger (or hover over it and click the pencil icon).
- Select the authentication method you want to use to initiate the trigger.
- If using URL authentication, select the authenticating user to update the trigger URL. When a request to the URL is received, the trigger and any connected steps run using the permissions of that user. You might want to change this to an integration user specific to Zendesk.
- In the Initiation section, click Copy to copy the trigger URL to the clipboard.
- Copy the trigger URL — you'll use it to set up the Notify Group webhook in Zendesk.
- Repeat the steps above for the Notify Assignee and the Terminate Events flows.
If you labeled the custom field exactly Zendesk User ID, there's nothing you need to do. However, if you change the label, you need to update the value of the Assignee ID custom field name constant to match.
- Click the Components menu and select Constants.
- Select the Assignee ID custom field name constant and check that the value matches the label you gave the custom field.
Set up Zendesk
To configure Zendesk to send alerts to xMatters, you need to create a webhook for each HTTP request trigger in the workflow, and then create Zendesk triggers for each webhook.
The first step is to add a webhook for each trigger URL from xMatters. To create a webhook for the Notify Group trigger URL:
- In the Zendesk Admin section, go to Apps and integrations > Webhooks, and then click Create Webhook.
- On the Create Webhook page, select Trigger or automation, and then click Next.
- Give the webhook a title (for example, Notify Assignee) and then paste the trigger URL in the Endpoint URL field.
- Make sure Request method is set to POST and Request format is set to JSON.
- Select the Authentication type you want to use. If using Basic authentication, enter the username and password of an xMatters user with permission to initiate the trigger (or the API key and secret). Because this user appears as the initiator or submitter of alerts from the integration (in messages, alert reports, etc.), you might want to create an integration user specific to this workflow.
- Click Create webhook.
- You can navigate back to the Webhooks page or click Finish setup. You'll create the connections for these webhooks in the next section.
- Repeat the steps above for the Notify Assignee and Terminate Events trigger URLs.
The next step is to create a Zendesk trigger that initiates each webhook. The instructions provide the basic settings required to initiate an alert in xMatters when a ticket is created and assigned to a user or group. You can add additional conditions to fine-tune when the trigger is run (for example, a condition for "Priority is Greater than Normal" so an alert is only created for High or Urgent tickets).
- In the Zendesk Admin section, go to Objects and rules > Triggers.
- Click Add trigger.
- Enter a trigger name and description that tells what the trigger does (for example, Ticket is created and assigned).
- Set the conditions for the trigger. In the Meet ALL of the following conditions section, set the conditions:
- Notify Assignee: "Ticket Is Created" AND "Assignee Is not -"
- Notify Group: "Ticket Is Created" AND "Assignee Is -"
- Terminate Events: "Ticket Is Updated" AND "Status is Greater than Pending"
- Notify Assignee: "Ticket Is Created" AND "Assignee Is not -"
- In the Actions section, select Notify active webhook and select the appropriate webhook (notify groups, notify assigned or terminate events).
- Copy the payload into the JSON body field.
- Click Create.
Copy the payload into the JSON body field when configuring the Zendesk triggers for this workflow.
{
"Ticket ID": "{{ticket.id}}",
"Subject": "{{ticket.title}}",
"Description": "{{ticket.description}}",
"Status": "{{ticket.status}}",
"Initiator": "{{ticket.requester.name}}",
"Priority":"{{ticket.priority}}",
"Type": "{{ticket.ticket_type}}",
"Group Name": "{{ticket.group.name}}",
"Assignee": "{{ticket.assignee.name}}",
"Assignee ID": "{{ticket.assignee.id}}",
"URL": "{{ticket.url}}"
}
Using the workflow
To use the workflow, create a new ticket in Zendesk and assign it to either a user or a group that also exists in xMatters (if selecting a user, make sure the Zendesk User ID field in their profile has their Zendesk ID).
This creates an alert in xMatters and sends a notification to the individual or the on-call members of the group (depending on whether the ticket was assigned to a user or a group).
The person responding to the notification has the following response options:
- Acknowledge: Assigns the xMatters alert to the responder and stops notifying any other targeted recipients (if a group was targeted). xMatters adds an internal comment to the ticket.
- Add a Note: Adds the user's comment to the alert and stops notifying them. xMatters continues processing the alert for this user and any other targeted recipients (if a group was targeted). xMatters adds the note as an internal comment on the ticket.
- Resolve: xMatters terminates the alert and stops notifying all targeted recipients. The ticket is changed to Solved and xMatters adds an internal comment to the ticket.
- Escalate (Notify Group only): Immediately escalates the alert to the next targeted recipient (if a group was targeted). xMatters adds an internal comment to the ticket.
If there are existing alerts related to the ticket, xMatters terminates them before creating a new alert.
An internal comment is added if xMatters could not map a Zendesk user ID to an xMatters target name. In addition, comments are also added to the Zendesk ticket when the following alert activities occur:
- an alert is created in xMatters,
- a user adds an additional comment using xMatters,
- the alert is escalated, either manually or because of a timeout configured for the group,
- xMatters could not immediately notify any of the targeted recipients.
If you want to turn off any of the alert activity comments, see Disable comments for alert activities. You can also turn on updates when a notification is delivered — or couldn't be delivered — to a device.
Workflow customization
There is some optional setup you can do to customize the workflow to your needs.
By default, the workflow adds comments to the Zendesk ticket for various alert activity triggers in xMatters. You can disable some or all of these. Updates for device delivery alerts are disabled by default; you can turn these on, if needed.
- Open the flow that is generating the alert activity comment you want to turn on or off (either the Notify Assignee or Notify Group flow).
- Look for the icon of the associated trigger on the canvas and double-click it (or click the pencil icon when you hover over it).
- Click the Enabled toggle to set it to Disabled (or click the Disabled toggle to set it to Enabled).
- Click OK.
The trigger and any steps connected to it are disabled or enabled.
Unless you're modifying the fundamental functionality of the workflow, or using it as a template to build your own, you shouldn't need to modify the workflow constants.
- Assignee ID custom field name: This is the name of the custom field in xMatters that stores the Zendesk ID of users. xMatters uses the value in the custom field to map the assignee value in a Zendesk payload to an xMatters user, so we can find the right person to notify.
- Language Suffix: The two-letter language code to append to text properties when the workflow performs a search for them (for example, common codes are en, es, fr, ru, pt, and zh). The search for text properties needs to know what language the property is in, so this suffix is appended to the property name when searching.
- Open Event Statuses: A comma-separated list of xMatters alert statuses that are considered open. This is used to determine if there is an open alert related to the ticket that needs to be terminated.
- Ticket ID Property Name: The workflow property that holds the Zendesk ticket ID. This is used to determine whether the alert relates to the ticket (for example, when determining if there are any existing alerts related to the ticket that need to be terminated).
- Workflow Name: This holds the workflow name. It's used to narrow the results when searching for related alerts that need to be terminated. You only need to update this field if you rename this workflow. If this field is empty, xMatters terminates all alerts that have a matching Ticket ID value.
What's next?
Once you have an understanding of how the workflow interacts with Zendesk, you can start expanding on it. Use Flow Designer to connect other tools by dragging and dropping steps onto the canvas. For example, you could add steps that post information about the ticket and the xMatters alert to a Slack or Microsoft Teams channel. For information on any of the built-in Zendesk steps, see the Zendesk steps topic.
Troubleshooting
If notifications are not being sent, check the Activity panel in Flow Designer to see if xMatters is receiving the request (you can enable logging for the flow to see the next 25 requests, regardless of whether they succeed or fail). If xMatters is receiving the request, the Activity panel highlights any errors in the flow.
If it xMatters isn't receiving the request, check the configuration of the webhooks and triggers you created in Zendesk.