list all tickets where a given agent changes the status to solved

3 コメント

  • Amy Dee
    Zendesk team member

    Hi David! The metric you created looks for solved or closed tickets with at least one update with a public comment from an agent/admin who is not the current assignee. It doesn't focus on solve events.

    If you're just interested in the solve, I recommend this template to start:

    WHAT - # Tickets Solved 
    HOW - Updater
    FILTER - List of Values - Updater Role in AgentAdmin 

    The default # Tickets Solved metric counts solved tickets based on the event where the status goes to solved or closed from something other than solved. With this metric, the Updater is the person (or process) that actually set the ticket to solved. 

    You can use Updater Role to focus on agents in general, or filter for specific updaters. You can also use Date (Event) to filter the date. 

    I hope this helps! Happy reporting!

  • David Scczerak

    Hi Amy,

    Thanks for your input, I very much appreciate it.

    The recipe you've described doesn't do the job I need as written, but it put me on the right trail, and i think I might have it now... or very nearly.

    So, as written, your recipe produces a subtotal of tickets solved per agent. A useful report to be sure, but not my goal. My goal is a listing (one ticket per row) of all the individual tickets that a given agent has marked as solved (along with some other limitations).

    By starting with you recipe I was able to create something pretty useable.

    What = #tickets solved

    How = several custom fields, but most importantly ...  "ticket updater" and "ticket submitter"
    (submitter will allow us to limit the results to tickets "created" by a given agent, which updater will allow us to limit the results to tickets marked as solved by a given agent)

    Filter = Ticket Submitter is "john doe", Updater is "john doe", Date(ticket created) is "the last x days"


    This recipe will give a list of all tickets created by john doe, and also marked as solved by john doe, in the last X days... one ticket per row!

    NOTE: there are edge cases to be considered... e.g. if john doe creates a ticket, and solves it... but an end user replies with a "thank you" which reopens the ticket, and then agent jane smith comes along and cleans it up by closing it again. The report I've outlined does NOT include those tickets, since john doe was not the updater when the ticket was finally solved for the last time.

    Still, given how hard I was working to get this far, I'm calling it a win.

    The main objective was a discrete list like I was able to build, but I was interested to see a dashboard item that was close to being useful... the "Agent Activity" graph is loaded by default to show public comments vs solves for a given agent. This would be a handy visualization if I could tweak it to show tickets opened vs tickets solved. (Amy, if you have  a way of doing that, I'd be all ears)


    Many thanks again.


  • Amy Dee
    Zendesk team member

    Hi David! I have a few more tips and tricks to help you fine tune this report.

    It sounds like you found this already, but for anyone else reading this thread later: if you include Ticket Id under HOW, it will create a separate row for each individual ticket. (Make sure you set the little L/T toggle to L, so it makes rows down the Left instead of columns across the Top.)

    For finding all solves instead of just the final solve, you can make a customized version of the # Tickets Solved metric. The metric has some great logic for finding a solve event, but it's also limited to tickets that are currently solved/closed based on the final solve date.

    Here is the default metric:

    • SELECT IFNULL(COUNT(Ticket Id, Ticket Text Field Change), 0) WHERE [Text Field] New Value IN ([Status] solved, [Status] closed) AND [Text Field] Previous Value <> [Status] solved AND Ticket Status IN (Solved, Closed) AND Date (Event) = (SELECT MAX(SELECT Date (Ticket Solved) BY Ticket Id) BY Ticket Id)

    There's a lot going on there, but the key part is the first half: it's a count of tickets based on an field change, where the status goes to solved or closed from something other than solved. The second half has a filter for the current status and locks the date to Date (Ticket Solved).

    You can remove the date part completely and change the status part to "not deleted." The results would look like this:

    • SELECT IFNULL(COUNT(Ticket IdTicket Text Field Change), 0) WHERE [Text Field] New Value IN ([Status] solved[Status] closed) AND [Text Field] Previous Value <> [Status] solved AND Ticket Status <> Deleted 

    That should count all solves on a ticket, even if it is reopened and solved again later by someone else. Please note: this means the metric may not match an overall count of tickets, since the same ticket may be counted multiple times.

    For setting up your dashboard, it's possible to make different reports respond to the same filter, but use different user attributes. That could allow you to create a report based on requesters, a report based on assignees, and a report based on updaters, then put them all on a dashboard and use one dashboard filter to control them.

    This type of setup is possible with a disconnected user filter. That article goes into more detail on setting up your own filter. You could also save a copy of the Insights > View Only dashboard and poke around on the duplicate Agent Activity tab to see how it fits together. 

    I hope this helps! Happy reporting!



Powered by Zendesk