Imagine you are the owner of a Shopify shop and all products after sale are managed by different teams.

In this tutorial we'll show you how to route incoming tickets to the right agent group based on Ticket field values and be sure that the right data is set in the tickets.

Before you get started, make sure your teams are defined as agent groups in Zendesk administration.

Part 1: Connect Zendesk administration

Step 1: add Shopify datasource

For this tutorial we will use a Shopify datasource.

First, you'll need to add the Shopify connection in Elements Connect (follow step by step here: Configuration for Shopify datasource)

Step 2: define datasets

Now that we have linked our datasource, we'll define datasets.

We'll create several datasets:

  • Brand: all the brands we sell in our shop "MyShop"
  • Brand outfits: One Dataset that will present all outfit sold by each brand.

Brands dataset:

We want to fetch all the vendors we have in our Shopify store and keep them synchronized.

To do this we'll need to create a new Dataset (as presented here: Configure a Shopify dataset ).

Give this dataset a name: "MyShop Brands" for example.

Select your datasource you created in the previous step. Here: MyShop

We only want active products, so we'll set the following filter: Status is active

Now select the field we want to fetch: for this example it's vendor

You can execute the query to see the result.

Now we need to define what data we want to be displayed in ticket field values.

Click on the button above the template definition (in this example, vendor) to pre-fill the template.

It will define this template :


We can preview the result by clicking preview button.

As everything looks fine, we can save it by clicking the "Create" button.

Product dataset:

The next step is to create a product dataset, for example for the brand Nigel Cabourn products.

Create a new dataset called "Brand Nigel Cabourn" and follow the same steps as for the first dataset, but this time add a new filter: vendor is Nigel Cabourn

We also to fetch different information, such as the product type and the product name. In Fields to query, select product_type and title.

Don't forget to create your display template. In the image we've used double colons to create a multi-level drop down list.

Save the dataset and do the same for all the other brands.

At the end you will have these following datasets defined:

Step 3: Sync field creation

As all the datasets are configured, we can now move to the sync field creation.

On the sync field menu, click on "Create a new sync field".

We will create 11 sync fields, one synced to each dataset.

On the sync field creation menu, select New field:

In the new field creation page, fill it as following, it's very similar to custom ticket field creation from Zendesk administration.

Name: My Shop Brand

Type: Drop-down

Permission: Editable by End-user and required to submit a ticket (we want the end user to select the product s/he has trouble with when creating a ticket).

Field values: Select from the drop-down one of the dataset we created, here, "MyShop Brands"

When everything is ready, we can click on "Save and Sync" button to launch the creation of the Custom ticket field and synchronize the values with the datasource.

We now need to do it again for the other datasets.

Status are in green, it means that the synchronization went well. If not, check the troubleshooting page in our documentation.

Our work in Elements Connect is done here.

Now, let's go to Zendesk ticket field administration.

Part 2: Ticket form administration

We can see that we have our sync fields.

Step 1: Create a new Ticket Form

Now, let's create a new Ticket Form in Zendesk administration:

In the new ticket form called "My shop", we add the Ticket fields that we just created.

Make sure to select "Editable for end-users" and to give it a title for end-user. Here we called it "MyShop Support".

Then click the Save button.

Step 2: Set up conditional fields

Back on the Ticket form menu, we can now also set up conditional fields, to show in the form only the products of the brand selected in the first field.

The How-to of that is hereHow to add custom fields to your support request forms that display data from your SQL databases 

Our form is now complete, let's now set-up the triggers.

Part 3: triggers administration

Step 1: Add a new trigger

Go to Zendesk administration/Trigger menu

Click on the Add trigger button to create a new trigger.

Add a name on the trigger, let's say "United by blue support"

Now we need to define conditions:

First, we want to activate this trigger on new tickets so the condition will be:

Status is New

Secondly we want the field My Shop Brands to be United By Blue

Now that want have the shirt type to be filled but it's not mandatory so we will put this one in the Any condition

Step 2: Set actions

We have now defined the trigger activation conditions, let's set the actions.

We will set the agent group to United by Blue support

We will also set the Status to Open

We can also decide to send an email to this United by Blue support group

We click now on the Create action to save the trigger

We will do this for the other products

That's it, it will save your agents lot of time.

Don't forget to keep your fields synchronized with your Shopify account by going in the Elements Connect administration : Ticket field synchronization