Getting custom field data into Zendesk tickets and reporting on them with Zendesk Explore

Christina Dechent
Christina Dechent
  • Updated

Custom fields are a nifty feature of the babelforce platform which allow you to display call data in special fields in the left-side information panel of a Zendesk ticket. 

Use case: Creating reports on the average speed of answer 

This guide is split into two parts:

  1. Configuring a custom data field in a babelforce Automation and displaying it in Zendesk. We will be using an expression to find the total length of time before an inbound call is taken by an agent.
  2. Creating a metric that produces the average of this value, then drilling down into this data to produce a report showing the average speed of answer across a specific timescale. For this, we will use 'Zendesk Explore.

1a) In Zendesk

In order to create fields to put our custom call data into, we need to navigate in Zendesk to the 'Settings' cogwheel at the bottom of the left menu. Then find 'Ticket Fields' in the 'Manage' section. Click 'add field' and select the 'Decimal' type. Finish by entering the name of our field value - call it "pre_taken_time" - and click 'Save'. 

This field is now available in all new tickets, and will display only decimal number values. 

1b) In babelforce

We will be using a babelforce expression in this part. This article explains what they are and lists some useful examples. 

To begin with, let's think about what we want to achieve. The babelforce platform automatically counts the length of a call in seconds, either from when a call attempt is begun by an agent, or when an inbound call arrives at the platform. In order to only find the length of time before an inbound caller speaks to an agent, we need to make sure this count is automatically measured when the call is bridged. 

The 'pre_taken_time' can only be measured if an Automation forces the platform to read it at that moment and use the value in some way. It is important that this Automation only runs if certain conditions are met:

  • A Zendesk ticket has already been opened by the Action 'Create ticket'
  • The call is bridged to an agent
  • The call type is inbound

Create an Automation by navigating to Integrated processes > Global automations > Add. Give it a name that describes exactly what it does and under which conditions, and make sure that the point at which it tests the condition to fire the action - i.e. the 'Event' - is 'Call bridged'. The 'Action' should be 'Update ticket', updating the ticket which should already have been created. 

Ensure that the correct integration option is selected, and that any tags, comments, or ownership settings are entered into the relevant settings tabs. 

The following screenshots show the key configuration details for this Automation and its Trigger:



 This is what the Trigger should look like:


In the Automation settings, you will notice straight away that the 'Fields' tab has been populated by the custom fields you have configured in your Zendesk, and that you have the option of adding a value for each. The key thing to note here is that we are using the expression {call.duration} to measure the length of the call at this point. Putting this expression in this field is like using it anywhere else in your call flow - it is simply a variable that evaluates to a certain number of seconds depending on the call and the time. 

Once we get the Automation running at the right time during the call and update the ticket, the custom field variable will be measured and entered into the custom ticket field in real-time. Note that any information you enter in the 'Fields' tab is independent of other updates to the ticket. So no matter what other updates you configure in the 'Comment', 'Ownership', or 'Tags' tabs, the custom data will still appear.

At this point, it is a good idea to check that your custom field data is working. First, you will need to ensure that your call flow is opening a ticket for inbound calls with the Action 'Create ticket', and that this is writing some kind of tag that indicates that it is an inbound call (in our case we have used "call_inbound"). This tag will be important later.

Test your new Automation with a call and roughly count the number of seconds before you are bridged with an agent's device. Hang up and locate the ticket created in Zendesk. The left-hand panel should display the custom data taken from that call.


3. In Zendesk Explore

Now that you have your Automation and custom data field set up correctly, it is unlikely that you will have any significant data yet with which to measure the average speed of an answer. Luckily we do, so let's set up our report in Zendesk Explore If you do not know where to find it, it's here:


As a first step, you need to build a new query. Choose the Queries library which is the 3rd icon from the bottom in your left-side menu. Then click on the 'Select new query' button in the upper right corner. Once there, choose a data set - in this case, it will be Support, and the dataset type 'Tickets'. Then click 'New query':


Now you need to define your metrics - click the 'Add' button in the metrics section, scroll down to the bottom to find the Numeric custom field, and, once there, select the field we created earlier 'pre_taken_time'. Confirm by clicking 'Apply'. By default your metric will be shown as a sum, to change to average, click on the newly created metric and select AVG.


Next, in the Columns section, choose Time - tickets last updated > Day of week.


Then change the visualization style to columns by clicking on the top icon in your right-side menu. Remember to also add the right filters - you will find the 'Add' button for the filters above your graph. First of all, search for the Tickets> ticket tags. Apply the new filter and by clicking again on it, choose the filtering value (in our case it's 'call_inbound'). 

You can also modify your metric - change its colors, define the axes, etc. 

Once you're ready, click 'Save' and go back to your Dashboards. Choose the Dashboard you want to modify, click the 'Edit' tab on top of your screen, then choose the 'Add' button in the upper right corner > Add query and select the query you created. 


And that's it! Your query has now been added to the dashboard. Keep in mind that this is just a basic setting - you can easily modify it according to your needs.

Was this article helpful?




Please sign in to leave a comment.