Report Covering New and Reopened Tickets

3 Comments

  • Amy Dee
    Comment actions Permalink

    Hi Dave! There isn't a default metric that includes creations and reopens, but the components you need are available in other metrics and recipes. You'll just need to combine them.

    For ticket creations, I recommend this recipe: Ticket creation events. It counts tickets based on the event where the status changes from nothing to something. For ticket reopens, we have a default metric called # Tickets Reopened. It counts tickets based on the event where the status changes from solved to open/pending/hold.

    The two metrics are very similar, so you should be able to combine them with OR logic:

    • SELECT COUNT(Ticket IdTicket Text Field Change) WHERE Text FieldStatus AND Ticket Status <> Deleted AND ( [Text Field] Previous Value(empty value) OR ( [Text Field] Previous Value[Status] solved AND [Text Field] New Value IN ([Status] open[Status] pending[Status] hold) ) )

    This counts tickets that have not been deleted, based on a change to the status field. The part at the end means it counts status changes from empty OR status changes from solved to open/pending/hold. (Careful with those parentheses!)

    If you slice this metric by (Event) dates, it should show you the total number of tickets created or reopened in that period.

    For more information on using the metric editor, keep this guide handy: Creating custom metric in Insights. For more information about using ticket events and field changes in metrics, check out this article on building metrics for the Events model in Insights.

    Quick disclaimer: This metric is for demonstration purposes only. Zendesk does not support custom code. I can't guarantee this for all use cases, and I strongly recommend that you audit your results.

    I hope this helps! Happy reporting!

    1
  • Dave
    Comment actions Permalink

    Thanks, but I'm still not clear on how to limit the results to a given date range. Should I be applying any kind of native filter, or relying solely on the MAQL to do the filtering? If so, can you point me to an example of how MAQL handles date ranges? I didn't see that kind of documentation in the articles you linked to.

     

    Appreciate the help!

    0
  • Graeme Carmichael
    Comment actions Permalink

    Dave

    You should be able to filter your report using the native filter button. So you do not need to make your custom code more complex. 

    For this report, use the dates within the Date (events) folder. 

    1

Please sign in to leave a comment.

Powered by Zendesk