Detect an impersonated session
Detect whether the current session is impersonating another user
Add a Breakdown to a Performance Analytics Widget
Performance Analytics widgets give you real-time metrics on dashboards, but flat numbers don't tell the story — you need to see how incidents break down by assignment group or how requests vary by category. This guide walks you through adding breakdown sources to PA indicators and configuring widgets to display segmented data.
Multi-System Data Reconciliation Pattern
Use this pattern when you have multiple authoritative systems providing overlapping data about the same entities, such as HR systems and Active Directory both providing user information, or multiple CMDBs providing asset data. This pattern is essential for enterprise environments where data consistency and auditability are critical compliance requirements.
Set Up a Change Advisory Board
Change Advisory Boards automate the review scheduling for changes that require formal governance. This guide walks you through configuring recurring CAB meetings with the right members and change filters to route requests appropriately.
Return multiple values from a GlideAjax call
Return a JSON object with multiple fields from a single GlideAjax server call
Create a Custom CMDB CI Class
Custom CI classes let you track configuration items that don't fit existing categories — IoT sensors, specialized appliances, or business-specific assets. You'll end up with a properly positioned table in the CMDB hierarchy that supports Discovery and maintains data integrity.
Scoped App Cross-Scope Access Denied in ServiceNow
My scoped application throws a 'Requested operation requires an explicit cross-scope privilege grant' error.
Set Up a Major Incident Process
Major incidents need faster response times and broader communication than regular tickets. This guide walks you through configuring the separate major incident workflow and response process.
Create a Scripted REST API endpoint
Define a custom REST API endpoint that returns JSON data
Enable Multi-Factor Authentication
Multi-factor authentication adds a required second factor — typically a time-based code or email OTP — to protect ServiceNow logins. You'll set up MFA policies, assign them to users or groups, and configure the authentication methods your organization supports.
Instance Clone Management Pattern
Use this pattern when managing multiple ServiceNow environments that require regular data refreshes while maintaining environment-specific configurations like integrations, credentials, and custom properties. This is essential for enterprise implementations with complex development workflows, strict security requirements, and coordinated release schedules.
Add a Typeahead Search to a Service Portal Widget
Typeahead search fields let users find records quickly without scrolling through long dropdowns or memorizing exact names. This guide walks you through building one that queries any ServiceNow table and handles the performance considerations that trip up most implementations.
Add a Script to a Transform Map
Transform scripts let you handle complex data manipulation during imports that field mappings alone can't accomplish. You'll write JavaScript that runs during the transformation process to combine fields, look up related records, or conditionally skip rows entirely.
Domain Separation Not Filtering Records Correctly
In a domain-separated instance, users are seeing records from other domains or can't see records from their own domain.
Change Management Automation Pattern
Use this pattern when managing high-volume change environments where manual processes create bottlenecks and inconsistent risk assessments. It's ideal for organizations with mature CMDB data and established testing frameworks that need to scale change management while maintaining governance controls.
Authenticate an Outbound REST Integration
Your ServiceNow instance needs to call external APIs that require authentication, and hardcoding credentials in scripts is a security nightmare waiting to happen. This guide shows you how to set up proper authentication profiles and REST Messages that keep credentials secure and maintainable.
Outbound REST Retry and Circuit Breaker Pattern
Use this pattern when integrating with external APIs that may experience intermittent failures, rate limiting, or temporary outages, especially in high-volume integration scenarios. It's essential for mission-critical integrations where service availability directly impacts business operations and when you need to prevent cascade failures from propagating through your ServiceNow instance.
Configure a MID Server
MID Servers create the bridge between ServiceNow and your on-premise infrastructure, enabling Discovery, LDAP integration, and custom API calls that can't reach across your firewall. This guide gets you from downloaded installer to validated connection.
Async Processing Pattern for Long-Running Operations
Use this pattern when business rules perform operations that take more than a few seconds, such as bulk record updates, complex calculations across large datasets, or multiple external API calls. It's essential when users report slow form saves, transaction timeout errors, or when operations involve processing hundreds or thousands of records.
ServiceNow Instance Clone Not Completing
An instance clone has been running for hours with no progress, or it fails partway through.
Read the request body in a Scripted REST endpoint
Parse the JSON request body in an inbound Scripted REST API endpoint
Data Archiving Strategy Pattern
Use this pattern when your ServiceNow instance has tables growing beyond 2-3 million records, when report and list performance is degrading due to large datasets, or when you need to meet compliance requirements for data retention while maintaining system performance. This is particularly valuable for incident, change, task, and audit tables in mature ServiceNow implementations.
Event-Driven Architecture Pattern in ServiceNow
Use this pattern when you have complex business processes that involve multiple systems, lengthy operations that could impact user experience, or when you need to integrate multiple loosely-coupled components that shouldn't directly depend on each other. It's particularly valuable when building scalable solutions that need to handle high transaction volumes or when you want to improve maintainability by separating detection logic from processing logic.
Get value from a transform script in an import set
Use a transform script to set a target field value based on source data
ATF Test Failing with Unexpected Results in ServiceNow
My Automated Test Framework (ATF) test was passing but now fails, or a new test fails when the manual steps work fine.
Domain Separation Design Pattern
Use domain separation when you need strict data isolation between business units, subsidiaries, customers, or geographical regions within a single ServiceNow instance. This pattern is ideal for managed service providers serving multiple customers, large enterprises with independent business units, or organizations with regulatory requirements for data segregation.
Get a field's internal name from a GlideRecord
Iterate over all fields on a record to get their internal column names
Configure Single Sign-On with SAML
SAML SSO eliminates password fatigue for your users and gives your security team centralized control over ServiceNow access. This guide walks you through the full configuration from metadata exchange to production testing.
Process records in batches to avoid scheduled job timeout
Handle large record sets in a scheduled job using batch processing
Build a Class-Based Script Include
Class-based Script Includes give you proper object-oriented utilities that other scripts can instantiate and use. You'll build a reusable class with multiple methods using ServiceNow's Class.create() pattern.
Safe Deployment and Rollback Pattern
Use this pattern for critical production deployments, major feature releases, or when deploying changes that affect core business processes or large user populations. This pattern is essential when your organization has strict SLA requirements, compliance obligations, or when the cost of deployment failures is high.
Integration Error Dead Letter Queue Pattern
Use this pattern when building critical integrations that cannot afford to lose data during temporary outages or when processing high-volume integrations where occasional failures are expected. This is essential for systems that must guarantee message delivery or provide audit trails for compliance requirements.
Create a Service Portal Widget
Service Portal widgets let you build custom UI components that display data or capture user input without the limitations of stock portal pages. This guide walks you through creating a widget from scratch using the Widget Editor.
ServiceNow Platform Governance Framework Pattern
Use this pattern when managing enterprise ServiceNow instances with multiple developers, regulatory compliance requirements, or complex change management processes. It's essential for organizations that need to maintain strict code quality standards, require audit trails for all platform changes, or integrate ServiceNow development with existing IT governance frameworks.
Inbound API Rate Limiting Pattern
Use this pattern when exposing public-facing or high-volume REST APIs that need protection from abuse, DoS attacks, or runaway client applications. It's essential for APIs that perform expensive operations, access sensitive data, or integrate with external systems that have their own rate limits.
ACL Design Pattern for Complex Organizations
Use this pattern when your organization has multi-dimensional data access requirements that cannot be satisfied by simple role inheritance alone, such as regional managers who need access to their geographic area across multiple departments, or compliance scenarios where data visibility depends on changing business relationships. This pattern is ideal when performance is critical and you need to minimize the number of ACL evaluations while maintaining precise security boundaries.
ServiceNow Microservices Integration Pattern
Use this pattern when ServiceNow needs to integrate with cloud-native applications, containerized microservices, or when you're implementing event-driven architecture across multiple systems. This is ideal for organizations adopting DevOps practices where ServiceNow participates in CI/CD pipelines or when you need to maintain data consistency across distributed systems without tight coupling.
Create a text attachment on a record
Programmatically attach a generated text file to a record
CMDB Data Model Design Pattern
Use this pattern when implementing a new CMDB, redesigning an existing one that has grown organically, or when you need to integrate multiple data sources into a unified configuration model. This is essential for organizations that require accurate impact analysis, automated service mapping, or comprehensive change risk assessment.
Create an Application Scope in ServiceNow
Application scopes let you package customizations into portable, version-controlled applications that can be published to the ServiceNow Store. This guide walks you through creating a scope and understanding the access restrictions that come with it.
Create a Scripted REST API
Scripted REST APIs let you expose custom ServiceNow data and business logic through clean REST endpoints that external systems can call. You'll build the service definition, configure resources for different HTTP methods, and write the server-side script that handles requests and responses.
ServiceNow Instance Running Slow
The instance feels sluggish — pages take a long time to load, forms save slowly, and users are complaining about performance.
Script Include Inheritance Pattern
Use this pattern when you have multiple Script Includes that share common functionality but require specialized behavior, such as different types of integrations, notification handlers, or data processors. It's ideal when you want to enforce consistent interfaces across related classes while avoiding code duplication.
Copy attachments from one record to another
Duplicate all attachments from a source record to a target record
MID Server Load Balancing Pattern
Use this pattern when you have high-volume integrations that exceed single MID Server capacity, need geographic distribution of MID Servers for network access or compliance reasons, or require high availability for mission-critical integrations. This pattern is essential for large enterprises with multiple data centers, extensive discovery requirements, or integration workloads that must continue operating during maintenance windows.
Set Up Two-Stage Approval on a Catalog Item
Two-stage approvals handle requests that need both a manager's sign-off and a business owner's approval before fulfillment. This guide walks you through building sequential approvals in Flow Designer that pass catalog variables to both approval stages.
Service Catalog Architecture at Scale
Use this pattern when your organization has more than 50 catalog items, multiple departments or business units contributing catalog content, or when you're experiencing inconsistent user experiences and high maintenance overhead. This pattern is essential for enterprises with complex approval chains, multiple fulfillment teams, and regulatory compliance requirements.
Sensitive Data Masking Pattern
Use this pattern when handling personally identifiable information (PII), financial data, healthcare records, or any sensitive information that requires regulatory compliance such as PCI DSS, HIPAA, or GDPR. This pattern is essential for organizations that need to maintain detailed audit trails while ensuring sensitive data remains protected from unauthorized access.
Hub-and-Spoke Instance Architecture Pattern
Use this pattern when your enterprise has multiple business units requiring ServiceNow customization autonomy but needs centralized reporting, governance, and master data management. This is ideal for large corporations with subsidiaries, global organizations with regional requirements, or companies that have grown through acquisitions and need to consolidate ServiceNow footprints.
Create a Custom Action in Flow Designer
Custom Actions let you package server-side scripts into reusable blocks that any flow can call. You'll build an Action that accepts inputs, runs your script logic, and returns outputs to the calling flow.
CI/CD Pipeline Pattern for ServiceNow
Use this pattern when you have multiple ServiceNow instances (dev, test, prod) with regular deployments, need automated testing validation before promotion, require change management approval workflows, or have compliance requirements for deployment traceability. This is essential for large teams with frequent releases or regulated industries requiring deployment documentation.
Configure LDAP Integration
LDAP integration keeps your ServiceNow user records in sync with Active Directory or LDAP servers without managing passwords in multiple places. You'll set up automated imports that pull user data on a schedule while your SSO provider handles authentication.
Create a Record-Level ACL with Conditions
Record-level ACLs let you filter what data users can see within a table based on field values, relationships, or complex business logic. You'll build one with a condition script and understand how to avoid the performance pitfalls that can cripple your instance.
CMDB CI Not Being Created by Discovery
Discovery runs successfully but CIs for certain devices aren't appearing in the CMDB.
Paginate through large result sets with GlideRecord
Process large query results in chunks using chooseWindow to avoid timeouts
ATF Test-Driven Development Pattern
Use this pattern when developing new features or major enhancements where requirements are well-defined and code quality is critical. It's particularly valuable for complex business logic, integrations, or functionality that will be maintained by multiple developers over time.
Row-Level Security Pattern
Use this pattern when you need to enforce data segregation within a single table based on user attributes, such as restricting sales representatives to see only their assigned accounts, limiting HR personnel to employee records in their region, or ensuring multi-tenant applications properly isolate customer data. This pattern is ideal for compliance requirements that mandate strict data access controls and audit trails.
Create a Virtual Agent Topic
Virtual Agent topics let you build conversational flows that guide users through tasks or help them find information without human intervention. This guide walks you through creating a topic from scratch and getting it live for real users.
Large Table Query Optimization Pattern
Use this pattern when querying tables with over 100,000 records, especially tables that grow continuously like audit logs, metrics, or transaction records. Apply these techniques when experiencing query timeouts, slow dashboard loading, or when building reports on large historical datasets.
Set the current update set via script
Switch the active update set programmatically in a background script
Multi-Tenant ServiceNow Architecture
Use this pattern when serving multiple distinct customer organizations, business units with different compliance requirements, or when offering ServiceNow as a managed service. It's essential when tenants require different customizations, have varying security requirements, or when regulatory compliance demands data isolation.
High Availability Design Pattern
Use this pattern for mission-critical ServiceNow implementations where downtime directly impacts business operations, revenue, or regulatory compliance. It's essential for organizations with strict SLA requirements, global operations requiring 24/7 availability, or systems that serve as single sources of truth for critical business processes.
IntegrationHub Spoke Action Failing in ServiceNow
My IntegrationHub spoke action throws an error when the flow runs it.