Video summary
ServiceNow Business Rules
Main summary
Key takeaways
Main ideas / lessons conveyed
- Business Rules in ServiceNow are a server-side customization. They run on the backend (no client-side involvement).
- When business rules run: They trigger based on what happens to a record in a table—when a record is displayed, inserted, updated, deleted, queried, or when background processing is needed.
- Where business rules are stored: The list of business rules is in the ServiceNow table
sys_script. - Business rules have two dimensions for configuration:
- Type / trigger moment (before/after/async/display)
- Operation (insert/update/delete/query)
Types of Business Rules (trigger moment)
-
Before Business Rules
- Run before an operation happens (before insert/update/delete/query).
- Used to enforce rules that can prevent or alter what gets saved.
-
After Business Rules
- Run after the operation is completed (after insert/update/delete/query).
- Used to display messages or make follow-up updates after data is saved.
-
Async Business Rules
- Similar to after, but they execute in the background.
- Used for tasks like sending notifications/events without blocking the user.
-
Display Business Rules
- Run when a form is being displayed/opened.
- Used to show messages on the UI when viewing records.
How “operations” relate to business rules
Business rules can be configured for these operations:
- Insert
- Update
- Delete
- Query
When configuring a business rule, you choose:
- When to run (Before/After/Async/Display)
- For which operation (insert/update/delete/query, where applicable)
Methodology / step-by-step instructions shown (with examples)
A) Before Business Rule Example (Prevent invalid submission)
Goal: Prevent creating an Incident when:
- Category = Network
- Subcategory = Wireless (Wi‑Fi equivalent)
- Assignment Group is NOT Network
Steps described:
- Go to Configure → Business Rules
- Click New
- Create a business rule:
- Type: Before
- When: Before insert
- Condition (logic):
- Category is Network
- Subcategory is Wireless
- Assignment group is not Network
- Action:
- Do not submit the record
- Show an error message to the user (message is configurable)
- Save and test:
- Try saving an Incident with Category Network + Subcategory Wireless + assignment group other than Network → error “invalid insert”
- Try again assigning to the Network group → save succeeds
B) Before Business Rule Example (Auto-update state on work notes change)
Goal: When updating an Incident:
- If Work Notes changes, set State = In Progress
Steps described:
- Create a New Business Rule
- Type: Before
- When: Before update
- Condition: Work notes changes / work notes updated
- Action: Update Incident State to In Progress
- Save
- Test by editing an existing Incident:
- Modify Work Notes
- Confirm State changes to In Progress
C) After Business Rule Example (Show message after incident creation)
Goal: After inserting a new Incident, display:
- “Your incident is created” (conceptually: message upon record creation)
Steps described:
- Create New Business Rule
- Type: After
- When: After insert
- Condition: (none mentioned; it runs on insert)
- Action: Add/display a message to the user
- Save
- Test by creating a new Incident → message appears after save
D) After Business Rule Example (Auto-fill description when state becomes On Hold)
Goal: When an Incident’s State becomes On Hold, automatically set:
- Description = “Waiting for users reply” (example text)
Steps described:
- Create New Business Rule
- Type: After
- When: After update
- Condition: Incident state changes to On Hold
- Action: Set the description text
- Important configuration detail mentioned:
- Go to Advanced tab
- Use scripting configuration (described as a “single line of coding”)
- The video mentions setting:
- workflow = false
- current update (as part of the example)
- Save
- Test:
- Edit an existing Incident
- Change state to On Hold
- Add/modify relevant fields
- Confirm Description is populated automatically
E) Async Business Rule Example (Background notification idea)
Goal (example concept):
- If an Incident is created as P1, trigger an event that results in notification delivery in the background.
How it’s explained:
- Async insert/update/delete/query can be configured.
- Example mechanism:
- After a P1 Incident insert → generate an event
- Event → create notifications for caller/group
- The instructor notes they won’t implement it due to heavy coding requirements in the admin-focused series.
F) Display Business Rule Example (Show message when form opens)
Goal: Show a message whenever the Incident form is displayed/opened, e.g.:
- “Welcome to the incident form”
Steps described:
- Create New Business Rule
- Type: Display
- When: display on form load (no insert/update/delete/query selected)
- Action: show message on the form
- Save
- Test:
- Open an Incident form → message appears
- Open from list view → message appears again
Key concepts reinforced
- Before vs After matters for whether the business rule can block the operation and when messages/updates occur.
- Async is for background processing (often notifications/events).
- Display is for UI-time behavior when a form is opened.
- Business rules can be configured via simple conditions (emphasized for admin exam readiness), while more complex logic uses scripting (later in developer-focused series).
Speakers / sources featured
- Pritam (video narrator/host; “my name is pritam…”)
- ServiceNow (product/documentation context; system tables like
sys_script)