---
sourceDocument: Brazil Employee Service Management
sourceDocumentLink: https://www.servicenow.com/docs/r/employee-service-management

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Employee Service Management

ft:clusterId :

    - emplsm

bundleId :

    - emplsm

workflow :

    - Employee


---

# Assignment and matching rules in HR

# Assignment and matching rules in HR {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 3 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Assignment and matching rules in HR

ServiceNow's HR application uses automatic case assignment to efficiently allocate HR cases to agents.
The system considers factors like case load, required skills, and employee location to assign the most suitable agent.
This process relies on matching rules and assignment APIs to balance workload and ensure cases are handled by qualified personnel.
Show full answer Show less  

## Key Features

* **Auto Assign Business Rule:** Invokes matching rule logic to select agents based on a configurable list length (default is one agent). It can be bypassed for specific HR services.
* **Matching Rules:** Utilize the Resource Matching Engine plugin integrated with the Human Resources Scoped App. Matching rules operate primarily on two criteria:
  * Skills and country/location of the subject person (higher priority)
  * Skills only (fallback if no agents found by the first rule)
* **Assignment Script Includes:** The `hrAssignmentAPI` and `hrAssignmentUtil` script includes handle the logic to find eligible agents who have the required skills and match the location, sorted by least active HR cases/tasks to balance workload.
* **HR Task Assignment Specifics:** For HR tasks linked to a parent HR case, the assigned agent from the parent case is prioritized regardless of workload.
* **Required Skills Management:** HR groups and skills can be managed per location or department. Skills must be assigned to users/groups to qualify them for case assignments. This can be configured and verified within HR Templates and Manage HR Skills modules.

## Practical Application for ServiceNow Customers

* **Customization:** Customers can create or modify HR assignment and matching rules to align case routing with organizational structures, such as multiple HR departments or geographic locations.
* **Testing:** New assignment rules can be tested before deployment to ensure they assign cases correctly.
* **Configuration Checks:** Verify that required skills are assigned to users/groups and that HR templates reflect appropriate skill requirements to enable accurate case routing.
* **Workload Balancing:** The system automatically considers agent workload to prevent overburdening individuals, ensuring efficient case handling.

## Expected Outcomes

By leveraging these assignment and matching rules, customers can expect HR cases and tasks to be assigned efficiently to the most qualified agents, improving response times and HR service quality. The system supports flexible and location-aware routing, skill-based qualification, and workload balancing, enabling better resource management and service delivery within HR operations.  
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 {#c_UseAssignmentRules__section_kfz_h4m_pgb}

HR Case has a business rule called Auto Assign that invokes matching rule logic.{#c_UseAssignmentRules__p_f3c_nfg_h1c}  
When auto assignment is triggered, the matching rules logic obtains a list of agents. The number of agents returned is based on a parameter that specifies the length of the list. The default is one.  
Note:  
For specific HR services, the auto-assignment functionality can be skipped. See Case options in [Configure an HR service](https://www.servicenow.com/docs/hl5NGa34vR~WD89KnbmvOg "Create or modify an HR service to define the request to fulfillment process for that case type. Examples of HR services include benefits enrollment, direct deposit setup, and background check requests by third-party providers.").

## Matching Rules {#c_UseAssignmentRules__section_dc1_p4m_pgb}

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.
By default, the base system sets an assignment group for each table and leaves the Assigned to field empty.{#c_UseAssignmentRules__p_i3c_nfg_h1c}  
For HR cases that meet these conditions, the hr_AssignmentAPI script include is called to return a list of agents that are eligible for assignment. See [Add or modify a matching rule](https://www.servicenow.com/docs/RYOZFGg~4R1L~UKUQ1HijA "You can add or modify a matching rule to assign HR cases to specific users or groups.").  
Note:  
The base system provides matching rules for every COE table and HR task table.  
Each HR table and task in the base system have two matching rules:

* Agents by skills and country
* Agents by skills
{#c_UseAssignmentRules__ul_ah2_jym_pgb}  
The higher priority (lower execution order) rule for each pair is the match by skills and country.

* 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.
{#c_UseAssignmentRules__ul_u5j_22n_pgb}

## Assignment script includes {#c_UseAssignmentRules__section_rfw_nhn_pgb}

The hr_AssignmentAPI passes the call through to the hr_AssignmentUtil script include to
reduce upgrade issues. Rather than update hr_AssignmentUtil, you can add to hr_AssignmentAPI
or another customer script include.{#c_UseAssignmentRules__p_n3c_nfg_h1c}  
The getAgentsByCountryAndSkillsOrderLeastLoaded or getAgentsBySkillOrderLeastLoaded in the hr_AssignmentAPI script include looks for the least ordered by country and skills.

* These scripts also look at the agents in the assignment group.
* They then look for agents that have the required skills for the case and are in the same country as the subject person.
* The list of agents that are returned are sorted according to case assignment load defined as active cases of type HR case (or extension) or active HR tasks.
{#c_UseAssignmentRules__ul_fnm_y5n_pgb}  
Auto assignment for HR tasks is slightly different than HR cases.

* The list of possible agents for an HR task is generated like an HR case.
* But, after ordering the list, the task is checked for a parent HR case and if the agent assigned is on the list.
* If it is, the agent is placed at the top of the list ignoring case load.
{#c_UseAssignmentRules__ul_qcw_jvn_pgb}

## Required skills {#c_UseAssignmentRules__section_ogv_hd5_pgb}

If you have more than one HR department, you can remove the HR group assignment from the HR
template and use assignment rules to assign the HR group. For example, if you have HR
departments in both the U.S. and German offices, you can create an HR group for each office.
You set up assignment rules to assign the HR group based on the location of the employee who
submitted the HR case.{#c_UseAssignmentRules__p_q3c_nfg_h1c}  
If your organization is using HR skills to qualify HR case assignments, ensure that the assigned user or group members have the required skills. To determine whether skills are being used and assigned, check the following configuration options.

* HR AdministrationHR ServicesHR Templates: Look at the template that corresponds to the assignment rule to see what skills, if any, are required.
* HR AdministrationManage RolesManage HR Skills: Find the HR user assigned to the case and click the Skills: # button to see whether the required skill is assigned. If not, check the box to assign it, and click Save.
{#c_UseAssignmentRules__ul_RequiredSkills}

Refer to
[Create rules to route and assign
customer service cases](https://www.servicenow.com/docs/access?context=c_CaseRouting&version=brazil&pubname=brazil-customer-service-management&ft:locale=en-US)
for more information on matching and assignment rules.{#c_UseAssignmentRules__p_s3c_nfg_h1c}
* **[Add or modify an HR assignment rule](https://www.servicenow.com/docs/rGI_sYUffjOq8o8r6L4jAg)**   
  Assignment rules are used to assign the HR group when it is not assigned from the catalog item template. You can create HR assignment rules as needed.
* **[Test an assignment rule](https://www.servicenow.com/docs/BHuSFXt55QHypTIblJnc~A)**   
  You can test a new assignment rule to verify that it works as intended.
* **[Add or modify a matching rule](https://www.servicenow.com/docs/RYOZFGg~4R1L~UKUQ1HijA)**   
  You can add or modify a matching rule to assign HR cases to specific users or groups.

*[\>]: and then


