- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2025 01:48 AM
Hi All,
Could you please advise if it's possible to set the Urgency and Impact in an incident through the service catalog using a long description text?
For instance, if the long description in the Service Catalog specifies "Number of Invoices Impacted is 10," can the Impact be automatically set to Minor and the Urgency to Low upon incident creation?
Impact
1-10 invoices: Minor
11-50 invoices: Moderate
50-500 invoices: Significant
More than 500 invoices: Extensive
Urgency
1-10 invoices: Low
11-50 invoices: Medium
50-500 invoices: High
More than 500 invoices: Critical
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2025 05:18 AM
Hi @ArunG29061990 ,
Just check if this will help you
// Set urgency and impact based on the number of invoices affected
if (producer.total_number_of_invoices_affected >= 1 && producer.total_number_of_invoices_affected <= 10) {
current.urgency = 1; // Low
current.impact = 1; // Minor
} else if (producer.total_number_of_invoices_affected >= 11 && producer.total_number_of_invoices_affected <= 50) {
current.urgency = 2; // Medium
current.impact = 2; // Moderate
} else if (producer.total_number_of_invoices_affected >= 51 && producer.total_number_of_invoices_affected <= 500) {
current.urgency = 3; // High
current.impact = 3; // Significant
} else if (producer.total_number_of_invoices_affected > 500) {
current.urgency = 4; // Critical
current.impact = 4; // Extensive
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2025 01:51 AM
Practically, this isn't a good use case for the following reasons:
-
Users might make spelling mistakes.
-
It only works in one language.
-
Extra spaces or incorrect words will be considered a mismatch.
A better approach would be to create variables and have the user select options. Then, based on those variables, you can create a new matrix.
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]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2025 02:07 AM
Hi @ArunG29061990 ,
Replace the "Description" field with an "Employee Affected" field and use a dropdown menu for selection. In backend of service catalog field you can map the Employee affected field to the description field.
You can write a business rule also to archive this :
(function executeRule(current, previous /*null when async*/) {
var employeeAffected = current.variables.employee_affected; // Fetch dropdown value
switch (employeeAffected) {
case "1-10 invoices":
current.impact = '3'; // Minor
current.urgency = '3'; // Low
break;
case "11-50 invoices":
current.impact = '2'; // Moderate
current.urgency = '2'; // Medium
break;
case "50-500 invoices":
current.impact = '1'; // Significant
current.urgency = '1'; // High
break;
case "More than 500 invoices":
current.impact = '0'; // Extensive
current.urgency = '0'; // Critical
break;
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2025 02:13 AM
Hi @ArunG29061990 ,
Replace the "Description" field with an "Employee Affected" field and use a dropdown menu for selection. In backend of service catalog field you can map the Employee affected field to the description field.
You can write a business rule also to archive this :
(function executeRule(current, previous /*null when async*/) {
var employeeAffected = current.variables.employee_affected; // Fetch dropdown value
switch (employeeAffected) {
case "1-10 invoices":
current.impact = '3'; // Minor
current.urgency = '3'; // Low
break;
case "11-50 invoices":
current.impact = '2'; // Moderate
current.urgency = '2'; // Medium
break;
case "50-500 invoices":
current.impact = '1'; // Significant
current.urgency = '1'; // High
break;
case "More than 500 invoices":
current.impact = '0'; // Extensive
current.urgency = '0'; // Critical
break;
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2025 04:58 AM
I think I wasn't able to explain the issue correctly. Let me rephrase it :
Currently I am using the below-given statement:
current.urgency = 3;
if (producer.total_number_of_invoices_affected > 100) {
// High
current.urgency = 2;
} else {
// Medium
current.urgency = 1;
}
current.impact = 3;
if (producer.total_number_of_invoices_affected > 100) {
// High
current.impact = 2;
} else {
// Medium
current.impact = 1;
}
but I want to expand this with the following scenario:
Impact
1-10 invoices: Minor
11-50 invoices: Moderate
50-500 invoices: Significant
More than 500 invoices: Extensive
Urgency
1-10 invoices: Low
11-50 invoices: Medium
50-500 invoices: High
More than 500 invoices: Critical
So in practicle it would be like for an example :
current.urgency = 3;
if (producer.total_number_of_invoices_affected between 1 AND 10) {
// Minor
current.urgency = 4
and same for others in same method