Teneo Developers

Zendesk Support

The Zendesk Support example solution showcases how you can use your Teneo bot to allow end users to create and manage support tickets. The solution contains an integration with Zendesk and example flows to create, update and check the status of tickets.

zendesk logo

Solution contents

Zendesk Support API integration

The solution contains a Zendesk Support backend integration with the following methods:

  • Create ticket
  • Update ticket status
  • Check ticket status

The methods make use of a class called ZendeskHelper. You can find the ZendeskHelper.groovy file with the source code in the resource file manager of the solution. This allows you to easily modify or extend the class if needed.

You can edit the class straight from Teneo by selecting the ZendeskHelper.groovy file and clicking 'Open'. See: Opening and editing files in an external editor for more details.

Example flows

For each core method in the Zendesk Support integration, the solution contains a corresponding example flow:

  • Create ticket
  • Update ticket status
  • Get ticket status

Getting started

Prerequisites

These instructions assume you have a Zendesk Support account with an active API token. To follow these instruction you need to have the agent or administrator roles in Zendesk Support. These instructions assume you have downloaded and imported the Zendesk Support solution. See the instructions below.

Getting the Zendesk Suppport API Access information To be able to interact with the Zendesk Support API some keys and tokens need to be stored in the solution. Below is a list of the required global variables and where you can find them in the Zendesk Support UI:

Variable NameDescription
zendeskSupportAgentEmailuse any agent email in your Zendesk organization. This will be the default assignee for any tickets created by the bot.
zendeskSupportAgentIdFollow these instructions to locate the agent user id: Zendesk Support.
zendeskSupportAccessTokenIn the left hand sidebar menu in the Zendesk Support UI, select Admin and in the submenu under Channels select API. Here you can add an API token.

Be sure to copy this to your solution before selecting save as the API token will only be displayed once in the UI. Using hardcoded API tokens in your solution is recommended for testing purposes only. In your live solution you will want to generate OAuth credentials.

Variable NameDescription
zendeskSupportUserIdThis variable is optional and used to simulate an identified end user. This variable can be populated in the solution by supplying a value to the input parameter userId. You can generate an end user id by creating an end user in the Zendesk Support UI and follow the agent id instructions to get the id value.
zendeskSupportBaseUrlThis is the base URL to your Zendesk organization.

Store them in the corresponding global variables in your Zendesk Support solution in Teneo.

Make sure you hit Save in the top right corner each time you update a global variable field.

Try it Out

After you have added the details above, you can try it out as follows:

User: Create ticket
Bot: Describe the issue, please.
User: My computer is on fire
Bot: Ticket ID #2 has been created on your behalf.

User: Get ticket status
Bot: What is your ticket id number?
User: 2
Bot: The status of ticket #2 is solved.

User: Solve ticket
Bot: What is your ticket id number?
User: 2
Bot: Ticket #2 has been set to solved. To reopen your ticket, type "reopen ticket" followed by the ticket id.

How does it work?

Each flow in the solution calls its respective corresponded method to either create, update or change the status of a ticket. It achieves this by making API calls to the Zendesk Support API.

Download

Download the solution here. Import the solution into Teneo. For more details see: How to import solutions.