Recent searches


No recent searches

Working with business hours on custom metrics



Posted Sep 18, 2024

Hello Zendesk community,

 

I’m seeking assistance with a custom metric for calculating Corrective Action Response Time (CART). To give you some background, we calculate the time from when a ticket is created until a checkbox field, “Corrective Action Response Sent to End-User?”, is checked. The time is calculated using the Seethawk Timer app.

 

We have different breach conditions based on the client type:

 

Type 1: 6 hours

Type 2: 2 business days (12-hour schedule within business hours)

 

For Type 1, the formula I’m using to calculate breached time is as follows:

IF (VALUE(Corrective Action Response Time (mins)) > 360) 
THEN (VALUE(Corrective Action Response Time (mins)) - 360) / 60
ELSE 0 
ENDIF

This works fine, as it calculates the time that has gone past the 6-hour CART.

 

However, I’m struggling with the formula for Type 2. Here’s what I’ve tried so far:

IF (VALUE(Corrective Action Response Time (mins)) > 1440)
THEN
   ((VALUE(Corrective Action Response Time (mins)) - 1440) / 60) * (12 / 24)
ELSE
   0
ENDIF

The issue is that this doesn’t account for business hours. What I need is a formula that calculates the time past 24 business hours (based on a 12-hour working day). If the CART exceeds 24 business hours, I want to see the amount of breached time.

 

Any help on how to achieve this would be greatly appreciated!

 

Thank you so much for taking the time to read this!


0

1

1 comment

image avatar

Elaine

Zendesk Customer Care

Hello Gabriel,
 
Thank you for reaching out to the Zendesk community regarding your custom metric for calculating Corrective Action Response Time (CART). I understand the importance of accurately tracking breaches based on different client types, especially concerning your business hours.
 
For your Type 2 formula, since you're looking to measure time past 24 business hours within a 12-hour working day, you can try a modified approach. The calculation you've shared does not account for business hours, so you may want to incorporate business hour settings into your metric.
 
Here’s a formula that could help:
 
IF (VALUE(Corrective Action Response Time (mins)) > 1440)
THEN
((VALUE(Corrective Action Response Time (mins)) - 1440) / 60) * (12 / 24)
ELSE
0
ENDIF
 
However, to fully account for business hours, you may consider creating a more complex metric that calculates the number of business hours involved. For instance, since 24 business hours would be equivalent to 2 full business days in your 12-hour schedule, you can use:
 
IF (VALUE(Corrective Action Response Time (mins)) > 1440)
THEN
((VALUE(Corrective Action Response Time (mins)) - 1440) / 60) * (business_hours / 720)
ELSE
0
ENDIF
 
Make sure to replace business_hours with the actual hours relevant to your setup.
 
For further detail and best practices on handling time-based metrics, you can refer to the following article: Reporting on the duration of fields.
 
If you have any additional questions or need more specific guidance, feel free to reach out. We're here to assist you!

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post