Recipe: Recording and reporting on specifically who approved tickets.


This article is for Zendesk approvals app Approve, which is our newest app for building approval processes.

If you're needing information on our older app Zendesk approvals app Approvals please see this section of our knowledge base.

This article explains how, using the SweetHawk Approve app, when the response of an approver is to proceed (aka they approved) their identity and action is recorded into a multi-select dropdown field ready for slicing into reports in Explore.


To build this report there are a few steps to follow:

1. Create a multi-select dropdown field containing all of the approvers you want to track. 

2. Change the settings in the Approve app to tag the ticket based on who approved it. 

3: Hide the reporting field so that it can not be altered. 

4. Build the report over in Explore.


Step 1: Create a multi-select dropdown field.

To do this, go into the Admin Center and then under Objects and rules, click into Fields and on the right click Add field like this: SweetHawk__-_Agent.jpg

Now name the field "Reporting: Who granted approval" and select the Multi-select type like this: 


Now type in the first name of the first approver who you want to track and then click to Show tags like this:


At this point, you will need to change the tag to include the user's Zendesk ID. To get a user's Zendesk ID you will need to open a new browser tab. Then do a search for the user like this:


After clicking on the desired user, the browser URL will change to include their ID. Copy this ID like this...


Now go back to your other tab and paste the ID into the tag field for that user. After the ID, append "_granted" so that we know that this tag is specific to when an approver granted their approval. 


Repeat this process for each and every approver you want to report on. In the end, you should have a list that looks something like this: SweetHawk__-_Agent.jpg

Finally click Save.


Note: If you're using Zendesk Forms, then you will now need to add this new field to each of your forms. For more information on Zendesk Forms see here.


Step 2. Change the settings in the Approve app.

To change the settings in the Approve app to tag the ticket based on who approved it first you will need to click into the Approve app admin and then into Settings.

Now under New response set it to Add tags and paste in the following liquid:

{% if response.status == 'proceed' %}{{}}_granted{% endif %}

Like this:


What this is doing is that at the point an approver takes action to grant an approval a tag will be added to the ticket with their Zendesk ID that ends in _granted. 

When a ticket is updated containing a tag that matches a selection from within a field, this will automatically select that option from that field.

In other words, things are now setup correctly to record who granted approval on a ticket.


Step 3: Hide the reporting field so that it can not be altered. 

Now that you have a ticket field that is recording who took approval action on each ticket, its important that that data is not editable by agents to ensure data integrity. You can stop agents from being able to access this field on tickets by either using our free Hide Ticket Fields app or you may also be using our Field Conditions app. Both work in very similar ways. 

To hide the field, simply click into the app, scroll down and check the box next to the field like this: 



Step 4. Building the report.


Alternate considerations:

While this article does not show you how to report on multiple approvals that take place on a single ticket, this is also possible by creating more granular data collection vehicles. For example you may want to setup a different multi-select field for each type of approval. Alternatively you could alter the liquid entered into the settings that builds out the tag placed on the ticket. ie. This liquid could be changed to also include the approval definition id. 

Another thing to note is that this article only talks about when approvals are granted.

If you simply want to report on if approvers actioned something, rather than having (id)_granted tags in the multi-select dropdown field. You could change the field to (id)_actioned. Then over in the settings you would removed the conditionality from the liquid to simply add the tag like this:


On the flip side, if you would also like to track when approvals are rejected you could build another multi-select field for this where the approvers are listed out again and their tags could be structured like this: (id)_denied. Then in the settings of the app, you would need to add the extra condition to check for denied approvals like this:

{% if response.status == 'cancel' %}{{}}_denied{% endif %}

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



Please sign in to leave a comment.