Configure the Context Engine Mapper

  • Release version: Australia
  • Updated March 12, 2026
  • 3 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 Configure the Context Engine Mapper

    The Context Engine Mapper in ServiceNow allows you to define mappings between source data entities and corresponding context entities. This enables you to resolve context-specific records based on data sources, such as linking engagements to customer accounts. It is essential for organizing and analyzing data collected by the Data Context Engine based on designated breakdown fields like account type or engagement status.

    Show full answer Show less

    This configuration is performed after defining a data source and helps categorize data effectively to support contextual insights.

    Key Features

    • Mapping Types:
      • Global (Related table): Matches source field values with query fields in a related table to return mapped context records.
      • Metric based: Enables customized mapping logic tailored to specific data sources or metrics, offering granular and flexible filtering.
      • Script: Overrides table-based mapping by using scripts to determine context records when dot-walking queries are insufficient.
    • Configurable Fields:
      • Source table and source field: Define where the original data resides.
      • Supporting related table and query field: Connect source and context tables for mapping.
      • Resolving context table and field: Specify where mapped context records are stored.
      • Optional resolving table conditions: Apply filters to narrow context record results.
      • Metric list: Select applicable data sources when using metric-based mapping.
    • Role Required: Must be logged in as a user with the snacctlc.customersuccessagent role to create and manage mappings.

    How to Configure

    • Navigate to All > Data Context Engine > Context Engine Mappers > Create New.
    • Fill in the fields to specify the mapping type, source table/field, related table/query field, resolving context table/field, and optionally add conditions or scripts.
    • Submit the mapping configuration.
    • Publish your previously created data source under All > Data Context Engine > Data Sources to start data collection based on the mapping.

    Practical Benefits for ServiceNow Customers

    This configuration enables your organization to:

    • Precisely map and categorize incoming data to relevant context records, enhancing data accuracy and relevance.
    • Apply advanced filtering and custom logic with script-based or metric-based mappings for complex scenarios.
    • Ensure that data collected by the Data Context Engine is organized for meaningful analysis and reporting aligned with your business structure and needs.

    After you have defined the data source, use the Context Engine Mapper to specify the record in the context table for which it is applicable.

    The Context Engine Mapper is a framework that establishes mappings between source entities and their corresponding context entities, enabling the resolution of context-specific records based on given sources such as resolving engagements from customer accounts.

    You can use the Context Engine Mapper to determine which fields will be used to categorize data collected by the Data Context Engine. This mapping ensures that data is organized and analyzed based on designated breakdown fields such as account type, engagement status, or sold products.

    Note:
    You can set up the context engine to map the source and target tables using one of the following methods:
    • Related table: Use the mapping rule related table[query_field] = source table[source_field]. In every record in the Source table, the Source field value is matched with the Query field in the Related table.
    • Script: If a script is defined, it takes precedence over the table based mapping. The script checks the Source Field and the ID of the record to determine the appropriate context based on the resolving context table.
    • Metric based: Mapping logic can vary depending on the data source used for metrics and measurements. Can be used for more granular and context specific mappings.
    1. Login as a user with the sn_acct_lc.customer_success_agent role.
    2. Navigate to All > Data Context Engine > Context Engine Mappers > Create New.
    3. Enter the following details:
      Field Description
      Type This can be:
      • Global: For each record in the source table, the source field value is matched against the query field in the supporting related table. If a match is found, the associated values from the resolving context field are returned as mapped context records.
      • Metric based: This type is used to enable mapping specific to certain data sources or conditions. The mapping logic can vary depending on the data source used and provides enhanced filtering and flexibility.
      Source table Select the source table to which the data source is to be mapped. This table is related to the attribute selected in the Breakdown field in the Data Source table. For example, if you selected Account in the Breakdown field, select the Customer Account table here.
      Source field The specific field in the source table that contains the data to be mapped.
      Supporting related table The related table that will be used to connect the source and context tables.
      Query field Select the field that is used to query or dot walk the Supporting related table to map data from the Source table to the Context table.
      Metric list If Type is Metric based, select a data source from the list. If a data source listed here is used for a specific source or target table, this mapping takes precedence over the Global mapping.
      Resolving context table The target table where resolved context records are stored.
      Resolving context field The target field where the mapped data will be stored.
      Resolving table conditions (Optional) You can use additional conditions, such as field level filters, to narrow down the results from the resolving context table based on specific criteria.
      Script If you cannot query the context table through dot walking, you can define a script that uses the Source field and returns an array of possible context fields.
      Note:
      If a script is defined for a Metric based mapper, it overrides:
      • Supporting related table
      • Resolving table conditions

      The script returns an array of context record IDs based on the conditions defined.

    4. Select Submit to save the context mapping.
    5. Navigate to All > Data Context Engine > Data Sources.

      Metric data collection data source
    6. Open the data source you had created earlier and select Publish.

      Data will now be collected according to the defined schedule and the context engine data record is created and stored in the Context Engine Data table.

    The following examples show how to set up the different types of mapping:

    Related table (Global)

    Context engine mapping with related table
    Metric Based Type
    Metric based mapping
    Script

    Context engine mapping with script