|
This article is for Approve, which is our newest app for building approval processes. If you're needing information on our older app Approvals please see this section of our knowledge base. |
This article explains how, using the SweetHawk Approve app, when the status of an approval is changed to granted, the date of that event is recorded in a custom date field of your choice.
That date field information will then automatically flow into Zendesk Explore where it can be used to slice up queries and report on when and how many tickets were approved.
Step 1: Create a custom date field.
Step 2: Set the date field when approval is granted.
Step 3: Ensure the date field is hidden for all agents.
Example report of how many tickets were marked as approved each month:
STAGE 1: Recording the date.
Step 1: Create the custom date field.
To create a custom date field, first click on the cog on the left of the screen, go into Ticket Fields, and on the right click on Add field like this:
Then give the field the name "Date approval was granted", select Date from the options and at the bottom right click on Save like this:
Step 2: Set the date field when approval is granted.
Now on the left of the screen click into the Approve app, go to Settings and then under "Approval status change ticket update" click the + icon on the right. Search for the field called "Date approval was granted" and select it like this:
Now in the field place the following code:
{% if request.status == 'granted' %} {{'now' | date: '%s' | date: '%Y-%m-%d'}} {% endif %}
It should look like this:
Step 3: Ensure the date field is hidden for all agents.
There is a very easy way to ensure that agents are not able to manually set the date in this field. That is, to ensure this field is not added to any of your Zendesk forms. If the field does not exist on the forms, agents will not be able to update it.
You may be wondering then, how could the field be updated by the app if it doesn't exist on the form? This is because of the way that this field will be updated. Even though it doesn't exist on the form, it still exists! ...and information can still be pushed into it via the API. This is exactly how the app updates fields based on the Settings in step 2 above.
|
Note: if you are on a Zendesk plan that does not have access to Zendesk forms, then instead of using this method, you will need to use our free Hide Ticket Fields app. |
STAGE 2: Building a report in Explore.
Before beginning stage 2 you may need to wait between 1-24 hours until the field that you've created above gets pushed over into Explore. It will also take some time for Approval date data to naturally build up so it may be worth waiting longer until that happens.
Go to Explore and click into the Queries section like this:
Now click to create a new query at the top right.
Now select Support, set the dataset to Tickets, choose the default data set and select New query like this:
At the top right of the screen click add next to Metrics click Add, search for Tickets, click Tickets and select Apply like this"
Now in the Columns section click on Add, search for the "Date approval granted" field and select Date approval granted - Month and click Apply like this:
Now you will need to exclude all tickets that do not have an approval granted date set, you can do this by clicking back into the Date approval was granted item in Columns, then under Excluded check NULL and click Apply like this:
You can then go about setting things like the visualization type as per your preference, or applying further columns to slice the information by. Once you're happy with the information in your report, be sure to give it a name and then Save it for use in any of your dashboards like this: