Connectors / Service / Zendesk

Help desk platform. (updated: 1611758938475)

Zendesk

Built with support agents in mind, Zendesk is a single, dynamic interface which offers an easy to use customer management platform to help you improve your company-customer relationships.

Overview

Zendesk is a CRM platform which allows you to send and retrieve data on records such as tickets, users, organizations, etc. With the capacity to configure a responsive, branded help centre for tracking, prioritizing, and solving said customer support tickets; Zendesk is suitable for both large and small scale organizations.

Authentication

Add a Zendesk connector step to your workflow. Click on the 'New Authentication' option now available in the right-hand panel and name as appropriate.

add-auth

In order to fully authenticate with Tray.io and Zendesk, you will need the 'Subdomain' as displayed below, and you will also need to select which scopes you want to use:

input-needed

When you log into your Zendesk account and copy the subdomain name used and paste it into your Tray.io 'Zendesk subdomain' authentication as appropriate. You can also copy it from your browser URL once you are logged in.

signin

If you want your authentication to have access to Zendesk scopes, scroll to the bottom of the list and Select the scopes required for this example we have checked 'Read' and 'Write'.

Once you have defined your subdomain and scopes, click 'Create Authentication', and then a popup window will appear asking you to sign into your Zendesk account:

oauth-signin

Enter your login details and click 'Sign in'. You will then be asked to authorise Tray.io to use the scopes you have selected:

oauth-scope-confirm

Once you click 'Allow', both popups will close. Congratulations! You have now completed the authentication process and can use the Zendesk connector. Your auth field will now automatically select the Zendesk auth created until stipulated otherwise.

Zendesk trigger

If you wish your workflow to be kicked off by a particular action in Zendesk (as per the below example tutorial), you can use the Zendesk Trigger.

The Zendesk trigger allows you to receive notifications and trigger workflows when given events occur associated with the selected trigger operation.

Version 3.0 +

Trigger operations available:

  • Webhook

webhook-operation

Select 'Webhook' from the dropdown options available.

Either choose an authentication already associated with the Zendesk account you wish to receive notifications for, or create a new authentication as detailed in the above Authentication section of this page.

Finally, Enable your workflow by selecting the Enable button in the right-hand corner of the workflow.

zendesk-trigger-enable

The Webhook operation has different events. You have to select the event you want to trigger from the list of events.

list-webhook-events

Version 2.0 & earlier

Trigger operations available:

  • On ticket comment create

  • On ticket create

  • On ticket create or update

When creating a workflow you can choose Zendesk as your trigger:

select-trigger

Use the instructions above to authenticate your trigger, and from the options available, select the event you want the trigger to listen to, in order to set off the workflow itself:

trigger-options

See the example below for how to extract and process information from your trigger.

Available Operations

The examples below show one or two of the available connector operations in use.

Please see the Full Operations Reference at the end of this page for details on all available operations for this connector.

Note for Embedded customers

If you are setting up a custom Zendesk OAuth app in order to whitelabel your integration, bear in mind that Zendesk only allows a single Redirect URI to be set. This will prevent you from completely rebranding the Config Wizard experience. Please see the Embedded whitelabelling guide for more details.

Also note that when setting up a Zendesk OAuth App the default approach requires that you send your script/code into Zendesk for code review as explained in the Zendesk developer documentation

Example Usage

TRAY POTENTIAL: Tray.io is extremely flexible. By design there is no fixed way of working with it - you can pull whatever data you need from other services and work with it using our core and helper connectors. This demo which follows shows only one possible way of working with Tray.io and the Zendesk connector. Once you've finished working through this example please see our Introduction to working with data and jsonpaths page and Data Guide for more details.

As Zendesk will most likely be used in conjunction with some kind of CRM software, for the purposes of this demo we will also be utilizing the Copper connector as it is beginner-friendly.

In order to demonstrate some of what is possible with Tray.io automation, this example will illustrate a workflow that is initialised once a comment is created on a ticket in Zendesk; and what happens should the ticket account not/ be recognised in Copper's CRM system.

  1. A ticket is updated with a comment in Zendesk.

  2. Relevant information is collected from the ticket, the Client associated with said ticket, and the Agent who created the original comment.

  3. The Client information is cross compared with Copper's database records.

  4. If not found, an email alert is sent to the commenter/ Agent, asking them to review their work.

  5. If the Client is associated with an account on Copper, the latest comment is taken and an activity note is created in Copper updating their own records with said comment.

