banner



How To Create Metric Definition In Servicenow

How to Create Metrics

Metrics allow you to gather data over time

The native reporting functionality in ServiceNow has always felt a little lacking to me. Reports handle static data very well, allowing you to build graphs and charts off of the current snapshot of your records, but if you want to report off of historical data or trends over time you'll probably find it a bit more difficult.

ServiceNow's solution to this problem was to come out with Performance Analytics, but there is a learning curve involved. There is also the issue that the free version has limited capabilities. If you want to harness the full power of Performance Analytics, you'll have to pay.

This is where metrics come in – a nice middle-ground between Reports and Performance Analytics, all included standard out-of-the-box.

Overview

At a basic level, the two main components of metrics are the Metric Definition (metric_definition) and Metric Instance (metric_instance) tables.

Metric Definitions tell the system which table and under what conditions to create Metric Instances on. You can think of this like a template, or mold, which creates the Metric Instances.

Metric Instances are records that track time-based changes like duration, start time and end time of a field.For example, a Metric Instance may capture changes to the Assignment Group on the Incident table. Every time the Assignment Group is changed, a new Metric Instance record is created with the time the Assignment Group changed and the duration. Once the Assignment Group changes again, the end time would be recorded and another Metric Instance would be created to track how long the Incident sits in the new Assignment Group's queue.

how to create metrics, ServiceNowScholar
Metric Definition and Metric Instance relationship

Every time an action is performed on a record, the system will check the conditions on the Metric Definition record. Usually this is simply checking if the value has changed for the field defined on the Metric Definition. If the system finds a match, a Metric Instance record will be created.

how to create metrics, ServiceNowScholar
A simplified view behind the curtain illustrating how the system handles Metrics

Procedure

Let's dive in and learn how to configure Metric Definitions and Metric Instances.

Scenario 1: Generate a report to track how long it takes for Incident closure by Priority.

This scenario explains how to configure a report to show how long Incidents of different Priorities take on average to complete.

First, navigate to Metrics > Definitions and click New.

Fill out the Metric Definition with the following and click Submit:

Name : Priority Duration
Table : Incident
Field : Priority
Type : Field value duration
Timeline : true
Active : true

how to create metrics, ServiceNowScholar

Now that our Metric Definition is created, all we have to do is sit back and wait for Metric Instance records to be created by our users. You can check the Metric Instances by navigating to Metrics > Instances.

However, in the meantime, let's create a report so that when we do have some Metric Instance data, it will be packaged in a pretty visual.

Navigate to Reports > Create New and fill out the following information then click Save:

Name: Incident Closure by Priority
Data
: Table – Metric [metric_instance]
Type: Bar
Group by: Value
Stacked by: None
Aggregation: Average
Aggregated field: Business duration
Click Add Filter Condition: Definition is Priority Duration
Click Add Sort Field: Value z to a

how to create metrics, ServiceNowScholar

Once you have some Metric Instance data (if you're in your development instance you'll have to create some dummy Incident records with different priorities), your report should look something like this:

how to create metrics, ServiceNowScholar

This visual representation allows you to easily identify historical trends in your data. In this example, it looks like Incidents with a Priority of 3 – Moderate are not being taken care of in a timely manner. With this information, the Service Desk manager can look into why this might be happening.

Scenario 2: Incidents Closed Over Time

This scenario shows how to configure a report that shows Incidents closed, broken out by discrete periods of time – Same Day, 2 Days, 2 – 5 Days, 5 – 7 Days, 1 – 2 Weeks, 2 – 4 Weeks, 1 – 2 Months, > 2 Months.

First let's create our Metric Definition:

Name: Active/Inactive Incidents
Table: Incident
Field: Active
Type: Field value duration
Active: true
Description: Track changes to Incident active status

how to create metrics, ServiceNowScholar

Next create the following report:

Data: Table > Incident Metric [incident_metric]
Type: Bar
Group by: Start
Stacked by: None
Aggregation: Count
Conditions:
Definition is Active/Inactive Incidents
AND
Value is false

how to create metrics, ServiceNowScholar

When you run your report, it should look similar to this:

how to create metrics, ServiceNowScholar

Metric Database Views

If you need a bit more granularity in your reports, try reporting off of a database view. Here are the preconfigured metric database views standard out-of-box:

  • Change Metric [change_request_metric]
  • Change Task Metric [change_task_metric]
  • Incident Metric [incident_metric]
  • Knowledge Feedback Task Metric [kb_feedback_task_metric]
  • Project Metric [pm_project_metric]
  • Project Task Metric [pm_project_task_metric]
  • Problem Metric [problem_metric]
  • Release Feature Metric [release_feature_metric]
  • Release Metric [release_project_metric]
  • Release Task Metric [release_task_metric]
  • Catalog Request Metric [sc_request_metric]
  • Catalog Request Item Metric [sc_req_item_metric]
  • Catalog Task Metric [sc_task_metric]

Sample report:

how to create metrics, ServiceNowScholar

One last thing to note is that Metrics won't track a record's history retroactively. So if you are trying to report off of historical data from before you created your Metric Definition, this solution won't be sufficient.

Let us know if there's anything we missed or you would like us to expand upon in the comments! Don't forget to subscribe!

At the time of this writing, we are on the Madrid release. The information presented in this article may not apply to your instance if you are on a different version of ServiceNow.

How To Create Metric Definition In Servicenow

Source: https://servicenowscholar.com/2019/07/23/how-to-create-metrics/

Posted by: garciahiphell.blogspot.com

0 Response to "How To Create Metric Definition In Servicenow"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel