How can I configure a ServiceNow Business Rule to automate the assignment of incidents?

VaHogin734
Tera Contributor

How can I configure a ServiceNow Business Rule to automate the assignment of incidents to specific support groups based on a combination of incident attributes, including priority, category, and location, and send email notifications to both the assigned group and the reporter?

1 ACCEPTED SOLUTION

ArsalanChaudhry
Tera Guru


However, if you want to do it with Business Rules...

Create Assignment Groups:
-First, ensure that you have set up the necessary support groups in ServiceNow and have defined their scope (e.g., by location or category).

Define Business Rule Conditions:
-Go to "Business Rules" under "System Definition" and create a new Business Rule.
-Define the conditions for when this rule should run. In this case, it will involve multiple conditions, such as priority, category, and location.

Script Assignment Logic:
In the script section of the Business Rule, use server-side scripting to determine the appropriate support group based on the incident attributes. For example:

 

 

(function executeRule(current, previous /*previous*/) {
    var priority = current.priority;
    var category = current.category;
    var location = current.location;
   
    var assignmentGroup = findAssignmentGroup(priority, category, location);
    current.assignment_group = assignmentGroup;
})(current, previous);

 

 

 

In the above code, you'll need to implement the findAssignmentGroup function to match the attributes with the appropriate support group.

 

Send Email Notifications:
-To send email notifications, create two email notifications: one for the assigned group and another for the reporter.
-In the Business Rule, use the email.send method to trigger these notifications. For example:

 

 

email.send(assignmentGroup, current, "Incident Assigned", "Your incident has been assigned to the support group.");
email.send(current.caller_id, current, "Incident Assigned", "Your incident has been assigned to the support group.");

 

 

 
Test the Business Rule by creating test incidents with different attribute combinations to ensure they are correctly assigned to support groups, and email notifications are sent as expected.

 

Once you're satisfied with the testing, activate the Business Rule to put it into production.

 

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.
 
Thanks,
Arsalan

View solution in original post

3 REPLIES 3

Hemanth M1
Giga Sage
Giga Sage

Hi @VaHogin734 ,

 

You don't have do it the business rule please explre assignment rules :https://docs.servicenow.com/bundle/vancouver-platform-administration/page/administer/task-table/task... 

 

 

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

Sandeep Rajput
Tera Patron
Tera Patron

@VaHogin734 Assignment rules are better alternative than business rules in this case. Please refer to this documentation to know more about them https://docs.servicenow.com/en-US/bundle/vancouver-platform-administration/page/administer/task-tabl....

 

Hope this helps.

ArsalanChaudhry
Tera Guru


However, if you want to do it with Business Rules...

Create Assignment Groups:
-First, ensure that you have set up the necessary support groups in ServiceNow and have defined their scope (e.g., by location or category).

Define Business Rule Conditions:
-Go to "Business Rules" under "System Definition" and create a new Business Rule.
-Define the conditions for when this rule should run. In this case, it will involve multiple conditions, such as priority, category, and location.

Script Assignment Logic:
In the script section of the Business Rule, use server-side scripting to determine the appropriate support group based on the incident attributes. For example:

 

 

(function executeRule(current, previous /*previous*/) {
    var priority = current.priority;
    var category = current.category;
    var location = current.location;
   
    var assignmentGroup = findAssignmentGroup(priority, category, location);
    current.assignment_group = assignmentGroup;
})(current, previous);

 

 

 

In the above code, you'll need to implement the findAssignmentGroup function to match the attributes with the appropriate support group.

 

Send Email Notifications:
-To send email notifications, create two email notifications: one for the assigned group and another for the reporter.
-In the Business Rule, use the email.send method to trigger these notifications. For example:

 

 

email.send(assignmentGroup, current, "Incident Assigned", "Your incident has been assigned to the support group.");
email.send(current.caller_id, current, "Incident Assigned", "Your incident has been assigned to the support group.");

 

 

 
Test the Business Rule by creating test incidents with different attribute combinations to ensure they are correctly assigned to support groups, and email notifications are sent as expected.

 

Once you're satisfied with the testing, activate the Business Rule to put it into production.

 

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.
 
Thanks,
Arsalan