Building NPS Reports in EXPLORE with Survey App data

Building reports over in Explore to measure your survey data starts with creating a new query, and then within that query, we need to create a few calculated metrics that you can use in another query that will ultimately measure your NPS over time.

Query 1: NPS Breakdown by month/year (line chart)

Query 2: NPS Calculated Score by month/year (bar chart)
*requires metrics that you build in query 1.

So in the first query, we'll be creating the following 3 calculated metrics that we'll need before we can create the second query that actually measures the NPS score:

1. #ALL tickets with an NPS rating

2. #NPS Detractors

3. #NPS Promotors

The reason we need these metrics is that the formula for NPS is:

nps_score_graphic2.png
Source: Zendesk: Analyzing-your-Net-Promoter-Score-survey-results

 

Note: It has come to our attention that depending on how much data you're looking to deal with, Zendesk Explore may not have the capacity to be able to report on NPS based on the actual ticket event that the NPS was recorded on. This is due to Zendesk Explore limiting SQL results to 50,000. While this is a disappointing limitation of Explore, we have created a video outlining alternate ways to build NPS reports at the bottom of this article

 


Query 1: NPS Breakdown by month/year

To create a new query over in Explore click on the queries icon on the left and then click on "New Query" on the right like this:

Zendesk_Explore.png

Then you'll need to select a dataset to create the query from. Since our reports will need to be measuring scores from the actual point at which the ticket was updated with the latest score, you'll need to select "Support: Ticket updates" like this:

Zendesk_Explore.png

 

Now we need to build our first calculated metric. To do this click on the calculator icon on the right of the screen and select 'Standard calculated metrics' like this:

Zendesk_Explore.png

Now give your metric a name like "Survey App #ALL NPS tickets" and in the formula copy and paste this code:

IF ([Changes - Field name] = "Organization score (0-10)")
THEN
IF ([Changes - New value] < 11)
THEN [Ticket ID]
ENDIF
ENDIF

 Your metric should now look like this: 

Zendesk_Explore.png

Finally, at the bottom click on "Save".  

Now, before adding it to the query, you'll need to edit this metric so that whenever you add it, by default, the aggregator is always set to D_COUNT rather than the SUM. The reason why we set it to D_COUNT is that we only want to measure the DIFFERENT unique values. ie. We don't want to measure an NPS score twice on the same ticket.

To set the default aggregation, click "Add" from the metrics section, then under 'Calculated metrics' click to edit "Survey App #ALL NPS tickets" like this:

Zendesk_Explore.png

 

To set it so this is set by default when using it on any query, click to edit it, then over under options click 'edit aggregators' like this:

Zendesk_Explore.png

Now select "D_COUNT" and click "Save" like this: 

Banners_and_Alerts_and_Zendesk_Explore.png

Great! This now means that whenever you use this metric in future it will default to the correct aggregator. To add the metric to the query now click on "Add", "Calculated metrics" and then on the new metric like this:

Zendesk_Explore.png

Ok sweet! You've now finished your first calculated metric and should be seeing a number in your query once you let it finish calculating (it can take a while).

Zendesk_Explore.png

At this point, you should now save your query by giving the query the name "NPS Breakdown" and click 'save' at the top right like this so that you don't lose your work.

Zendesk_Explore.png

In order to create the next two metrics, we can do this faster by duplicating the one we just created. To duplicate a calculated metric, click to edit it, then under 'options', click on 'duplicate' like this:

Zendesk_Explore.png

...and then click 'OK' for it to be connected to "Ticket updates" like this:

Zendesk_Explore.png

Ok now if you click to add a new metric to your query you'll see the duplicated metric which you can then click to edit (pencil icon) like this:

Zendesk_Explore.png

Now rename the metric to "Survey App: #NPS Detractors" and change the formula to look for only tickets with a score less than 7 like this:

Zendesk_Explore.png

If you'd prefer to copy and paste the formula, here it is:

IF ([Changes - Field name] = "Organization score (0-10)")
THEN
IF ([Changes - New value] < 7)
THEN [Ticket ID]
ENDIF
ENDIF

Now you can add this metric to your query as well. Your query should now look something like this:

Zendesk_Explore.png

Finally, you're going to need to duplicate the metric one last time to measure the NPS promotors (ie. ratings above 8). Call it "Survey App: #NPS Promotors" and set it to look for scores > 8 like this.

Zendesk_Explore.png

Once again, here's the code if you want to copy and paste instead:

IF ([Changes - Field name] = "Organization score (0-10)")
THEN
IF ([Changes - New value] > 8)
THEN [Ticket ID]
ENDIF
ENDIF

You can then add the final calculated metric to your query like this:

Zendesk_Explore.png

However, you may note that the report doesn't look like it should. This is because we now need to slice the data based on the time the NPS scores were added to the ticket. To do this in columns click on 'add', and under 'Time - Ticket update' select both 'Update - Year' and 'Update - Month' like this:

Zendesk_Explore.png

Now your report will be broken down by months and years you've been collecting your scores from in a line chart like this (once again, note this can take a while to calculate due to the slowness of Explore so be patient).

