Context and domain separation

  • Release version: Zurich
  • Updated July 31, 2025
  • 2 minutes to read
  • Summarize
    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 Context and domain separation

    Context and domain separation in ServiceNow define how a user's session determines accessible processes, data, and user interface elements while navigating the platform. The user's session context is influenced by factors such as user profiles, groups, company criteria, and domain hierarchies. This mechanism ensures users see only the data and functionality relevant to their assigned domains and any child domains, maintaining data segregation and tailored user experiences.

    Show full answer Show less

    User Session Context

    The session context begins with the user's home domain, typically set on their user record by the system administrator and aligned with their company's domain. Upon login, the domain picker defaults to this home domain, allowing users to view data and UI elements from their home domain, child domains, and the global domain.

    Users can narrow their session context by selecting specific child domains via the domain picker. All database queries during the session automatically include the domains in the user's session context, ensuring that query results are restricted to permissible data only. This filtering is enforced by embedded compiled code, invisible to users.

    Service accounts used for integrations also have session contexts with user and record data scoped to specific domains, applying the same domain separation principles to integration data access.

    Record Context

    When users interact with individual records, record context becomes active. The domain of the record dictates which UI elements and business processes apply. Notably, record context remains persistent even when a user's domain selection changes, allowing consistent interaction with records, including across multiple browser tabs.

    Practical Implications for ServiceNow Customers

    • Data Security and Segmentation: Domain separation ensures that users only see and interact with data within their authorized domains, supporting data privacy and compliance.
    • Customizable User Experience: UI elements and available processes adapt dynamically based on session and record contexts, enabling tailored workflows per domain.
    • Integration Controls: Integration service accounts respect domain separation, limiting data access according to configured contexts.
    • Session Management: The domain picker allows users to control their session scope within authorized domains without compromising data segregation.

    Understanding and properly configuring context and domain separation is essential for customers who manage multi-domain environments or require strict data segregation within ServiceNow. This setup supports secure, efficient, and context-aware user interactions across domains.

    The context of a user's session determines the processes, data, and user interface (UI) as the user browses through list views, home pages, reports, and knowledge articles. The context is determined by the processes that you create, the business rules that you set, your workflows, and other factors.

    User session context

    Many factors determine the context of a user session, such as user profiles, groups, company criteria, and so on. In the following diagram, you see that the incidents that a company has created are part of the context.

    User session context

    The user in this example has a home domain of Cloud Dimensions.

    1. The branding reflects the settings in the Cloud Dimensions domain and company record.
    2. The application navigator shows the items that are inherited from higher-level domains as well as the modules that are defined in the Cloud Dimensions domain.
    3. The home pages and list data reflect the data that is visible to the user. This data is based on the user’s session context. In this case, the user in the Cloud Dimensions domain can see the data in Cloud Dimensions, child domains, and the global domain.

    User session context starts in the home domain

    In the following diagram, you can see the elements of the context.

    User session context home domain

    The system administrator sets users' home domains on their user records. Typically, a user’s home domain is set to the same domain as their company’s domain. When the user logs in, the domain picker sets automatically to the user’s home domain. Users can return to their home domain at any time by clicking the arrow icon on the domain picker.

    The domain picker's list includes domains within the user’s session context. Users may further limit their session context by selecting child domains with the picker.

    The context of the user session includes the user's home domain and any child domains. This set of domains in the user’s session context is appended automatically to every query that is sent to the database. That way, the results are limited to just the data in these domains and global data. This process is embedded in the compiled code that is not accessible.

    Service accounts that are used for integrations also have user session context. There is user context and records context, each with its own data in its own domain. These contexts affect the integrations. Database queries (records) are limited in the same way as interactive users (users), meaning that they work as normal but are limited by whatever constraints the developer has configured.

    You can learn about additional ways to add domains to a user’s session context in Service provider reference architecture.

    Record context

    As a user drills into individual records, record context is activated. The record context determines the UI elements and processes to apply to the record.

    A record’s domain dictates the process, data, and the availability of UI elements within the record.
    Note:
    • Record context persists even if the user's domain changes.
    • Users can view records concurrently in multiple browser tabs, while maintaining their own record context.

    Record context