Context inputs in Recommended Actions

  • Release version: Yokohama
  • Updated July 2, 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 inputs in Recommended Actions

    Context inputs in Recommended Actions enable ServiceNow customers to associate multiple entities beyond the primary context table with a context. This dynamic, JSON-based feature allows real-time updates—such as user selections and additional table records—to continuously refine recommendations and support multiple active contexts simultaneously. This capability significantly improves recommendation relevance and operational efficiency.

    Show full answer Show less

    Key Features

    • Creation and Management: Customers can create context inputs from the Context inputs related list on the Context form, with support for multiple active inputs per context.
    • Supported Data Types: Context inputs support String, List, Integer, Long, Choice, True/False, Reference, Reference dot walked, Sysid data types, enabling versatile data associations.
    • Usage Across Components: Context inputs can be mapped for use in default search terms (Contextual AI Search Config), rules (condition builder), recommendations (Action inputs), and resource generators (Generator inputs).
    • UI Builder Integration: The JSON format of context inputs must be added to the Recommended Actions UI Builder component to pass dynamic values on record pages, ensuring that recommendations reflect the latest context.

    Configuration Steps

    • Create context inputs via the Context form (note that contexts with a parent context defined cannot have context inputs until the parent is removed).
    • Map context inputs appropriately to rules, recommendations, search terms, or resource generators depending on your use case.
    • Add the JSON representation of active context inputs to the Recommended Actions UI Builder component’s Context input field to enable dynamic data passing.

    Important Considerations and Limitations

    • You cannot simultaneously define a parent context and configure context inputs for the same context; these configurations are mutually exclusive.
    • Defining context inputs on a parent context breaks the parent-child relationship; child contexts will lose inherited rules and recommendations.
    • To add context inputs to a context with an existing parent context, the parent context must be removed first.
    • When a context input is deleted or deactivated, the UI Builder component passes an empty value for it in subsequent iterations.

    Practical Impact for ServiceNow Customers

    By leveraging context inputs, customers can create more granular, dynamic, and relevant recommendations tailored to evolving contexts across various tables and records. This flexibility supports complex workflows, improves user experience, and ensures that recommendations adapt automatically as context changes occur. Understanding the configuration limits around parent contexts helps maintain proper context hierarchy and prevents unexpected loss of inherited rules and recommendations.

    A context input enables you to associate entities beyond just the context table with a context ensuring that recommendations are updated dynamically as the context evolves.

    You can create a context input from the Context inputs related list in the Context form. These dynamic JSON-based context inputs enable you to include real-time updates such as user selections, additional table records, and so on, to refine recommendations and support multiple active contexts. This enhances recommendation relevance and operational efficiency. For example, you can create a context input for the Incident table and use in the Case context record.
    Note:
    You can create multiple active context inputs for a context.
    The following data types are supported for a context input:
    • String
    • List
    • Integer
    • Long
    • Choice
    • True- false
    • Reference
    • Reference dot walked
    • Sys id

    Configuring a context using a context input

    Configuring a context using context inputs includes the following steps:
    • Creating a context input. For more information on how to create a context input, see Create a context input in Recommended Actions.
      Note:
      • If a context has a parent context defined, you can’t create context inputs for it.
      • You can have multiple active context inputs simultaneously.
    • Mapping the context input to the following according to your requirement:
      • default search term by adding it in the Contextual AI Search Config section on Context form.
      • rules by using it in the condition builder on Rules form.
      • recommendations by adding it in fields of the Action inputs section on Recommendations form.
      • resource generators by adding it in the fields of Generator inputs section on Resource Generators form.
    • Adding the JSON-format of the context inputs to the Recommended Actions component for the required record pages in the UI Builder. For more information, see Configuring Recommended Actions UIB component for context inputs.

    The context inputs appear along with the context table in the appropriate fields of Rule, Recommendation and Resource generator forms so that you can include the data other than that of the context table to update the recommendations.

    Configuring Recommended Actions UIB component for context inputs

    As an RA author or admin, you must add the JSON-format of the context inputs in the Context input field of Recommended Actions UIB component to pass the values. You can get the JSON-format of the context input by selecting the Copy input JSON button on the Context input related list in the Context form. The JSON-format includes all the active context inputs. When a context input is deleted or deactivated after configuring the Recommended Actions UIB component, an empty value is passed for these context inputs in UIB from the upcoming iterations.

    Context Input configuration limitations

    The limitations for context inputs configuration are as follows:
    • You can either define a parent context or configure context inputs for a context.
    • When context inputs are defined for a parent content, then it's rules and recommendations cannot be inherited by its child contexts. In other words, the parent context does not appear in the Parent context field of the Child context.
    • To define context inputs for a context which has a parent context defined already, delete the parent context in the Parent context field so that the Context inputs related list appears. And in the Context inputs related list, select the New button to create context inputs.
    • When a context input is defined for a parent context which has a child context associated, then the parent-child context link is broken. In the child context, the inherited rules and recommendations will be removed from the Inherited Rules and Recommendations related list respectively.