auto update of Priority of incidents based on Business service criticality

karan15
Tera Contributor

need help Looking at how we can get SNOW to grab the priority o and populate it and take it away from the Helpdesk having to set the priority.

Can i set rule that while logging incident snow looks at business criticality of business service and updates the priority of incident ? instead of service desk manually deciding priority as they are logging low priority for tier 1 applications 

3 REPLIES 3

Tony Chatfield1
Kilo Patron

Hi, a before insert\update BR could be a good solution, although the user logging the task would not have immediate visibility of the priority on the UI form as it is set during save\submit.
OOB ServiceNow using a matrix of Impact and Urgency to set Priority

Define priority lookup rules (servicenow.com)

and rather than setting priority directly you would normally set impact\urgency and let the existing matrix map the priority - if you do not do this you will find you have to make a number of unnecessary customizations in order for direct setting of priority work.

 

Also, the business criticality field is a string and the priority\impact\urgency fields for task is an integer value,

but you can use substring on business criticality values and the convert to integer or use a switch statement referencing the extract business criticality value, or map using substring.

Untested but something like this, a before BR running on filter condition Service changes

(function executeRule(current, previous /*null when async*/) {

var myPrioty = current.business_service.busines_criticality.substring(0,1);

switch(myPrioty) {
  case '1':
    current.impact = 1;
    current.urgency = 1;
    break;
  case '2':
    current.impact = 1;
    current.urgency = 2;
    break;
  case '3': 
    current.impact = 2;
    current.urgency = 2;
    break;
  case '4':
    current.impact = 2;
    current.urgency = 3;
    break;
  default:
    current.impact = 2;
    current.urgency = 2;
}


})(current, previous);

 

Amit Gujarathi
Giga Sage
Giga Sage

HI @karan15 ,
I trust you are doing great.

To achieve this, we can implement a business rule in ServiceNow. Here's a technical solution to address your query:

  1. Create a Business Rule:

    • Navigate to "Business Rules" in ServiceNow and click on "New."
    • Provide a suitable name and description for the rule.
    • Set the "Table" field to "Incident" to apply the rule to incident records.
    • In the "When to run" section, select "Before" and choose the appropriate action, such as "Insert."
    • Add a condition to check the business criticality of the associated business service. For example:
gs.include("sn_chg_mgmt/ChangeRequestUtils");
var businessService = current.business_service.getRefRecord();
if (businessService && businessService.criticality == 'High') {
    current.priority = 1; // Set the incident priority to high
} else {
    current.priority = 3; // Set the incident priority to medium by default
}
    • Save the business rule.
  1. Test the Solution:

    • Create a new incident record with a tier 1 application.
    • Verify that the incident's priority is automatically set to a suitable value based on the business criticality of the associated business service.

Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi



Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @karan15 

 

Greetings!!

 

I am not a pro coder /coder so I cant provide you coding solution but i have few questions/ points

- Its SN or ServiceNow not SNOW.

To set up this use case, please make sur the CMDB is enough mature and all CI/ Service / Service offering , must have accurate business critically.

- As solution provide by my friend (Amit) , you need to disable the OOTB look up / priority matrix (If I am not wrong)

- Also please take all use cases when this priority should be auto set bcz may be printer is down (it is Business Critical, but it down over weekend where no Business' Impact), so the incident can be p4 not p2.

- Also update the process document & trainer users once this solution on place.

 

Please mark my answer helpful / solution accepted if it serves the purpose.

Regards

Atul G

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************