Context and domain separation
Summarize
Summary of Context and Domain Separation
Understanding context and domain separation is crucial for managing user sessions effectively in ServiceNow. The context defines what processes, data, and user interface elements users can access based on their home domain and associated domains.
Show less
Key Features
- User Session Context: Determined by user profiles, groups, and company criteria, this context influences what incidents and data users can see. The home domain reflects the branding and data visibility specific to the user’s company.
- Domain Picker: Users can easily navigate between their home domain and child domains, which limits their session context to relevant data.
- Record Context: Activated as users engage with individual records, this context governs the UI elements and processes applicable to those records. It remains active even if the user changes domains, allowing for concurrent viewing in multiple tabs.
Key Outcomes
By effectively utilizing context and domain separation, ServiceNow customers can ensure that users access only the relevant data and UI elements appropriate to their roles and domains. This not only enhances data security and management but also streamlines the user experience within the application.
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.
The user in this example has a home domain of Cloud Dimensions.
- The branding reflects the settings in the Cloud Dimensions domain and company record.
- 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.
- 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.
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.
- 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.