ServiceNow SQL API: Query Your Instance Directly with ODBC and JDBC
Australia Patch 1 introduced the SQL API — a read-only SQL interface to ServiceNow data via standard ODBC and JDBC drivers. No ETL pipelines, no data replication, no exports. Here's the full architecture and how to connect.
Create a GlideAjax-Callable Script Include
GlideAjax lets you run server-side logic from client scripts without forcing a page reload or form submission. This guide walks you through creating the Script Include and shows the client-side pattern to call it.
Sum a numeric field across records
Calculate the total sum of a numeric field across all matching records
Query incidents using addQuery with IN operator
Filter records where a field matches any value in a list
Set Up an Email Integration via Inbound Actions
Email integrations let you create incidents, requests, and other records automatically when users send emails to a shared mailbox. This guide walks you through configuring the mailbox connection and inbound actions that parse emails into structured ServiceNow records.
Configure Coalesce on an Import Transform
Import transforms with coalesce let you update existing records instead of creating duplicates every time you run an import. You'll have a transform that intelligently matches incoming data to existing target records.
Create a system event with gs.eventQueue
Fire a custom event using gs.eventQueue to trigger downstream notifications or script actions
Import and Preview an Update Set
Update sets are how you move customizations between ServiceNow instances without breaking existing configurations. This guide shows you how to import an update set XML file and preview it to catch conflicts before they become production problems.
Robust Script Error Handling Pattern
Use this pattern in Business Rules, Script Includes, Scheduled Jobs, and other server-side scripts that perform operations which could fail due to external dependencies, data validation issues, or unexpected system states. It's particularly valuable when building integrations with external systems, processing user input, or performing complex data transformations where failures need to be handled gracefully.
Avoid querying the database inside a loop
Batch database lookups instead of querying once per iteration
Get the active SLA on a task record
Query the task_sla table to find the active SLA attached to a specific task
Run a Business Rule Only on Specific Field Changes
Business Rules that fire on every record update create unnecessary database load and slow down forms. This guide shows you how to trigger rules only when specific fields change, using ServiceNow's built-in change detection methods.
Create a Notification Email Template
Email notifications look unprofessional when they're just plain text, and recreating the same HTML formatting across dozens of notifications wastes time. This guide shows you how to build reusable email templates that give your notifications consistent branding and structure.
Call an Outbound REST Message from a Script
ServiceNow needs to talk to external systems — triggering notifications in Slack, updating records in your CMDB, or calling third-party APIs when something changes. This guide shows you how to make outbound REST calls from your server-side scripts and handle the responses properly.
Set a field value using g_form in a UI Action
Update a form field value from a UI Action client script
Query incidents created in the last 7 days
Retrieve incidents created within the past 7 days
getDisplayValue Returning Empty String in ServiceNow
Calling gr.fieldName.getDisplayValue() returns an empty string even though the field has a value.
Add an Approval Step to a Flow
Flows need human approval for decisions automation can't make — budget approvals, security reviews, or manager sign-offs. This guide shows you how to pause a flow, collect approvals, and branch based on the outcome.
Portal Widget Not Loading Data in ServiceNow
My Service Portal widget shows a loading spinner indefinitely or displays blank where data should be.
Configure Knowledge Article Workflow
Knowledge workflows ensure articles go through proper review before being published to end users. This guide walks you through configuring the workflow states, assigning reviewers by group, and setting up notifications.
Create a Survey in ServiceNow
Surveys give you a structured way to collect feedback from users after incidents, service requests, or other business events. This guide walks you through building a survey, setting up automatic triggers, and accessing responses.
Bulk Data Sync via Import Sets Pattern
Use this pattern when importing large datasets from external systems on a scheduled basis, when you need detailed error reporting and data validation during import processes, or when importing data that requires complex field mapping and coalescing logic. This pattern is ideal for nightly data feeds, bulk user imports, or asset synchronization from external CMDBs.
Business Rule Causing Infinite Loop in ServiceNow
The instance slows to a crawl or throws a recursion error when I save a particular record type.
ServiceNow Email Inbound Action Not Processing
Emails sent to the ServiceNow inbound email address arrive but no inbound email action fires.
Debug a Business Rule in ServiceNow
When your Business Rule isn't firing or is producing unexpected results, you need a systematic way to track down what's wrong. This guide walks you through the debugging tools and techniques that will isolate the problem.
Copy a record in GlideRecord
Duplicate an existing record by copying all its field values to a new record
Configure the Priority Lookup Rules
Priority should calculate automatically when agents set impact and urgency on incidents — not be a manual dropdown they can forget or get wrong. This guide shows you how to configure the lookup rules that drive ServiceNow's automated priority calculation.
Create a Parent-Child Incident Relationship
Parent-child incident relationships let you group multiple incidents under a single parent when they stem from the same underlying issue. This guide shows you how to set up these relationships and what automation you'll need for proper resolution handling.
Test a REST API with the REST API Explorer
The REST API Explorer lets you test your Scripted REST APIs and built-in ServiceNow endpoints without leaving the instance. You'll be able to send requests, inspect responses, and verify behavior using your current user context.
Flow Designer Action Failing with Permission Error
My Flow Designer flow fails at a specific action with an Access Denied or permission error.
Script Include Utility Library Pattern
Use this pattern when you have business logic or data access code that needs to be shared across multiple scripts, applications, or scopes. It's ideal for complex calculations, external system integrations, data transformation utilities, or any functionality that would otherwise be duplicated in multiple places.
Trigger client-side validation in onSubmit
Validate form fields before submission and block save if validation fails
Restrict a Table to a Specific Role
Table-level access control lets you restrict who can view or modify records on an entire table based on their assigned roles. You'll create access control rules that either grant or deny access to all records on the table.
Parse a JSON response from a REST call
Extract fields from a JSON API response in a server-side script
Run a Script in Script Background
Script Background lets you run one-off server-side JavaScript for data fixes, bulk operations, or testing logic without building a full application. You'll have immediate script execution with full database access and your admin privileges.
Trigger a Survey When an Incident is Closed
Survey triggers automatically send satisfaction surveys to users when incidents close, giving you feedback data without manual follow-up. You'll have an automated survey that fires when incidents hit 'Closed' state and flows response data back into ServiceNow.
Avoid GlideRecord calls in client-side scripts
Replace a synchronous client-side GlideRecord call with GlideAjax
SLA Not Starting on Incident in ServiceNow
I configured an SLA definition but the SLA timer isn't starting when a new incident is created.
SLA Pausing Unexpectedly in ServiceNow
The SLA timer pauses at times I don't expect, or it resumes when it shouldn't.
Update a Related Record from a Business Rule
Business rules often need to update related records when the current record changes — like updating a project status when all its tasks are complete. This guide shows you how to query the related record, update its fields, and avoid the common traps that create infinite loops or performance problems.
Create a Script Include in ServiceNow
Script Includes let you write server-side JavaScript functions once and call them from anywhere in your ServiceNow instance. This guide shows you how to build both simple function-style Script Includes and class-based ones that can be instantiated.
Activate a ServiceNow Plugin
ServiceNow plugins unlock platform functionality — from HR modules to advanced integrations. This guide walks you through the plugin activation process and helps you avoid the gotchas that can take down production features.
Create a Knowledge Base
Knowledge bases give you clean separation between different teams' or service domains' content. This guide walks you through creating a new kb_knowledge_base record, setting up access controls, and configuring the templates and workflows that authors will use.
Create a Subflow in Flow Designer
Subflows let you build reusable pieces of automation that any flow can call. This guide shows you how to create one, define its inputs and outputs, and call it from parent flows.
Create a Transform Map
Transform maps define how data flows from staging tables into your target ServiceNow tables after import. You'll configure field mappings, coalesce settings for record matching, and any custom transformation logic needed to clean or manipulate data during the import process.
Create a Workflow in ServiceNow
Workflows automate complex multi-step processes that need approvals, notifications, and task creation when records change. This guide walks you through building a workflow from scratch using the legacy Workflow Editor.
ACL Not Restricting Access in ServiceNow
I created an ACL but users who shouldn't have access can still see or edit the record/field.
Debug ACL Issues in ServiceNow
ACL issues are among the most frustrating debugging sessions in ServiceNow — a user reports they can't see something they need, and you're left hunting through dozens of ACLs trying to figure out which one is the culprit. This guide shows you how to systematically identify the exact ACL that's blocking access using ServiceNow's built-in debugging tools.
REST API Call Returning 401 Unauthorized in ServiceNow
My outbound REST API call from ServiceNow returns a 401 error, or my inbound REST call to ServiceNow is rejected.
Script Include Not Found in ServiceNow
My server-side script throws 'Script Include not found' or 'is not a constructor' when I try to instantiate it.
Make an outbound REST call with Basic Auth
Call an external REST endpoint using Basic authentication
GlideAjax Call Not Returning Data in ServiceNow
My GlideAjax call fires but the callback receives null or empty data from the Script Include.
Get a catalog variable value from an RITM
Read the value of a catalog variable from a Requested Item record
Commit an Update Set
Your update set previewed clean and you're ready to deploy those changes to the target instance. This guide walks you through committing safely, handling errors that surface during commit, and setting up proper rollback procedures.
Approval Not Routing to Correct Approver in ServiceNow
An approval is created but it's assigned to the wrong person, or no approval is created at all.
Create an Async Business Rule
Async Business Rules let you run heavyweight operations without forcing users to wait for their save to complete. You'll have a rule that fires in the background after the transaction commits.
Configure SMTP for Outbound Email
ServiceNow needs an SMTP server to send any outbound email — notifications, password resets, approval requests. This guide walks you through setting up the SMTP configuration so your instance can actually deliver messages.
Client-Side Performance Optimization Pattern
Use this pattern when forms or lists are experiencing slow load times, when you have multiple onLoad client scripts executing expensive operations, or when users report sluggish interface performance. This is especially valuable for high-traffic forms with complex business logic or forms that load large amounts of related data that users don't always need.
Catalog Fulfillment Pipeline Pattern
Use this pattern when you have multiple catalog items with varying fulfillment requirements that need standardization, or when you're experiencing inconsistent processing times and unclear accountability in your current catalog workflows. This pattern is ideal for organizations with mature ITSM processes that need to scale catalog operations efficiently.
Encoded Query Returning Wrong Results in ServiceNow
I copy an encoded query from the URL or list filter, but when I use it in a script it returns different or no results.
Bulk Record Operation Pattern
Use this pattern when you need to update more than 1,000 records at once, perform data migrations or cleanup operations, or execute bulk updates that might take more than a few seconds to complete. It's essential for scheduled maintenance tasks, data correction scripts, and migration utilities.
Create a Record Producer
Record producers let users submit incidents, problems, or custom table records directly through the service catalog interface without creating a RITM. You'll have a clean self-service form that inserts records straight into your target table with proper field mapping.
Reload a form after a server-side UI Action completes
Force the form to refresh after a server-side UI Action makes changes
Test a Script Include in Script Background
Script Background gives you a safe sandbox to verify your Script Include methods work correctly before attaching them to Business Rules or Client Scripts. You'll instantiate the class, call methods with test data, and log results to validate behavior.
Import Set Transform Failing in ServiceNow
My import set loads data but the transform map fails to create or update target records.
Modular Service Portal Architecture Pattern
Use this pattern when building multiple Service Portals across an organization, when you need to maintain consistent branding and functionality across portals, or when you anticipate significant portal customization requirements. This pattern is essential for organizations with complex portal requirements, multiple business units sharing common functionality, or environments where portal widgets need frequent updates without impacting stability.
ServiceNow Notification Sending to Wrong Recipients
My notification is sending, but it's going to the wrong people or missing people it should include.
Get all RITMs from a service catalog request
Query all Requested Items that belong to a parent Request record
Query with OR conditions using addOrCondition
Query records matching one of several values using OR logic
Create a Scheduled Job in ServiceNow
Scheduled Jobs run your scripts automatically on a recurring schedule — nightly data cleanup, weekly reports, or custom intervals. This guide walks you through setting one up with the right timing, user context, and error handling.
Run a CMDB Health Check
A CMDB full of duplicate servers, stale network devices, and incomplete application records undermines every process that depends on accurate configuration data. This guide walks you through running health checks to identify problem CIs and get actionable cleanup data.
Map Catalog Item Variables to Fulfillment Record Fields
Users fill out catalog forms, and those values need to end up in the records your teams work from. This guide shows you how to map catalog variables to fulfillment record fields so data flows automatically from request to execution.
Format a datetime for display in the user's timezone
Convert a stored UTC datetime to a human-readable string in the user's local timezone
Use addQuery with STARTSWITH and CONTAINS operators
Filter text fields with partial match operators like STARTSWITH and CONTAINS
Validate Form Input with an onSubmit Client Script
Form validation stops users from submitting incomplete or invalid records and guides them to fix problems before they become data quality issues. This guide shows you how to build validation that blocks submission and shows clear error messages.
Query child table records using the parent table
Query a table that extends another and work with both parent and child fields
transform.map setMandatory Not Working in ServiceNow
I'm using setMandatory() in a transform script but the import still processes records with blank mandatory fields.
Check if the current user has a role in a Client Script
Determine if the current user holds a specific role from a Client Script
Create a Service Portal Page
Service Portal pages give you custom layouts for specific user workflows — dashboards, landing pages, or specialized forms that don't fit the standard catalog structure. This guide walks you through creating a new page and setting up its basic layout structure.
Create a Change Blackout Window
Change blackout windows prevent changes from being scheduled during critical periods like holidays, quarter-end freezes, or major system maintenance. You'll build a schedule exception and configure the enforcement mechanism that works for your change process.
Service Portal Search Not Finding Records
Users search in the Service Portal but get no results, even for terms that should match catalog items or knowledge articles.
Dot-walk to a referenced field in GlideRecord
Access a field on a referenced record without a second GlideRecord query
Service Catalog Workflow Not Creating Tasks
A catalog item's workflow runs but the expected catalog tasks aren't being created for fulfillment.
Create an Import Set Table
Import Set Tables hold raw data from external sources before it gets transformed and loaded into your production tables. This guide walks you through creating the staging table that serves as the landing zone for your import process.
Count records matching a condition with GlideAggregate
Count how many records match a query without loading all rows
Webhook Listener Pattern in ServiceNow
Use this pattern when you need to receive real-time notifications from external systems, process third-party service callbacks, or integrate with SaaS applications that push data via webhooks. It's ideal when you need guaranteed delivery, audit trails, and the ability to replay failed processing attempts.
Trigger a Flow on a Schedule
Scheduled flows run automatically on recurring intervals without human intervention or record changes. This guide walks you through creating one and handling the data context differences that trip up most developers.
Flow Designer Flow Not Triggering in ServiceNow
My Flow Designer flow is active but it doesn't run when the trigger conditions are met.
Performance Analytics Indicator Not Collecting Data
My Performance Analytics indicator is active but the scores table stays empty after the collection job runs.
Create a Field-Level ACL
Field-level ACLs let you hide sensitive data from certain users or make specific fields read-only for some groups while keeping them editable for others. You'll create a targeted access control that applies to just one field instead of entire records.
Count records using GlideRecord vs GlideAggregate
Understand when to use getRowCount vs GlideAggregate COUNT for performance
Add an Approval to a Catalog Item
Catalog items without approvals create obvious risks — anyone can request expensive software or hardware without oversight. This guide walks you through adding manager or group approval steps that gate fulfillment until someone with authority signs off.
Create a Custom Role in ServiceNow
Custom roles let you bundle permissions into reusable packages that you assign to users or groups. You'll build a role that inherits from existing roles and controls access to specific tables and applications.
Delete a record with GlideRecord
Delete a specific record by sys_id
Add a user to a group programmatically
Insert a user into a sys_user_group via a server-side script
GlideAggregate Returning Wrong Count in ServiceNow
My GlideAggregate query returns a different count than what I see in the list view or a GlideRecord query.
Use getRefRecord to access a reference field record
Retrieve the full GlideRecord for a reference field without a second query
Check the approval status of a catalog request
Query the approval state of a service catalog request from a Business Rule
Populate a reference field using a server-side GlideAjax lookup
Auto-fill a reference field based on another field's value using a server lookup
Catalog Item Variables Not Saving in ServiceNow
Users submit a catalog request but the variable values aren't being saved to the RITM or task.
Manually Add a Record to an Update Set
Sometimes you make customization changes outside an update set context, or discover that a record didn't get captured automatically. This guide shows you two methods to retroactively add customization records to an update set so your changes deploy properly.
Query records in a date range
Retrieve records created or updated within a specific date range
Set a reference field with display value
Set a reference field to a sys_id while showing the correct display label
Query all CIs linked to an incident
Retrieve all Configuration Items associated with an incident record
Prevent Record Deletion with a Business Rule
Business Rules let you block record deletions when certain conditions are met, like preventing closed incidents from being deleted or protecting reference data. You'll build a rule that validates conditions and stops the deletion with a clear error message.
Create a Related List on a Form
Related lists show records from other tables that connect to your current record at the bottom of forms. You'll add one using the form configuration menu and choose which child table records to display.
Get all relationships for a CI
Retrieve all parent and child CI relationships from the CMDB
SLA Escalation Design Pattern
Use this pattern when you need automated SLA monitoring with multi-stage escalation workflows, particularly in enterprise environments with complex support structures and strict compliance requirements. This approach is essential when manual SLA monitoring is insufficient and you need guaranteed escalation paths that execute reliably even during high-volume periods.
Get all roles assigned to a user
Retrieve all roles held by a user including group-inherited roles
Configure the Service Portal Theme
Service Portal themes control your portal's visual branding — colors, fonts, logo placement, and navbar styling. This guide shows you how to customize these elements to match your organization's look and feel.
Make a basic GlideAjax call from a Client Script
Call a server-side Script Include method from a Client Script using GlideAjax
Merge Update Sets Before Exporting
When multiple update sets need to move together as a single deployment, merging creates one consolidated set with all changes combined. You'll end up with a single export that contains everything and reduces your deployment complexity.
Role Not Granting Expected Access in ServiceNow
I assigned a role to a user but they still can't access a module or see records they should be able to see.
Create a Variable Set for Reuse Across Catalog Items
When you have the same questions appearing on multiple catalog items, maintaining them separately creates duplicated work and inconsistent experiences. This guide shows you how to build variable sets that centralize those common questions and keep everything in sync.
Calculate the number of days between two dates
Find the number of days elapsed between two date-time values
Create an Inbound Email Action
Inbound Email Actions let ServiceNow automatically process incoming emails and create or update records based on what it finds. You'll build an action that triggers on specific conditions and runs your custom logic against the email content.
Workflow Not Triggering in ServiceNow
I associated a workflow with a table/record but it never starts when the condition is met.
Get a user's manager via GlideAjax
Retrieve the current user's manager from the server and populate a reference field
Run a Client Script Only for Specific Users or Roles
Client scripts can cause confusion when they fire for everyone — especially scripts that enforce field validations or hide sections meant for specific teams. This guide shows you how to restrict client scripts to users with specific roles or exclude certain users entirely.
Write an After Business Rule
After business rules run once a record is committed to the database, making them perfect for updating related records or triggering external integrations. This guide shows you how to build one properly and avoid the performance traps that catch most developers.
Add Conditions to an Email Notification
Email notifications need conditions — otherwise they fire on every update, flooding inboxes and hurting performance. This guide shows you how to add precise conditions so notifications only send when they should.
Query using addNullQuery and addNotNullQuery
Filter records where a field is empty or where it has any value
Scheduled Job Distribution Pattern
Use this pattern when you have multiple scheduled jobs that could run at flexible times, when experiencing database performance issues during peak hours, or when managing large ServiceNow instances with dozens of scheduled jobs. This is especially valuable in environments where job timing isn't strictly dictated by business requirements.
getRefRecord Returning Null in ServiceNow
When I call gr.fieldName.getRefRecord() in a Business Rule or Script Include, it returns an empty GlideRecord.
Get all attachments for a record
Retrieve all files attached to a specific record
Run a Script from a UI Policy
UI policy conditions and actions work for straightforward form control — hiding fields, making them required, setting values. When you need more complex logic or calculations, you can run custom JavaScript directly in the policy.
Approval Chain Design Pattern
Use this pattern when you need approval workflows that vary based on record attributes like amount, department, or category, when you require multiple approval stages with different logic for each stage, or when you need to support complex approval scenarios like parallel approvals within a stage followed by sequential escalation. This pattern is ideal for purchase requisitions, change requests, or any process where approval requirements are dynamic and business rules are complex.
Set Up Notification Subscriptions
Notification subscriptions let users control which emails they receive from ServiceNow instead of getting blasted with everything. You'll enable subscription settings on your notifications and show users where to manage their preferences.
Caching Expensive GlideRecord Queries Pattern
Use this pattern when you have expensive queries that execute frequently with the same parameters, such as configuration lookups, reference data retrieval, or complex aggregate calculations. It's particularly valuable for data that changes infrequently but is accessed often, like organizational hierarchies, system properties, or catalog categories.
Enterprise vs Mid-Market ServiceNow Configuration Pattern
Use enterprise patterns when you have over 5,000 users, multiple business units with distinct processes, complex compliance requirements, or need extensive customization with formal change management. Apply mid-market patterns for organizations under 2,000 users seeking rapid deployment with minimal customization and streamlined governance.
Update Set Branching Pattern
Use this pattern when you have multiple developers working on related features that may affect the same tables, applications, or business processes simultaneously. It's particularly valuable for large development teams working on major releases or when you need to maintain separate development tracks for different versions or customer implementations.
Reusable GlideAjax Script Include Pattern
Use this pattern when client scripts need to retrieve server data, perform complex calculations, or execute operations requiring server-side APIs like GlideRecord queries, web service calls, or privileged system functions. It's ideal for form validations, dependent field population, and real-time data lookups without page refreshes.
Schedule a Recurring Data Import
Recurring data imports replace manual CSV uploads and one-off data loads that break when sources change. This guide walks you through setting up automated imports that run reliably and give you visibility into what succeeded, failed, or got skipped.
Branch a Workflow Based on a Condition
Workflows often need to take different paths based on field values, user choices, or business logic. This guide shows you how to build conditional branches using ServiceNow's workflow activities and transition conditions.
Recursive GlideRecord Avoidance Pattern
Use this pattern when traversing hierarchical data structures that could exceed 500-1000 levels deep, such as deeply nested organizational charts, product categories, or approval workflows. It's essential when working with user-generated hierarchies where depth cannot be controlled or predicted.
Check if the current user is in a group
Determine whether the current user is a member of a specific group
Call Server-Side Code from a Client Script
Client scripts can't run GlideRecord queries or access server-side APIs directly — that's by design. This guide shows you how to call server-side code from a client script using GlideAjax without triggering a page reload.
Create a Standard Change Template
Standard change templates let you turn routine, pre-approved changes into one-click requests that bypass CAB review. This guide shows you how to build the template, get it approved, and make it available for technicians to use.
Create a New Table in ServiceNow
Custom tables let you store data that doesn't map to any existing ServiceNow table structure. When you're done, you'll have a new table with auto-generated forms, lists, and access controls that integrates cleanly with the platform.
Get the previous value of a field in onChange
Read the field's value before the user changed it in an onChange Client Script
Create an ACL Rule in ServiceNow
Access Control Lists (ACLs) let you restrict who can read, write, create, or delete records on specific tables or fields. This guide walks you through creating an ACL rule that controls user access based on roles and custom conditions.
Create an Assignment Rule for Incidents
Assignment rules automatically route incidents to the right team or person based on criteria you set, eliminating manual assignment and reducing response times. You'll build a rule that triggers on incident creation and updates, with conditions that determine which group gets the work.
Access the triggering record in a Flow Designer script step
Read and update the record that triggered a flow from within a script step
Write a Before Business Rule
Before Business Rules let you validate data and set field values server-side before anything hits the database. You'll build one that catches bad data, calculates fields automatically, and handles both new records and updates properly.
Get the Value of a Reference Field in a Client Script
Reference fields point to records, but client scripts need to access those related records' data. This guide shows you the reliable way to get sys_ids and field values from referenced records in client scripts.
Create an Event Script Action
Event Script Actions let you run server-side JavaScript automatically when specific events fire across your instance. You'll have a reliable way to execute background logic without blocking user interactions.
Get choice field options dynamically
Retrieve all available options for a choice field at runtime
Return a result object from a Script Include
Return structured success/failure data from a Script Include method
Create a Change Model
Change models create reusable templates that standardize how specific types of changes get processed through your organization. You'll build a template with preset workflows, approvals, and field defaults that gets cloned every time someone creates that type of change request.
Create an SLA Definition in ServiceNow
SLA definitions let you track whether your team is meeting response and resolution targets for incidents. This guide walks you through creating an SLA definition that automatically starts timing when incidents meet your criteria.
Flow Designer Subflow Not Passing Variables Correctly
When I call a subflow from a parent flow, the output variables from the subflow are empty or contain wrong values in the parent.
Set a catalog variable value in a Business Rule
Programmatically set the value of a catalog variable on an RITM
Automated Assignment Rules Pattern
Use this pattern when you have high-volume work items that require consistent, fair distribution across team members and when assignment criteria are complex enough to benefit from automation. This is particularly valuable in service desk environments with multiple skill sets, varying workloads, or time-sensitive SLA requirements.
Query records using an encoded query string
Run a GlideRecord query using a pre-built encoded query string
Count incidents grouped by state
Get a count of incidents grouped by each state value
Update Set Collision When Applying to Target Instance
When I preview an update set, it shows collisions or errors, and applying it might overwrite target changes.
Restrict Catalog Item Availability by Role
You need to hide sensitive catalog items from general users or show specialized items only to specific teams. This guide walks you through both the simple role-based approach and the more flexible ACL method.
API Authentication Strategy Pattern
Use this pattern when your ServiceNow instance has multiple API integrations requiring different authentication methods, when you need centralized management of API credentials and tokens, or when compliance requirements demand detailed audit trails for API authentication events. This pattern is essential for enterprise environments with complex integration landscapes.
Add an Approval Activity to a Workflow
Workflow approval activities let you pause automated processes and wait for human decisions before continuing. This guide shows you how to add approval activities that handle both user and group approvals with proper notifications.
Set a workflow scratchpad variable
Write a value to the workflow scratchpad from a Run Script activity
MID Server Not Connecting to ServiceNow Instance
My MID Server shows as Down or Not Validated in the ECC Queue or MID Server list.
Create an Order Guide
Order guides let users select multiple related catalog items in a single request instead of submitting separate orders for each piece. You'll build a bundled ordering experience that creates one sc_request containing multiple sc_req_item records.
Now Platform REST API Returning 403 Forbidden
My REST API call to the ServiceNow Table API or Scripted REST API returns a 403 Forbidden error.
Service Account Management Pattern
Use this pattern when building REST API integrations, scheduled imports, web services connections, or any automated system that needs to authenticate to ServiceNow. It's essential for enterprise environments where security compliance requires segregated service accounts with audit trails and regular credential rotation.
Update Set Not Containing Expected Changes in ServiceNow
I committed changes in an update set but when I preview it on another instance, some customizations are missing.
Make an outbound REST call with RESTMessageV2
Send an HTTP GET request to an external API and parse the JSON response
Real-Time vs Batch Integration Decision Pattern
Use this decision pattern when designing integrations between ServiceNow and external systems where you need to choose between immediate synchronization and scheduled bulk transfers. This is particularly valuable for incident management systems requiring real-time notifications, HRMS integrations with varying urgency levels, or CMDB synchronization with discovery tools.
Create a UI Policy for a Catalog Item
Catalog UI policies let you show or hide variables based on what users select, making complex forms feel simpler and preventing confusing combinations. You'll create a policy that responds to catalog variable changes and controls other variables accordingly.
Send a notification from an async Business Rule
Trigger an email notification from a Business Rule when a condition is met
Configure a Catalog UI Policy
Catalog item forms need to react to user inputs — show different variables based on what someone selects, make fields mandatory only when relevant. This guide shows you how to build catalog UI policies that control variable visibility and requirements dynamically.
Configure Change Approval Groups
Change approval groups control who signs off on production changes before they happen. This guide walks you through setting up approval policies, configuring the Change Advisory Board workflow, and building the emergency fast-track path that keeps your environment secure without slowing down critical fixes.
Restrict a Business Rule to a Specific Role
Some business rules should only fire when certain types of users interact with records — maybe field updates by analysts need special handling, or you want to skip validation for managers. This guide shows you how to add role checks to your business rule conditions.
Register a Custom Event in ServiceNow
Custom events let you create system-wide triggers that any script can fire and multiple processes can respond to. You'll build the event registry entry, write code to fire it, and create handlers that respond when it fires.
Use g_form.getReference to get a reference record client-side
Fetch fields from a referenced record without a GlideAjax call using g_form.getReference
Create an Outbound REST Message
Outbound REST Messages let ServiceNow push data to external systems — webhooks, third-party APIs, or other ServiceNow instances. This guide walks you through building one that can authenticate, pass dynamic values, and handle responses properly.
Create a Catalog Task Template
Catalog task templates pre-fill sc_task records with assignment groups, descriptions, and other standard fields when someone orders a catalog item. You'll set up a reusable template that generates consistent tasks for fulfillment teams.
Scoped App vs Global Scope Decision Pattern
Use this pattern when planning new ServiceNow customizations or refactoring existing ones, especially for complex implementations that will undergo regular platform upgrades. Apply this pattern when building reusable components that may be distributed across multiple instances or when implementing functionality that requires clear separation from core platform configuration.
Add a Field to an Existing Table
Custom fields let you capture the data your business actually needs instead of forcing everything into ServiceNow's out-of-box schema. This guide walks you through adding a field to an existing table and configuring it properly.
Configure Auto-Close for Resolved Incidents
Resolved incidents pile up without automatic closure, cluttering your active incident count and making reporting unreliable. This guide walks you through configuring ServiceNow to automatically close resolved incidents after a specified number of days.
Connect an Integration Hub Spoke to a Flow
Integration Hub spokes let you connect ServiceNow flows to external systems like Slack, Jira, or Microsoft Teams using pre-built actions instead of REST calls. This guide walks you through installing a spoke and using its actions in a flow.
Write a scheduled background script
Create a well-structured scheduled job script that runs on a recurring schedule
Dashboard and Report Performance Pattern
Use this pattern when dashboards take more than 3-5 seconds to load, when reports frequently time out or cause performance issues, or when you have widgets that perform complex calculations on large datasets. This pattern is particularly valuable for executive dashboards, operational reports that refresh frequently, and any reporting that aggregates data across multiple tables with thousands of records.
Create a Relationship Between CIs
CI relationships document how your infrastructure components depend on each other — which servers host applications, which services rely on databases, which networks connect systems. You'll create these relationships and use dependency maps to visualize the connections.
Add a Client Script to a Catalog Item
Catalog items need client-side behavior just like regular forms — hiding fields based on selections, validating input before submission, or auto-populating values. This guide walks you through attaching client scripts directly to catalog items where they belong.
List View Performance Optimization Pattern
Use this pattern when list views take more than 5-10 seconds to load, when dealing with tables containing over 100,000 records, or when users frequently filter on specific columns. This pattern is essential for high-volume production instances where list performance directly impacts productivity.