---
sourceDocument: Brazil ServiceNow AI Platform Administration
sourceDocumentLink: https://www.servicenow.com/docs/r/platform-administration

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil ServiceNow AI Platform Administration

ft:clusterId :

    - platadm

bundleId :

    - platadm

workflow :

    - Platform


---

# Rule precedence

# Precedence between data lookup, assignment, and business rules {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 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 Precedence between data lookup, assignment, and business rules

This document explains the execution order of various scripts, rules, and engines in ServiceNow during database operations such as insert, update, or delete.
Understanding this sequence is crucial for customers to predict and control how data processing and automation behave in their instances, ensuring reliable and consistent outcomes.
Show full answer Show less  

## Execution Order Details

Execution occurs around database operations and is categorized into phases before, during, and after the database action:

* **Before Business Rules:** Scripts configured to run before the database operation are divided by order values:
  * Scripts with order less than 1000 execute first.
  * Scripts with order greater than or equal to 1000 run after those with lower order values.
* **Engines Executed Before Database Operation:** The following engines run without a defined order relative to each other:
  * Approval engine (task and sysapprovalapprover tables)
  * Assignment rules engine (task tables)
  * Escalation engine
  * Data policy engine
  * Field normalization engine
  * Role engine (syncs role changes with sysuserhasrole table)
  * Execution plan engine (task tables)
  * Update version engine (sysupdatexml table)
  * Data lookup engine
  * Workflow engine (default workflows)
* **Database Operation:** The actual insert, update, or delete is performed on the database.
* **After Business Rules:** Scripts configured to run after the database operation are also divided by order:
  * Scripts with order less than 1000 execute first.
  * Scripts with order greater than or equal to 1000 execute afterward.
* **Engines Executed After Database Operation:** These engines operate without a strict order:
  * Label engine
  * Listener engine
  * Table notifications engine
  * Role engine (syncs roles as above)
  * Text indexing engine
  * Update sync engine
  * Workflow engine (deferred workflows)
  * Trigger engine (all Workflow Studio flows)
* **Email Notifications:** Sent based on configured notification weight and event type (insert, update, delete, or event-based notifications).
* **Async Business Rules:** Execute asynchronously after the form submission and the scheduler runs the scheduled job created from the business rule. These run in the background, separate from synchronous after business rules.

## Additional Notes

* Client-side scripts execute before any server-side processing during form submission.
* The role engine maintains synchronization between role changes and the sysuserhasrole table across multiple user and role-related tables.
* Understanding this execution order helps in creating predictable assignment rules, data lookup rules, workflows, and business rules that interact correctly.

## Related Functionality

ServiceNow customers can leverage this knowledge to effectively create and manage:

* Assignment rules and assignment data lookup rules to automate task assignments.
* Workflows and workflow assignments to automate business processes.
* Business rules to implement custom logic at precise points during database operations.  
Scripts, assignment rules, business rules, workflows, escalations, and engines all take effect in relation to a database operation, such as insert or update. In many cases, the order of these events is important.
Note:  
Client-based code that executes in the browser, using Ajax or running as JavaScript, executes before the form submission to the server.  
The order of execution is as follows:

1. Before business rules: Scripts configured to execute before the database operation with an order less than 1000.
2. Before engines. The following aren't executed in any specific order:
   * Approval engine (for task and sys_approval_approver tables)
   * Assignment rules engine (for task tables)
   * Escalation engine
   * Data policy engine
   * Field normalization engine
   * Role engine - keeps role changes in sync with sys_user_has_role table (for sys_user, sys_user_group, sys_user_grmember, and sys_user_role tables)
   * Execution plan engine (for task tables)
   * Update version engine - creates version entry when sys_update_xml entry is written (for sys_update_xml table)
   * Data lookup engine inserts or updates
   * Workflow engine (for default workflows)
   {#c_PrecBetweenAssignmentAndBusRules__ul_qgd_vdj_dq}
3. Before business rules: Scripts configured to execute before the database operation with an order greater than or equal to 1000.
4. Database operation: The system performs the insert, update, or delete operation on the database.
5. After business rules: Scripts configured to execute after the database operation with an order less than 1000.
6. After engines. The following aren't executed in any specific order:
   * Label engine
   * Listener engine
   * Table notifications engine
   * Role engine - keeps role changes in sync with sys_user_has_role table (for sys_user, sys_user_group, sys_user_grmember and sys_user_role tables)
   * Text indexing engine
   * Update sync engine
   * Workflow engine (for deferred workflows)
   * Trigger engine (for all Workflow Studio flows).
   {#c_PrecBetweenAssignmentAndBusRules__ul_ck4_h2j_dq}
7. Email notifications: The following are executed based on notification weight:
   * Notifications sent on an insert, update, or delete
   * Event-based notifications
   {#c_PrecBetweenAssignmentAndBusRules__ul_rgj_n2j_dq}
8. After business rules (active records only): Scripts configured to execute after the database operation with an order greater than or equal to 1000.
{#c_PrecBetweenAssignmentAndBusRules__ol_qjj_rdj_dq}  
Note:  
Like After business rules, Async business rules execute their logic after a database operation occurs. Unlike After business rules, Async business rules execute asynchronously, running in the background simultaneously with other processes. Async business rules run after the user submits the form and after the scheduler runs the scheduled job created from the business rule. The system creates a scheduled job from the business rule after the user submits the form but before any action is taken on the record in the database.
**Related concepts**   

* [Assignment rules module](https://www.servicenow.com/docs/ctjCc3QXGGV1f06tphfykg "The Assignment rules module allows you to automatically set a value in the assigned_to and assignment_group fields when a set of conditions occurs.")
* [Data lookup rules](https://www.servicenow.com/docs/ImQKbx_X_0oFdRD7E1G1mg "Data lookup rules offer a generic way to change any field value, not just assignment fields.")
* [Workflow assignments](https://www.servicenow.com/docs/0tgvH2rxefz5FFGncxEOwg "An alternative to creating data lookup or assignment rules is to create one or more workflow tasks that assign a task record as part of a workflow.")  
**Related tasks**   

* [Create an assignment rule](https://www.servicenow.com/docs/4KfuYYmdSpaumk2T2tKlZQ "Automatically assign a record according to one or more conditions in an assignment rule. Assignment rules are designed to run at the time you open a record.")
* [Create an assignment data lookup rule](https://www.servicenow.com/docs/mf5Nz~Mjt2OYrELTd~P1IA "Automatically assign a record using Data Lookup and Record Matching.")  
**Related reference**   

* [Baseline assignment rules example](https://www.servicenow.com/docs/cr7uOKkF73owaDkra9Sm0A "A baseline instance contains certain assignment rules.")  
**Related topics**   

* [Business rules](https://www.servicenow.com/docs/access?context=c_BusinessRules&version=brazil&pubname=brazil-api-reference&ft:locale=en-US)

