ServiceNow assignment rules populate Assignment group and Assigned to when a saved task matches routing conditions and both fields are empty. The active rule with the lowest execution order wins. Configure the task table, conditions, destination and priority together, then test overlapping rules and existing assignments before activating broader routing.
What an assignment rule does
The Assignment rules module exists to set two fields automatically: assigned_to and assignment_group. You describe a situation, such as incidents in a particular category, and name the group or user who should own work that fits it. When a record fits, the platform writes the value for you, so nobody has to triage it by hand.
The assignment engine runs on task tables, including tables that extend Task. The Table field selects the records a rule applies to. Its choices are limited to tables and database views in the rule’s application scope, so check scope when an expected table is missing.
The conditions that must be true before a rule runs
A rule acts when the record passes a short set of checks. These are easy to overlook, and a rule that did not fire often fails one of them.
- The record has to be created or updated. Changes sitting on an open form that have not been saved do not trigger assignment rules.
- The record has to be unassigned. If assigned_to or assignment_group already holds a value, the rule leaves it alone. That includes a value placed by a default and a value placed by an assignment rule that ran earlier.
- The rule has to be active. The Active setting must be selected for a rule to take effect.
- The record has to match the rule’s conditions. Each condition is a field, an operator and a value, and you can chain several with AND and OR.
The second check shapes how you design a rule set. Because a rule cannot overwrite an earlier assignment, the first rule to assign a record decides the outcome, and a catch-all rule needs to sit later in the sequence than the specific rules it backs up.
How the order number decides which rule wins
Several rules can match the same record. Execution Order, labeled Order on the case routing form, settles it: when more than one rule matches, the rule with the lowest order value is the one that runs. A rule that routes network incidents to a network team belongs at a lower number than a general service desk rule that matches any active incident, otherwise the general rule would claim the record first.
The first matching assignment rule runs; later matching rules do not run against that record. Give specific rules distinct execution order values so their priority is clear.
Choosing who receives the work
Under Assign To the form offers a User and a Group. Pick a group when the work belongs to a team. Pick a user when one person owns that kind of work. You can set both.
For situations where a fixed name is not enough, the form has an optional Script section. A script can compute the assignee at the moment the rule fires, and the value it produces should evaluate to the sys_id of a user or a group. Scripts get access to current.variable_pool variables, which can support routing based on answers collected through catalog items that collect answers from the requester.
Creating a rule, step by step
The steps below follow the case routing version of the form, which shares its fields with the standard one.
- For this case routing procedure, hold the assignment_rule_admin role. Creating a standard assignment rule through All > System Policy > Rules > Assignment requires assignment_rule_admin or admin.
- Go to Routing and Assignment, then Assignment Rule, and select New. In customer service you can also open a matching rule and use its Create assignment rule related link.
- Give the rule a Name.
- Set the Order number.
- Select Active.
- Choose the Table under Applies To and build the conditions.
- Choose the User, the Group, or both under Assign To, and add a script if the assignment needs logic.
- Select Update.
Where assignment rules run in the save sequence
A save on a task table passes through a fixed sequence, and assignment rules sit at one spot in it. First come before business rules with an order below 1000. Next comes a group of before engines with no guaranteed order among them. The assignment rules engine is in that group, alongside the data lookup engine, approval, escalation, data policy and the default workflow engine. Then come before business rules with an order of 1000 or higher, then the database write, then after business rules with an order below 1000, then after engines, then email notifications, and finally active after business rules at 1000 or higher.
Two practical consequences follow. A business rule meant to influence routing, for instance by setting the category an assignment rule reads, belongs below 1000 so it runs first. And a before business rule at 1000 or above runs after the assignment engine, so it sees the assignment already made and can change it.
A baseline example and the catch-all pattern
A baseline instance contains certain assignment rules you can read as patterns. The one worth studying first is the Networking rule:
- Networking: On the incident table, Category is Network assigns the System Administrator user and Network group.
It is the simplest useful shape: one table, one condition, one group. Rule sets often grow from that shape by repeating it for each category or service a team owns.
A catch-all is a design pattern rather than a separate feature. You write a broad rule, for example one that matches every active incident, and give it a higher order number than the narrow rules. Narrow rules get first chance at the record, and the broad rule only claims what is left. Placed at a lower number instead, it would take every record and starve the specific rules behind it.
Assignment rules versus assignment lookup rules
Assignment lookup rules also fill in assignment fields, but they work from a table of matches rather than a condition builder. You find them under System Policy, then Rules, then Assignment Lookup Rules, and you need the assignment_rule_admin or admin role. Each rule has matcher fields (Category, Subcategory, Configuration item, Location) and setter fields (Assignment group, Assigned to). A valid rule needs at least one matcher and at least one setter, and the lookup runs the rule with the lowest order and matching values. An example is a rule that sends incidents with the category Inquiry/Help and subcategory Email to a named person.
In practice, conditions and scripts give assignment rules more flexibility, while lookup rules suit routing that depends on a plain combination of category, subcategory, CI and location.
Matching rules in customer service
In case routing, matching rules and assignment rules are separate records. An assignment rule routes cases that meet the matching rule criteria to a customer service agent. Open the relevant matching rule to create the assignment record through its related link; the assignment form then defines the destination user or group.
Re-running rules on existing records
Rules run on create and update, so records already sitting unassigned when a rule is written do not retroactively pick one up without another operation. Security Exposure Management has a separate Reapply all vulnerability assignment rules scheduled job for existing findings. Check its activation and Run schedule before relying on it.
That reapplication can overwrite assignments. Manually assigned and deferred items are excluded by default, but the sn_sec_wf.enable_manually_assigned_item_reassignment and sn_sec_wf.enable_deferred_item_reassignment properties can change that. Reapplication does not regroup findings. Check these controls on your instance and release before a bulk run.
Test the routing result before widening the conditions
Use a test environment and record both assignment fields before and after saving. Start with an unassigned record that matches one narrow rule. Then test a nonmatching record, a record matching both narrow and broad rules, and records with an existing user or group. These cases separate a condition error from a priority error or an assignment that already existed.
If routing appears correct briefly and changes afterward, inspect automation around the save rather than changing rule priority immediately. The assignment engine and data lookup engine share the before-engine phase without a guaranteed sequence between them. A later before business rule can also change the result. Record the category and other matcher values at the point routing runs, rather than relying on what the form displayed earlier.
For help planning this work, see ServiceNow implementation.
Questions about assignment rule edge cases
What happens when two rules have the same execution order?
The first matching condition takes precedence. Avoid relying on a tie to express business priority; give competing rules different execution order values and retest the overlap.
How do Any and All change the condition test?
In Match conditions, Any allows a rule to apply when one condition is satisfied. All requires the complete set. Choose deliberately when adding a second criterion, because it changes which records qualify.
Why can a script produce an unexpected result?
Check the input type against the field type. Assigning a string where an integer is expected can produce an unexpected result. Test the script with the actual values supplied by the record.
Does a custom Task extension need a cache step?
Selecting a custom table that extends Task requires clearing the instance cache for the rule to work properly. Schedule that work outside business hours because a system cache flush can degrade response times; do not automate repeated flushes.