We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Onhold state

HarjinderM21
Mega Contributor

Hi Team,

Can we be able to check in how many incident ticket Onhold state has been used and how is the time duration.

2 REPLIES 2

RaghavendraGund
Tera Contributor

Hello Harjinder

This is feasible in servicenow. I was able to replicate the exact scenario in my PDI.

how many times an incident has gone into On Hold and how long it stayed there — and the good news is ServiceNow does this out of the box through the Metrics engine. No customization needed.

1. Confirm the metric definition is active

Navigate to Metrics > Definitions (metric_definition.list) and open Incident State Duration. It's a Field value duration type metric on the Incident table, tracking the Incident state field. Just make sure Active is checked.

[Screenshot 1 — Metric Definition Incident State Duration]

2. How the data gets captured

Each time an incident's State changes, the platform writes a row to the metric_instance table. For Field value duration metrics, the timer starts when the record enters a state and closes when it leaves. So when an incident moves On Hold → Resolved (or any other state), the On Hold duration is finalized and you'll see Calculation complete checked with the Duration populated.

Here are two of my test incidents that I moved into On Hold and then resolved:

[Screenshot 2 — INC0007001, On Hold duration 0d 07h 40m]
[Screenshot 3 — INC0000051, On Hold duration 0d 04h 36m]

3. Answering your two questions

To see this across all incidents, go to metric_instance.list and filter:

  • Definition is incident state duration
  • Value is on Hold
  • How many times On Hold was used → Each row is one On Hold "episode." Group by Value (or by ID for per-incident counts) and use Count. Note this counts episodes, so if one incident went On Hold three separate times, that's three rows.
  • Time duration → The Duration field on each row gives the time spent in that state. Sum or average it for total/average On Hold time.

    Hope this answer helps, please mark Helpful 😊

 

 



Tanushree Maiti
Tera Patron

Hi @HarjinderM21 

 

Create a report directly against the Incident Metric table. It will  allow you to report on both the count of times an incident was put on hold and its total accumulated hold duration.

 

Alternative option to check Metric Instance metric_instance table for detailing the exact duration it was in that state.

You can group and sum up all Metric Instances matching your record where the Definition is State Duration, Value is On Hold, and Calculation Complete is true

 

Another option to check task_sla.  Refer following posts.

 

refer: 

https://www.servicenow.com/community/platform-analytics-forum/incident-on-hold-duration-time/m-p/123...

 

https://www.servicenow.com/community/incident-management-forum/calculate-state-duration/m-p/2436334/...

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti