Integrating with Zendesk
You can use an action interaction to automatically create tickets in your Zendesk account. You can attach a transcript of the conversation to the ticket, and email any file attachments uploaded as part of the conversation.
Example of a Zendesk Request bot
Designing the bot
Design a bot that uses questions and messages to gather information from the user. Having gathered the information, use a Zendesk Request action to do one of the following:
- Automatically create a ticket in Zendesk.
- Ask the user whether they want a ticket to be created, then create the ticket for them.
Once the request is sent:
- Zendesk will return a ticket ID if the request is successful. You can send this to the user in an On Successful Response interaction.
- If the request fails then Zendesk returns an error message. You can handle error messages using an action interaction configured as the On Failed Response interaction, or you could send a general failure message to the user.
Note: If you are planning to use Live Takeover with this bot then the operator must exit live takeover in order for the ticket to be created. The bot must take over and create the ticket. It is not possible for operators to create tickets.
Zendesk variables
The following variables are available for use with Zendesk requests.
Variable | Description |
---|---|
{history} | Transcript of the conversation up to the point that the request is sent to Zendesk. |
{zendeskRequestId} | Ticket ID returned by Zendesk once the ticket is created successfully. |
{zendeskRequestError} | Error message returned by Zendesk if a ticket could not be created. |
Creating Zendesk requests
- Create the messages and questions that will gather information from the user, including optional contact details such as the user's name. You may need to create a variable for the user's name if you want to identify the user as the Zendesk requester.
- Create an action, selecting Zendesk Request as the action type.
- On the Settings tab, enter the details needed to send an API request to Zendesk. You can obtain the details you need from your Zendesk account.
Setting | Description |
---|---|
Create Request API URL | Enter the API endpoint. This will be: https://<zendesk_account_URL>/api/v2/requests.json where <zendesk_account_URL> is the sub-domain as set in Zendesk under Your Zendesk account name. |
Authorization email | Enter an email address associated with the Zendesk account. Any attachments uploaded during a conversation are sent to this email address. |
API Key | Enter the active API token associated with the Zendesk account. As the API token is not displayed anywhere in the Zendesk account once it is created, you may need to create a new one. |
Requester Name | Optionally enter the variable that holds the user's name. This becomes the requester in Zendesk. |
Subject | Enter a short description of the support request. This becomes the subject in Zendesk. |
Additional Comment | Optionally attach a transcript of the conversation by entering {history} . If you leave this blank, EngageOne™ Communicate will add the subject as a comment. |
On Successful Response | Select the interaction that defines what happens next when the request is successful. For example, it could send the ticket ID to the user. |
On Failed Response | Select the interaction that defines what happens next when the request fails. For example this might be a condition action that sets the next step depending on the error returned from Zendesk. |