fivetran / dbt_zendesk

Fivetran's Zendesk Support dbt package
https://fivetran.github.io/dbt_zendesk/#!/overview
Apache License 2.0
25 stars 30 forks source link

[Feature] New hours to solve measure #119

Closed fivetran-jessicacherny closed 7 months ago

fivetran-jessicacherny commented 8 months ago

Is there an existing feature request for this?

Describe the Feature

My stakeholder wants to track a new definition of MTTR (mean time to resolution). Today, we track full resolution time (i.e. total calendar days from ticket creation date to final solved date (i.e. latest solved date when ticket is reopened).

We actually only want to track the number of hours the ticket was not in the closed or solved status i.e. only tracking total time in open, pending, on hold. We call this Avg. Hours to Solve internally in our Looker instance.

Describe alternatives you've considered

No response

Are you interested in contributing this feature?

Anything else?

No response

fivetran-joemarkiewicz commented 8 months ago

@fivetran-jessicacherny thanks for opening this feature request, this addition of a new "hours to solve" measure makes sense as an impactful addition to our end ticket_metrics model.

To confirm, I would imagine this solution would involve a new metric that expands upon the requester_wait_time_in_minutes metric. This expansion would include the addition of the pending status.

Current https://github.com/fivetran/dbt_zendesk/blob/62df5b5fee7e448357f92c007c8212a0d6ece2f7/models/agent_work_time/int_zendesk__ticket_work_time_calendar.sql#L13-L14

Proposed Update

case when status in ('new', 'open', 'hold') then status_duration_calendar_minutes 
     else 0 end as requester_wait_time_in_minutes, 
case when status in ('new', 'open', 'hold', 'pending') then status_duration_calendar_minutes 
     else 0 end as solve_time_in_minutes, 

Similarly I know there are custom statuses that Zendesk allows users to create. So maybe it would make more sense to take the following approach.

case when status in ('new', 'open', 'hold') then status_duration_calendar_minutes 
     else 0 end as requester_wait_time_in_minutes, 
case when status not in ('solved', 'closed') then status_duration_calendar_minutes 
     else 0 end as solve_time_in_minutes, 

Let me know what your thoughts are and if this matches what you are looking to incorporate into the package?

fivetran-jessicacherny commented 8 months ago

lgtm, @fivetran-joemarkiewicz!

fivetran-avinash commented 8 months ago

Hi @fivetran-jessicacherny, I'll be working on this task this sprint and should have it ready for deployment by the end of it!

fivetran-joemarkiewicz commented 7 months ago

@fivetran-jessicacherny this is now live in the latest v0.13.0 release of the Zendesk package. Thanks again for working with us to incorporate these changes in the package!