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

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 pane 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 Event 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 which 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 Gooddata, a BI tool embedded in Zendesk.

If you have not already read it, being familiarity with the methods described in this article on Gooddata reporting is essential, as the topics and concepts below will be covered in less detail.

1. a) In Zendesk

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

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

1. b) 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 Event forces the platform to read it at that moment and use the value in some way. It is important that this Event only fires when certain conditions are met:

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

Create an Event by navigating to 'My Settings' > 'Events' >'Add Event Trigger'. Give it a name which 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' option - is 'Call bridged'. The 'Action' should be 'Update ticket', updating the ticket which should already have been created. 

At the bottom under the 'General' tab ensure that the correct integration option is selected, and that any tags, comment or ownership settings are entered into the relevant settings tabs. 

The following screenshots show the key configuration details for this Event and its trigger:

 

In the Event settings you will notice straightaway 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 a simply a variable which evaluates to a certain number of seconds depending on the call and the time. 

Once we get the Event firing at the right time during the call and updating 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 a 'Create ticket' event, and that this is writing some kind of tag which indicates that it is an inbound call (in our case we have used "call_inbound"). This tag will be important later.

Test your new event 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 pane should display the custom data taken from that call:

 

3. In Gooddata

Now that you have your event 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 answer. Luckily we do, so let's set up our report in Gooddata. If you do not know where to find it, it's here:

First, we will need to aggregate our 'pre_taken_time' into a metric which we can use. Gooddata have us covered here, making it very easy to create multiple metrics from your custom field data. To do this, once you are in the Gooddata portal navigate to 'Manage' on the top menu and then 'Facts' on the left hand side. 

Then find and click on 'pre_taken_time' from the list. This brings up some options which make various aggregations possible. In our case it only makes sense to find an average metric for this figure, so click on the 'Create' button next to the 'AVG' option. 

The metric should be created and appear immediately. But we are not done with it yet. We need to apply more conditions to make the metric accurate. What if you wanted to measure the average speed of answer for more than one call flow, or in a different queue? To differentiate these cases in Zendesk you would assign certain tags to tickets created in these different cases. Therefore it is a good idea to differentiate in Gooddata.

For now we just want to ensure that it is measured for all inbound calls, so we will use the tag from earlier ("call_inbound") in the condition.

In the same window as where you created the metric, click on its new name ("pre_taken_time [AVG]"), and in the resulting pane click 'Edit'. This will open up a pop-up 'Metric Editor' box with a simple formula already displayed. Add the following elements to the formula, all separated by a space: 

  1. "WHERE" (typed)
  2. 'Attributes' > 'Ticket Tags' > 'Ticket Tag'
  3. "=" (typed) 
  4. 'Attribute Values' > 'Ticket Tags' > 'Ticket Tag' > "call_inbound"

This should be the outcome:

Give your metric a suitable name and hit 'Save'.

This metric is now available for you to use and any reports you create using it will be continually updated with the data from your 'pre_taken_time' field. 

Now we can also use Attributes in the 'How' tab and Filters to specify the timescale and drill down to create a custom report. Here is a report on the average speed of answer comparing only Mondays, Thursdays and Fridays in July 2016:

 

Have more questions? Submit a request