Incident "Assigned To" metric by "State"

DavidChazin
Kilo Explorer

Hello,

I'm struggling with creating an incident metric definition that creates one record per Assignment Group per State. So, I need one metric instance record every time a State or Assignment Group changes -- for example:

INC Number--Queue---------State------------------Business Hours
INC0019876 SharePoint-----New-------------------1.1
INC0020302 Quality Mgmt--New-------------------0.5
INC0020302 Quality Mgmt--Active----------------11.6
INC0020325 SharePoint-----New-------------------2.2
INC0020325 SharePoint-----Active-----------------5.2
INC0020325 SharePoint-----Awaiting User Info---10.1
INC0020325 SharePoint-----Active-----------------1.4
INC0020450 Compliance----New-------------------0.5
INC0020450 Compliance----Active----------------33.1

Thanks for your help.

--David Chazin

7 REPLIES 7

pdjakk_snow
Kilo Explorer

Hi,

You will need to write a scripted Metric on change of state and Assignment group to build the above scenarios.


Hi Prashant,

Thank you for your response.

Can one scripted Metric be made to run upon a change in either the State field or the Assignment Group field?

I've adjusted the example to more clearly describe what I am trying to accomplish:

INC Number--Queue---------State---------Business Hours
INC0019876 Help Desk------New-------------------1.1 A ticket was opened at the help desk
INC0019876 Help Desk------Active-----------------0.5 A help desk agent was assigned to the ticket
INC0019876 SharePoint-----New-------------------2.2 The help desk agent assigned the ticket to the SharePoint group
INC0019876 SharePoint-----Active-----------------5.2 A member of the SharePoint group assigned the ticket to him/herself
INC0019876 SharePoint-----Awaiting User Info---10.1 The Sharepoint ITIL-user is waiting for input from the Caller
INC0019876 SharePoint-----Active-----------------1.4 SharePoint ITIL-user received information from Caller and worked the ticket for 1.4 hours
INC0019876 Compliance----New-------------------0.5 SharePoint ITIL-user then assigned ticket to Compliance group
INC0019876 Compliance----Active----------------33.1 Ticket was assigned to a member of the Compliance group

The goal is to wind up with a table or view that looks like this -- i.e., it contains one record per Incident per Assignment Group per State. Given a table or view like this, it should be easy for the managers in our business areas to use the ServiceNow Reporting module to create reports showing how much time was spent by each group responding to tickets (the New state) and resolving tickets (the Active state). Also, I would include additional fields such as Start, Stop, Configuration Item, Category, Sub Category, Priority, Resolution Code, etc. This should facilitate almost any kind of operational reporting they might need.

We already have two different Metrics running -- one for changes in State and the other for changes in Group. However, it seems beyond the capabilities of the Reporting module to combine the data from the two Metrics tables. The two tables look like this:

Group Metrics__________________________________________State Metrics____________________________________
INC #---------Group-------Start------------------Stop_____________INC #---------State----Start-----------------Stop------------
INC0019876 Help Desk---6/11/2013 9:38-----7/22/2013 12:00___INC0019876 Active---6/18/2013 7:22-----8/4/2013 9:00

Would the ServiceNow Reporting module be able to compare the start and stop times for the Group metric records and the State metric records, in order to determine which time spans overlap? In this example, the ticket was assigned to the Help Desk in an Active state from 6/18/2013 7:22 (from the State table) to 7/22/2013 12:00 (from the Group table).

Thanks a lot for your help.

--David Chazin


ravi1_tandon
Kilo Guru

You will have to use a business rule on sys_history_line table (as all activity changes to audited tables and fields are captured with the new and old value in this table) to capture the state and assignment group changes and other fields that you want to capture and use date time function to capture the difference in time and insert the output return from the business rule to a custom table which can then be used for reporting purposes.




DavidChazin
Kilo Explorer

Thanks, Ravi. I'll try that approach and will post the result. --David