ITSM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2024 09:51 PM
I need to track how long an incident stays in each state for reporting purposes. Is there a way to log this automatically in ServiceNow?
- 632 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2024 10:01 PM
Hi @mahesh009 check below links
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0793124
if my answer helps you please mark helpful and accept solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2024 10:08 PM - edited 10-21-2024 10:10 PM
Hi @mahesh009 ,
You can use the SLA (Service Level Agreement) feature or create a business rule to track state changes:
- To use SLAs, configure an SLA Definition with Duration and attach it to the Incident states you want to track.
- Alternatively, create a Business Rule that triggers whenever the state changes. In this rule, capture the sys_updated_on and state fields and log them to a custom table for reporting.
Thank you,
Ramesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2024 10:52 PM
Hi @mahesh009 ,
I would advise you to utilize incident_metric based on the state, as this will provide you with what you're looking for. I have created below as an example:
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Best regards
Anders
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2024 11:40 PM
Hello @mahesh009 ,
You can definitely track how long an incident stays in each state for reporting purposes! As @Harish Bainsla mentioned, I recommend checking out this article for a detailed guide on how to achieve this.
Key points from the article:
- There’s an out-of-the-box metric definition that tracks the duration when the 'incident state' changes.
- You can find this metric definition by navigating to metric_definition_list.do and looking for Number = MTRC0000004 and Name = Incident State Duration.
If you want more detailed steps on creating a report from this metric, definitely go through the article linked below:
Here are a few other informative links that might help you as well:
- Need a metric script which help me to get each state duration for each change of state.
- Script to calculate total time between states.
Let me know if you have any questions!
Please Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Regards,
Aniket