It's important to note here the order in which you add the columns. They should be ordered 'Update - Year' above 'Update - Month'. If you have it around the other way, then all the same months will be clumped together (eg. January 2017, 18 & 19 will appear next to each other etc).

You should be looking for a chart that looks something like this:

Zendesk_Explore.png

You can then filter your results to only show you the last year. To do this click on "Update - Year", then on the years you want to see, like this:

Zendesk_Explore.png

At last, you have a report showing you your breakdown of NPS Promotors, Detractors and ALL ratings over the last X months (depending on your filter) like this:

Zendesk_Explore.png

IMPORTANT: MAKE SURE YOU SAVE YOUR QUERY! If you don't save your query and move away from it, then all of your custom calculated metrics will be lost.

Zendesk_Explore.png

 

 


 

Query 2: NPS Score by month/year
Note: you can not build this query without first building the calculated metrics in query 1.

Ok now that you've completed the first query above. The calculated metrics that you created as part of it can then be used in this next query to generate an NPS score report.

To create your next query at the top left click in the queries icon and at the top right click on 'New Query' like this:

Zendesk_Explore.png

Once again we'll need to make sure this query is using the right dataset, so select "Support: Ticket updates" like this:

Zendesk_Explore.png

Now on the right click to create a new standard calculated metric like this:

Zendesk_Explore.png

Call it "Survey App: NPS Score".

The metric you will be creating will look something like this:

Zendesk_Explore.png

However, since the metric requires you to reference the calculated metrics you've already created in Query 1 above, these need to be referenced specifically by searching for them in the 'Field selector' at the bottom. The video below shows precisely how to do this to create the required metric and resultant query: 

 


 

Note: Depending on the amount of data you need to report on, building the report based on the above method may result in Zendesk Explore giving you an error message saying that results are limited to 50,000. While this is a disappointing limitation of Explore, we have created a video outlining alternate ways to build NPS reports below:  


Was this article helpful?
4 out of 4 found this helpful

Comments

9 comments

  • Thanks Peter! Really appreciate this video, was a huge help for us in migrating to Explore.

    For anyone who needs Passives - I also did the same formula for each score using =X where X is the score, then got the number of Passives by adding 7 + 8 together

    So for #NPS score 8

    IF(VALUE(Satisfaction score (0-10))=8)
    THEN
    [Ticket ID]
    ENDif

    Then for #NPS Passives

    ((D_COUNT(#NPS Score 7)+D_COUNT(#NPS Score 8)))

    It would be good to exclude merged tickets if possible, I haven't worked this one out just yet.

    Thanks again.

    0
  • Hi Mel, I think you should be able to exclude the merged tickets by wrapping the metric in an IF statement that checks for the absence of the "closed_by_merge" tag before it counts the ticket. It seems to work for me but let me know how you go with this...

    0
  • Hi Peter Godden,

    Is it possible to pull the comments into a query? 

    Thanks!

    0
  • Hi Melissa, to my knowledge, the comments get pulled into Explore as attributes rather than things you can calculate metrics out of. In other words, the like of the "Organization score comment" field should appear as something that you can add to a query via the columns or rows section. 

    0
  • Yes it is possible, I have built a query that does this.

    I have 2 metrics in the query "SUM (Satisfaction Score 1-10)" which is a built in and a custom metric "All NPS Rated Tickets"

    I then added the attributes I wanted Ticket ID, Assignee etc including the "Ticket Satisfaction Comment" field

    IF(VALUE(Satisfaction score (0-10))<11)
    THEN
    [Ticket ID]
    ENDif
    1
  • We're brand new customers of Sweethak Survey and it looks great in that we get more granular rating data. I also like what I see (above) in that we can use Explorer to reference Survey numbers.

    However, not being familiar with ZD Explorer (yet), would it be possible for us to build a report that includes the Organization and Requestor info AND Survey data? ZD dropped the Satisfaction report where we had customer names and comment for reports, but Explorer doesn't provide customer comments today and while Survey does, Survey doesn't provide the customer name info due to privacy. Org, Requestor, Survey info on one report ... is it possible or should we stick to csv exports and continue to corelate using spreadsheet?

    0
  • Hi Chris, thanks for the questions. Yes you should be able to build reports over in Explore that contain the Survey information sliceable by org / requester so you should be able to move from doing these in CSV files. See how you go and if you run into any issues drop us a support ticket at support@sweethawk.co containing all the specifics of exactly the report you're looking to build (screenshots & videos help) and we'll see if we can help.

    0
  • I don't know what happened here, but this report seems entirely divorced from the csv data that I export directly from my Sweethawk dash? It's like this report invented more scored events???

    0
  • Hi Sarah, thanks for posting. Note that depending on the way that the report is being sliced will determine the month the data falls into. You can also click on an Explore report and select to "decompose" a specific set of data to find what ticket IDs make that data up in order to identify where the data is coming from. It is possible that something needs to be tweaked in the reports configuration, so given that you currently have an open ticket with us, let's work together there to get to the bottom of this one. 

    0

Please sign in to leave a comment.