- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2025 12:38 PM
We are trying to pull state duration information for RITM and SCTASK such as
how long ticket remained in open state >>pending approval >> approved stage >>closed.
We explored metric definition but it only does for new request not for old. How can we fulill above use case ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2025 02:15 PM
I do not think you can get state durations for old RITMs and SC tasks easily without metric definitions.
if it is a must, you can try HistoryWalker API to fetch historical data of a record using audit/history table and generate metric instances manually using script, but please note, using these APIs and querying audit tables in custom scripts is NOT recommended considering the performance issues.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2025 02:15 PM
I do not think you can get state durations for old RITMs and SC tasks easily without metric definitions.
if it is a must, you can try HistoryWalker API to fetch historical data of a record using audit/history table and generate metric instances manually using script, but please note, using these APIs and querying audit tables in custom scripts is NOT recommended considering the performance issues.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2025 11:11 PM
that's correct, it won't work for older records.
check this
HistoryWalker - Scoped, Global
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2025 09:32 PM
As per new community feature you can mark multiple responses correct.
If my response helped please mark it correct as well so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2025 08:42 AM
any update to this?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader