Snippet usage by agent

Reports using ticket logs

Requirement: create a report to show frequency of usage of snippets by each agent, with a pull-down to select the time period.

Title: Snippets used ${date} split by agent

SELECT DPQL_OBJ_LANG(ticket_object_use_logs.snippet.category.id,
'text_snippet_categories') AS 'Snippet Category', OBJ_LANG(ticket_object_use_logs.snippet.id, 'text_snippets') AS 'Snippet', DPQL_COUNT() AS 'Uses'
FROM ticket_object_use_logs
WHERE ticket_object_use_logs.snippet.id <> NULL AND ticket_object_use_logs.date_created = %1:DATE_GROUP%
SPLIT BY ticket_object_use_logs.person
GROUP BY ticket_object_use_logs.snippet.id
ORDER BY DPQL_COUNT() DESC

Variable

image.png

Note that you need to use DPQL_OBJ_LANG() to get the snippet title and category name. This is a quirk of snippets and the function is not used elsewhere. If there is no snippet title entered, you will get the ID instead.

The output you get from this report will be like this:

../_images/reports-snippetsbyagent.png

Published: 22/05/2018

Last updated: 22/05/2018