The CreatorCon Call for Content is officially open! Get started here.

How to create metric in ServiceNow when state changes from On hold to In progress state ?

Snehal13
Kilo Sage

How to create metric in ServiceNow when state changes from On hold to In progress state for a particular assignment group ?

1 ACCEPTED SOLUTION

Moin Kazi
Kilo Sage
Kilo Sage

Hi @Snehal13 ,

 

To create a metric in ServiceNow that tracks when the state of an incident changes from "On Hold" to "In Progress" for a particular assignment group, you can follow these steps:

 

1. Create a New Metric

1. Navigate to Metrics:
- Go to the application navigator and type `Metrics` in the search bar.
- Select Metrics under the Performance Analytics application.

2. Create a New Metric:
- Click on New to create a new metric.

2. Configure the Metric

1. General Information:
- Name: Give your metric a descriptive name (e.g., "On Hold to In Progress Transitions").
- Table: Set the table to `incident` (or the relevant table if you're tracking something else).
- Aggregation: Choose how you want to aggregate the data (e.g., Count).

2. Conditions:
- Set conditions to filter incidents:
- State: Change to On Hold and In Progress.
- Assignment Group: Specify the assignment group you want to track.

3. Create a Condition for the Transition:
- Add a condition to specify the state change:
- Use a script or condition to check the previous state.
- For example:

current.changes() && current.state.changes() && current.state == 'In Progress' && previous.state == 'On Hold' && current.assignment_group == '<Your Assignment Group Sys ID>';

3. Save and Test the Metric

1. Save the Metric:
- Click Submit to save your metric.

2. Test the Metric:
- Make a test change in an incident record where the state transitions from "On Hold" to "In Progress" within the specified assignment group.
- Check if the metric records the change appropriately.

4. Create a Dashboard Widget (Optional)

1. Create a Dashboard Widget:
- Go to the dashboard where you want to display the metric.
- Click on Add Widget and select the metric you just created to visualize the data.

 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you found my response **helpful**, I’d appreciate it if you could take a moment to select **"Accept as Solution"** and **"Helpful"** Your support not only benefits me but also enriches the community.

 

Thank you!
Moin Kazi

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 

View solution in original post

1 REPLY 1

Moin Kazi
Kilo Sage
Kilo Sage

Hi @Snehal13 ,

 

To create a metric in ServiceNow that tracks when the state of an incident changes from "On Hold" to "In Progress" for a particular assignment group, you can follow these steps:

 

1. Create a New Metric

1. Navigate to Metrics:
- Go to the application navigator and type `Metrics` in the search bar.
- Select Metrics under the Performance Analytics application.

2. Create a New Metric:
- Click on New to create a new metric.

2. Configure the Metric

1. General Information:
- Name: Give your metric a descriptive name (e.g., "On Hold to In Progress Transitions").
- Table: Set the table to `incident` (or the relevant table if you're tracking something else).
- Aggregation: Choose how you want to aggregate the data (e.g., Count).

2. Conditions:
- Set conditions to filter incidents:
- State: Change to On Hold and In Progress.
- Assignment Group: Specify the assignment group you want to track.

3. Create a Condition for the Transition:
- Add a condition to specify the state change:
- Use a script or condition to check the previous state.
- For example:

current.changes() && current.state.changes() && current.state == 'In Progress' && previous.state == 'On Hold' && current.assignment_group == '<Your Assignment Group Sys ID>';

3. Save and Test the Metric

1. Save the Metric:
- Click Submit to save your metric.

2. Test the Metric:
- Make a test change in an incident record where the state transitions from "On Hold" to "In Progress" within the specified assignment group.
- Check if the metric records the change appropriately.

4. Create a Dashboard Widget (Optional)

1. Create a Dashboard Widget:
- Go to the dashboard where you want to display the metric.
- Click on Add Widget and select the metric you just created to visualize the data.

 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you found my response **helpful**, I’d appreciate it if you could take a moment to select **"Accept as Solution"** and **"Helpful"** Your support not only benefits me but also enriches the community.

 

Thank you!
Moin Kazi

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~