Unable to execute a custom Metric definition to calculate elapsed time until the first assignee
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi everyone,
I'm trying to build a custom metric in ServiceNow to measure the following KPI:
Average time from Incident creation until the Incident is assigned to an analyst (Assigned To field).
Specifically, I want to calculate how long an Incident remains with Assigned To = Empty from the time it is created until the first time it is assigned to a user.
I created a Metric Definition with:
- Table: Incident
- Type: Script Calculation
- Active: True
And I'm using a script (attached)
Issue
The metric is not being captured and no records are being created in the metric_instance table.
Questions
- Has anyone successfully implemented a metric that measures the time until the first population of the Assigned To field?
- Is a Script Calculation metric the correct approach for this requirement, or should I be using a Duration metric instead?
- Is there a better OOTB method to report on "time from creation to first assignment"?
- Are there any special considerations with MetricInstance, metricExists(), or changesToNotNil() when used in Metric Definitions?
Any examples or working configurations would be greatly appreciated.
Thanks!
0 REPLIES 0
