How to Track Awaiting Vendor, Awaiting User, Pending, and On-Hold Wait Time Using Metric Definitions

tilekarnilesh
Giga Guru

Hello everyone,

I need to track how long an  INC (Incident) stays in specific states like Awaiting Vendor, Awaiting User, Pending, and On-Hold using Metric Definitions in ServiceNow.

I want to:
Capture the total time an INC spends in each of these states.
Generate a report showing the duration in hours or minutes for better analysis.
Possibly use Dashboards for real-time tracking.

I have some knowledge of creating Metric Definitions, but I’m unsure about the best approach to extract and report the data efficiently.

Has anyone implemented this before? Any best practices, scripts, or configurations you could share would be greatly appreciated!

Thanks in advance! 

1 ACCEPTED SOLUTION

Mark Manders
Mega Patron

You don't have to create a metric definition, because the 'state' metric definition already exists, OOB. It will start when a state is set and stops when the next state is set. 

The only downside is that it will create 2 records if it goes from awaiting user to in progress and back to awaiting user. You can't track the total time on a certain state through metrics when it's reaching it multiple times.
Real time tracking also is not possible, because the 'duration' isn't calculated real time. It is set when the state changes (duration calculation will calculate on 'start' and 'end' of the metric instance.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

View solution in original post

1 REPLY 1

Mark Manders
Mega Patron

You don't have to create a metric definition, because the 'state' metric definition already exists, OOB. It will start when a state is set and stops when the next state is set. 

The only downside is that it will create 2 records if it goes from awaiting user to in progress and back to awaiting user. You can't track the total time on a certain state through metrics when it's reaching it multiple times.
Real time tracking also is not possible, because the 'duration' isn't calculated real time. It is set when the state changes (duration calculation will calculate on 'start' and 'end' of the metric instance.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark