- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2022 06:19 AM
I have a requirment to change hr case auto assignment in my project.
Currently hr cases routes to GE Center assignment group tier one. New requirement is that all hr case raised from specific country should not be assigned to this group hence a new group should be their tier 1 group and no other can asisgn the case. This newly created group should receive those cases from raised by subject perosn of specific region.
How can I achieve this and what all to be taken, Care when these new setup is created as entire hierarchy has changing now.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2022 08:14 AM
Hi @servicenow_devo ,
The base system uses the automatic case assignment feature to assign an HR case to an agent. It attempts to assign an agent with the least number of cases assigned, has the skills required by the case, and matches the location of the subject person.
Auto Assign business rule
HR Case has a business rule called Auto Assign that invokes matching rule logic. Auto Assign depends on the HR case state, assignment group is empty, and assigned to is empty.
Matching Rules
HR assignment rules use the Resource Matching Engine [com.snc.matching_rule] plugin that is activated with the Human Resources Scoped App: Core [com.sn_hr_core] plugin. You can specify a table and a condition. The base system defaults to Assignment group is empty and Assigned to is not empty.
- Agents by skills and country
- Agents by skills
- If this matching rule does not find eligible agents, then the condition of the lower priority rule is still true and attempts to match by skills alone.
- If the higher priority rule finds an agent, the assigned to field is no longer empty and the secondary rule does not match.
- Either the getAgentsByCountryAndSkillsOrderLeastLoaded or getAgentsBySkillOrderLeastLoaded in the hr_AssignmentAPI script include are called.
To modify/Add a new assignment rule:
- Navigate to All > HR Administration > Assignment Rules > HR Assignment Rules.
- Click New.
- Complete the form.
Assignment Rules form Field Description Name Descriptive name for the HR assignment rule. Execution Order Order in which the rule processes. Rules with lower-order numbers process first. For example:- The first HR assignment rule has an execution order of 100.
- A second HR assignment rule has an execution order of 200.
- If a group has members that fit the conditions defined in the first HR assignment rule, it assigns an agent with the least amount of assigned cases.
- If the first HR assignment rule cannot find an agent to assign, the second HR assignment rule runs.
Application Indicates core application scope the assignment rule applies to. Active Check box that specifies the rule is in use. Applies To Table Table with the records that the assignment rule applies to. Default is the HR Task [hr_task] table. Conditions Conditions in which the assignment rule applies. Note: When defining conditions like case sensitivity or null values, see APIGlideFilter - Scoped, Global.Assign To User User to assign to the case when this rule is applied. Group Group to assign to the case when this rule is applied. Script Script Script to define advanced assignment rule functionality. Current.variable_pool set of variables is available. Note: Two example scripts are provided as a comment. You can modify either script or use the information as a starting point for your own script. Remove the examples when you are finished. - Click Update.
This is the Matching rule , which runs on HR case table :

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2022 06:52 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2022 08:14 AM
Hi @servicenow_devo ,
The base system uses the automatic case assignment feature to assign an HR case to an agent. It attempts to assign an agent with the least number of cases assigned, has the skills required by the case, and matches the location of the subject person.
Auto Assign business rule
HR Case has a business rule called Auto Assign that invokes matching rule logic. Auto Assign depends on the HR case state, assignment group is empty, and assigned to is empty.
Matching Rules
HR assignment rules use the Resource Matching Engine [com.snc.matching_rule] plugin that is activated with the Human Resources Scoped App: Core [com.sn_hr_core] plugin. You can specify a table and a condition. The base system defaults to Assignment group is empty and Assigned to is not empty.
- Agents by skills and country
- Agents by skills
- If this matching rule does not find eligible agents, then the condition of the lower priority rule is still true and attempts to match by skills alone.
- If the higher priority rule finds an agent, the assigned to field is no longer empty and the secondary rule does not match.
- Either the getAgentsByCountryAndSkillsOrderLeastLoaded or getAgentsBySkillOrderLeastLoaded in the hr_AssignmentAPI script include are called.
To modify/Add a new assignment rule:
- Navigate to All > HR Administration > Assignment Rules > HR Assignment Rules.
- Click New.
- Complete the form.
Assignment Rules form Field Description Name Descriptive name for the HR assignment rule. Execution Order Order in which the rule processes. Rules with lower-order numbers process first. For example:- The first HR assignment rule has an execution order of 100.
- A second HR assignment rule has an execution order of 200.
- If a group has members that fit the conditions defined in the first HR assignment rule, it assigns an agent with the least amount of assigned cases.
- If the first HR assignment rule cannot find an agent to assign, the second HR assignment rule runs.
Application Indicates core application scope the assignment rule applies to. Active Check box that specifies the rule is in use. Applies To Table Table with the records that the assignment rule applies to. Default is the HR Task [hr_task] table. Conditions Conditions in which the assignment rule applies. Note: When defining conditions like case sensitivity or null values, see APIGlideFilter - Scoped, Global.Assign To User User to assign to the case when this rule is applied. Group Group to assign to the case when this rule is applied. Script Script Script to define advanced assignment rule functionality. Current.variable_pool set of variables is available. Note: Two example scripts are provided as a comment. You can modify either script or use the information as a starting point for your own script. Remove the examples when you are finished. - Click Update.
This is the Matching rule , which runs on HR case table :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2022 06:51 PM
Thankyou it works

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2022 06:52 PM