Contexts in Recommended Actions
Summarize
Summary of Contexts in Recommended Actions
Contexts in the Recommended Actions framework enable agents to receive tailored recommendations based on specific conditions related to records in tables like Case and Incident. By creating contexts, administrators can enhance agents' decision-making by suggesting relevant actions aligned with the record context.
Show less
Key Features
- Creation of Contexts: Involves selecting a table, defining rules for agents based on roles, and establishing recommendations for those rules.
- Multiple Context Records: Each table can have multiple contexts, allowing for varied user experiences based on attributes or domains, though only one can be active at a time.
- Dynamic Recommendations: Recommendations and AI Search results adjust dynamically according to the active context, which can be managed in UI Builder.
- Synchronous and Asynchronous Modes: Administrators can configure how recommendations load—either before user interaction (synchronous) or in the background (asynchronous).
- Hierarchical Contexts: Rules and recommendations can be inherited from parent contexts, streamlining configuration across related tables.
- Refresh Interval: Administrators can set how often recommendations refresh, with a default of 12 hours, configurable down to 10 minutes.
Key Outcomes
By utilizing contexts effectively, ServiceNow customers can:
- Improve agent efficiency through personalized recommendations tailored to their roles and tasks.
- Adapt the system for different user interactions based on channels like chat or phone, enhancing service delivery.
- Manage recommendations dynamically, ensuring agents always have the most relevant information at hand.
- Leverage predictive models to optimize actions and outcomes based on varying user scenarios.
A context enables agents to see recommendations for records from a table when certain rules are met. These recommendations can help agents by suggesting actions to take based on the record context.
- Selecting a table.
- Creating rules for the context. A rule shows recommendations to agents with certain roles for records that meet certain conditions.
- Creating recommendations for the rules. A recommendation is a way to suggest a helpful action to an agent.
The Recommended Actions application includes a context record, Case Context, that you can use to create recommendations for cases.
The Recommended Actions application supports multiple context records per table. This enables users to create different experiences based on criteria such as user attributes or domains.
One context record per table can be active at a time. The Recommended Actions component can be configured in UI Builder to use the active context record. The recommendations and AI Search results adjust dynamically according to the configured active context.
Context form
You can access context records by navigating to . The Contexts list displays a brief description of each context and the table that the context applies to.
- Rules: Displays the rules that have been created for the context, including the selected user roles. You can create a rule only from the Rules related list on the Context form.
- Recommendations: Displays the recommendations associated with the context rules, including the action type and action. You can create a recommendation only from the Recommendation related list on the Rule form.
- Search result mapping: Displays mappings between AI search outputs and Recommended Actions inputs.
- Inherited rules: Displays the rules inherited from the parent context. The Inherited rules related list appears only for the contexts that have the parent context assigned. For more information on how the parent context rules are inherited by the child context, see Apply rules to tables extended from the context table.
- Extended contexts: Displays all the contexts which use the current context as a parent context. This related list appears only for the parent contexts.
Refresh interval field
Synchronous and asynchronous modes of evaluation for Recommended Actions
As an admin, you can configure the loading behavior at the context level for Recommended Actions, by choosing between synchronous and asynchronous modes. In synchronous mode, recommendations are loaded before the page becomes interactive, ensuring a complete view is available before any action is taken. In asynchronous mode, recommendations load in the background without blocking the user interface, allowing agents to start interacting with the record immediately. Each mode is tailored to meet different performance and user experience requirements.
The Asynchronous Evaluation check box in the Context form, when selected enables the agents to make updates and perform actions on the case or incident record while the recommendations load on the contextual side panel. By selecting this field, an admin or RA author can enable asynchronous processing for recommended actions.
The sn_nb_action.async_ra_timeout system property specifies the timeout duration (in seconds) for an asynchronous process to generate the recommendations. This value serves as a guideline for managing execution time and preventing excessive delays. The default value is set to 30 seconds, and the maximum value can be 180 seconds. If the generation of recommended actions takes more than 30 seconds, the Retry button on the contextual side panel appears. The retry process starts in synchronous mode - it runs directly during user interaction instead of processing asynchronously.
Inheriting the rules and recommendations from hierarchical contexts
The parent context field appears only when the table selected in the Table field has one or more parent tables for which context is defined. Using the Parent context field, you can import it's active rules and recommendations into the extended context. When you click the search icon on this field, the list of contexts of parent tables is displayed. You can select any one parent context from the list. The rules that are inherited appear in the Inherited Rules related list. For more information on how to configure rules so that the recommendations are inherited by the extended context, see Apply rules to tables extended from the context table.
Inheriting the rules and recommendations from hierarchical contexts
| Table | Context | Rule | Recommendation |
|---|---|---|---|
| Table 1 | Context 1 (Active) | Rule 1 (Active) | Recommendation 1 |
| Table 2 | Context 2 (Inactive) | Rule 2 (Inactive) | Recommendation 2A and Recommendation 2B |
| Table 3 | Context 3 (Active) | Rule 3 (Active) | Recommendation 3 |
| Table 4 | Context 4 (Active) | Rule 4 (Active) | Recommendation 4 |
| Table 5 | Context 5 (Active) | Rule 5 (Active) | Recommendation 5 |
- Scenario 1: When you add Context 3 in the Parent context field of Context 4, the Rule 3 and Recommendation 3 are inherited by Context 4.
- Scenario 2: When you add Context 2 in the Parent context field of Context 5, the Rule 2 and its recommendation 2A and 2B aren’t inherited by Context 5 as the Rule 2 is inactive.
Creating multiple context records for the same table
Starting with v14.0 of Recommended Actions, the Avoid duplicate active entry for context business rule allows the creation of more than one context per table. You can create more than one context for the same table. This enables you to configure precise recommendations for various types of records in the same table.
The following are use cases where you can create different contexts for the same table:
- Use case 1: Different roles may interact with the same table but need tailored actions or views.
- Consider the Interaction table. The same interaction data can be worked upon differently based on the user persona.
- Context A: Show field recommendations for resolution, or related change tasks/catalog items, or standard knowledge articles for the IT Support Agent on the Interaction record page.
- Context B: Surface similar resolved case or relevant knowledge article recommendations for the Customer Service Support Agent on the Interaction record page.
- Use case 2: Each context may use a different Predictive Intelligence model or AI model variant for recommendations.
- Enables testing and adoption of ML models in parallel without conflict.
- Context A: Use similarity model for Recommended Actions.
- Context B: Use classification model for categorization or assignment.
- Use case 3: Users may access the same record through different channels—chat, email, voice, etc., requiring tailored recommendations.
- Entry points provide different signals and user intent.
- Context A: When the case is created via Chat Agent, recommend and share the KB article in chat action.
- Context B: When the case is accessed via Phone Support, surface KB articles and enable sharing via SMS channel.
Configuring a context record for the Recommended Actions component
When configuring the Recommended Actions component in UI Builder, users with the Recommended Actions admin role (next_best_action_admin) can set a component input property that maps the active context record to the component.
On the Config tab for the Recommended Actions component, enter the sys id of the active context record in the Context Sys id field. For more information about configuring UI Builder components, see Components documentation.
Case Context record
The Recommended Actions for Customer Service application adds the Case Context record for the Case table [sn_customerservice_case]. This record is active by default (Active=true). For more information on the Case Context record, see .