The result of this workflow means that both Zendesk and Copper have their comment records kept up to date, simultaneously.

You will need to have a Copper account set up with some client data available. These do not have to be genuine ; you can easily make up some dummy accounts as soon as you log in - just make sure to provide email addresses for the sake of our demo! (again, these don't have to be real). Added to this Copper offers a free trial period so you can use their software without cost for the sake of this demo. This shouldn't take more than 10 minutes of your time.

Once your Copper account and dummy data is sorted, make sure to authenticate your Copper connector. you can find this information <Content type link TBD> .

A completed workflow looks like this:

wf-complete

So let's begin!

1 - Setup the Zendesk trigger

The first step is to go to your Tray.io dashboard, click on the 'Create new workflow' button in the top right corner and name your project workflow. This can be edited later if need be.

Select the Zendesk trigger itself, and choose your authentication as appropriate.

If you have not already completed Zendesk authentication setup, please go through the tutorial outlined above.

Version 3.0 +

Select the 'On ticket comment create' from the event dropdown list.

trigger-setup-newer.png

Version 2.0 & early

In the new options now available on the right hand side, select the 'On ticket comment create' operation dropdown list.

trigger-setup.png

2 - Retrieve your information

The next step makes sure we have all the relevant information we need regarding the Client, the Ticket and the Agent.

Drag and drop three Zendesk connectors from the options available on the left hand side of the workflow dashboard, and place them one after the other on the workflow chart.

In order to differentiate between your trigger and each of your connectors, it is good practice to name your steps as per their function. This will also help you keep track of your step by step process as you continue to build.

name-steps.png

As you can see by the warning labels, these steps have not completed their setup. The first we will focus on is the 'Get Ticket ID' connector.

2.1 - Zendesk 1: Get Ticket ID

On the right hand side, make sure your authentication is set correctly (you should be able to use the same one as you used for your trigger), and that you select 'Get ticket' from the operation options.

zd-step-1

As you can see, the Ticket ID input is set to a numerical field by default. In order to make your workflow more scalable, we will use the JSON pathway option instead.

Change your input option by selecting the tab, and choose 'jsonpath'. Use the Connector-Snake to pull in the ticket ID as demonstrated below.

JSONPATHS: For more information on what jsonpaths are and how to use jsonpaths with Tray.io, please see our Intro page and Data Guide for more details.

CONNECTOR-SNAKE: The simplest and easiest way to generate your jsonpaths is to use our feature called the Connector-snake. Please see the main page for more details.

cs-gif

2.2 - Zendesk 2: Get Client Info

Select the second Zendesk connector, the 'Get Client Info' operation and fill in the fields as displayed. You can use the same method as before with the Connector-Snake, only this time you will connect it to the ticket step (Zendesk-1) instead of the trigger.

Bear in mind, that the operation uses the term "User", the JSON path displayed states "Requester", but that we are naming the step after the Client for the sake of clarity. Don't worry, they all refer to the same thing, albeit using various terminology due to their section areas.

zd-step-2

2.3 - Zendesk 3: Get Client Info

On the third Zendesk connector, choose the same operation as in the previous step, but this time select the trigger for the $.steps.trigger.author_id. There are other ways you can generate the author ID, but this the simplest for the sale of demonstration:

zd-step-3

3 - Compare & connect with Copper

As before, select a new connector, but this time choose 'Copper', and make sure your authentication is correct.

If you have not already done so, please make sure you have signed into your Copper account, and set up your authentication with the connector. See the 'Example usage' section above for more details.

Enter the details below using the method explained earlier, but this time take the email and make sure the operation is set to 'Find person by email':

copper-connector.png

The next stage is the Boolean connector. This is a core Tray.io connector and use to differentiate between true/ false situations.

While it may look intimidating, it is relatively simple in principle. No authentication is required, all you need do is set the condition to be met, and depending on the result, the workflow will flow down the appropriate route.

In this case, we are simply asking the condition to check if - having taken the Client email address from the Zendesk ticket in the previous step - whether Copper found a matching address in its own database.

boolean-connector.png

4 - Email alert

Should this not be the case, regardless of reason, the next step will automatically send an email notification to the Agent (or person who wrote the comment, on what is apparently an account that is NOT in the Copper database) stating that there has been an issue.

Drag the 'Send Email' connector onto the false branch. Set the operation to 'Send email'. Make sure to click on the mandatory 'To recipients' button, and add the relevant email and name from the third Zendesk connector step.

While again the term _user is being utilised in the JSON path, in this case we are referring to the commenter, the Agent._

email-panel-gif

The next section of the email connector is the email content itself.

Add a subject heading, and fill in the content of the email as you see fit. The 'From' section will be auto filled for you.

As you can see from the below example, we use Tray.ios Interpolation method here to auto-populate the content sections. These we have gleaned from the Debug output panel. The Debug panel output is a great place to find out if your JSON path is leading where you expect it to, and get a more detailed look at your workflow results.

INTERPOLATION: When you wish to include JSON generated data within another input/output result, use our Interpolation method as described here.

Bear in mind these results will show once you have enabled your workflow, and the trigger has been initiated, with the end result being False:

email-debug

5 - Client found

Should the boolean result prove 'True', we can continue along our workflow and create the next step, with another Zendesk connector. This time we will use the 'List ticket comments' operator, and retrieve the ticket ID from our first Zendesk step using the following JSON path: $.steps.zendesk-1.ticket.id.

Again, the JSON pathway can be found either via the Connector-Snake or through your output in the debugger.

get-comments

We are going to implement a different type of connector, known as Helper connector. These connectors are at their heart, small utility connectors that help you with things like text manipulation, formatting dates, etc. For more info please see our <Content type link TBD> page.

Select the 'List Helpers' connector and add it to the next step in your workflow. Your operation should be 'Sort objects'.

LIST HELPER: This is just one example of how the List Helper can be utilised. For more ways and uses regarding the List Helper connector, please see the main docs page for more details.

Make sure you use the connector-snake to generate the JSON path as displayed: $.steps.zendesk-4.comments. Your type selector should automatically update to 'jsonpath' but as usual, it is best to double check before moving on.

Set your 'Key' to created_at. This is one of the keys in your generated output (which can seen in your debug steps once you run your workflow). It represents the time the comment was created.

Set your order to your preference. Ascending is usually best.

zendesk-sort-ascending

Add another List helper and in the 'TRUE' section of the workflow, beneath your previous List helper, making sure that the operation is set to 'Last'.

The list we want to utilise - or rather, where we want to get the LAST list comment from - comes from the results of our previous connector(Zendesk-4), whose sole purpose was to gather all available comments in the first place.

Fill in the 'List' as displayed below when ready:

zendesk-get-last-comment

The final step will take our result and update your linked Copper account with a new activity with details about the updated comment from Zendesk, thereby keeping both applications automatically up to date with ticket commentary.

Fill in the Copper connector as follows. Again we have used Interpolation to populate the details field so that nothing is "hard-coded" so to speak.

zendesk-copper-final

So any time a comment is added to a ticket in Zendesk your workflow will be kicked off:

zd-comment

Copper will in the meantime (provided all goes well) have received fully rendered emails similar to this:

copper-result

In which case Congratulations!!, you will have fully completed this Zendesk example tutorial!.

success

BEST PRACTICES: Whenever you do decide to create your own workflow, please make sure you take a look at our managing data best practices guide.

All Operations

Latest version:

7.1

Add comment to ticket

Add a comment to a ticket.

Count organization members

Count the number of members of an organization.

Create automation

Create an automation.

Create brand

Create a brand.

Create group

Create a group.

Create group membership

Create a group membership entry. This links an agent to a group.

Create group memberships (bulk)

Create one or more group membership entries. This links agents to groups. Assigns a maximum of 100 agents to given groups.

Create jira link

Create a link to connect between a Jira issue and a Zendesk ticket.

Create macro

Create a macro (one or more actions that modify the values of a ticket's fields).

Create or update organization

Create or update an organization.

Create organization

Create a new organization.

Create organization field

Create an organization field.

Create schedule

Create a support schedule.

Create sla policy

Create a service level agreement policy.

Create target

Create an external target to send notifications to with triggers and automations.

Create ticket

Create a new ticket.

Create ticket field

Create a ticket field.

Create ticket form

Create a ticket form.

Create trigger

Create a trigger (one or more actions performed when a ticket is created or updated).

Create user

Create a new user.

Create user field

Create a custom user field.

Create user identity

Create an identity for a user.

Create view

Create a view.

Create/update user

Create a new user if the user does not already exist or update an existing user identified by e-mail address or external ID. To create a new user, please provide a name. To update an existing user, please provide either an email address or external ID

Delete group membership

Removes an agent from a group

Delete group memberships (bulk)

Removes an agent from a group.

Delete jira link

Delete a link between a Jira issue and a Zendesk ticket.

Delete ticket

Delete a ticket.

Delete ticket form

Delete a ticket form.

Delete ticket tags

Delete tags from a ticket.

Delete user field

Delete a custom user field.

Delete user identity

Delete a specified user identity.

Filter articles

Filter articles by specified fields.

Get article

Retrieve a specific article.

Get article attachment

Retrieve a specific article attachment.

Get article comment

Retrieve a specific article comment from knowledge base.

Get group membership

Retrieve a group membership.

Get label

Retrieve a specific label.

Get organization

Get information about an organization.

Get organization custom field

Retrieve an organization custom field.

Get settings

Retrieve the settings that are available for the account.

Get ticket

Get information about a specific ticket.

Get ticket audit

Get information about a specific ticket audit.

Get ticket form

Get information about a specific ticket form.

Get user

Retrieve a specified user.

Import ticket

Imports a ticket to Zendesk from a legacy system. Unlike 'Create ticket', this operation allows you to set system parameters like 'created_at', 'updated_at', and 'solved_at'.

List agents DDL

List article attachments

List all attachments in a specific article.

List article attachments DDL

List article comments

List the comments created by a specific user, or all comments made by all users on a specific article.

List article comments DDL

List article labels

Retrieve all labels given to a specific article.

List article translations

Retrieve translations for a specific article.

List articles

Retrieve list of all articles.

List articles DDL

List assignable group memberships

List the assignable group memberships.

List audits for a ticket

List the audits linked to a specific ticket.

List audits for a ticket DDL

List brands

Retrieve a list of all brands for your account sorted by name.

List categories

List all categories in knowledge base.

List categories DDL

List custom user roles

Retrieve a list of custom user roles.

List custom user roles DDL

List group memberships

List the group memberships e.g. list the agents and the groups that they are assigned to.

List groups

Get a list of all of the groups in your Zendesk account.

List groups DDL

List labels

List all labels in knowledge base that can be applied to articles.

List labels DDL

List locales

Retrieve a list of locales available to the account.

List locales DDL

List organization fields

Get a list of all of the available organization fields in your Zendesk account.

List organization fields ID DDL

List organization fields key DDL

List organization memberships

Get a list of all of the memberships (users) attached to this organization.

List organizations

Get a list of all of the organizations in your Zendesk account, grouped into pages.

List organizations DDL

List sections

List sections.

List sections DDL

List ticket active custom fields DDL

List ticket active fields DDL

List ticket comments

List the comments (both public and private) linked to a specific ticket.

List ticket fields

Get a list of all the ticket fields.

List ticket forms

List of all ticket forms for your account if accessed as an admin or agent.

List ticket forms DDL

List ticket tags

List the tags linked to a specific ticket.

List ticket tags DDL

List tickets

Get a list of all the tickets.

List tickets for organization

Get a list of all the tickets for an organization.

List tickets for user

Get a list of all the tickets for a user.

List translations

List all translations for a given article, section, or category.

List triggers

Retrieve a list of triggers for the current account.

List user fields

Retrieve a list of user fields.

List user fields DDL

List user fields keys DDL

List user identities

Get a list of all of a user's identities, including emails and phone numbers.

List user identities DDL

List users

Retrieve a list of users.

List users DDL

Make user identity primary

Make one of a user's identities the primary identity.

Raw HTTP request (advanced)

Perform a raw HTTP request with some pre-configuration and processing by the connector, such as authentication.

Search

Search for tickets, users, and organizations by query parameter.

Search organization by name

Search for organizations using the name of the organization.

Search organizations by External ID.

Search for organizations using the value of an "External ID" field previously set.

Search users

Search for users by query string.

Search users by ID

Search for users by ID or external ID.

Update organization

Update an organization.

Update organization field

Update an organization field using a specified organization ID.

Update ticket

Update information about a ticket.

Update ticket form

Update an existing ticket form.

Update trigger

Update a trigger.

Update user

Update an existing user.

Update user field

Update information about a user field.

Upload attachment

Upload a file attachment to Zendesk. A token will be returned, allowing you to attach files to tickets.