Define a table data source

  • Release version: Australia
  • Updated June 16, 2026
  • 2 minutes to read
  • Use the Table data source to retrieve data from internal ServiceNow tables or from external sources using Workflow Data Fabric.

    Before you begin

    • At least one context must be defined for each Table type data source with a valid mapping to the source reference table. See Configure the Context Engine Mapper for details.
    • Role required: sn_acct_lc.customer_success_application_admin

    About this task

    By defining a Table data source, you can:
    • Retrieve data from internal and external tables (See Define a Workflow Data Fabric table data source for details).
    • Map Source IDs (for example, User, Asset, Transaction) to business entities such as Sold Products, Capabilities.
    • Use conditions such as Start and End dates to analyze trend data.

    Procedure

    1. Navigate to All > Data Context Engine > Data Sources.
    2. Select > Create New.
    3. On the Data Source form, enter a name for the data source and fill in the following fields.
      See Define the data source for details on how to create a data source.
      Field Description
      Source Select Table from the drop down list. This option allows you to query data from internal and external tables.
      Frequency Select the frequency at which the data should be collected from the list.
      • Daily
      • Weekly
      • Monthly
      • Quarterly
      Aggregate Select how the aggregate score should be calculated from the list.
      • Average
      • Sum
      • Max
      • Min
      • Count: Use this option to get the total number of records in the Source table that match the filter conditions.
      Source table Select the table from which data is to be retrieved.
      Group by fields Select one or two fields or dimensions by which the data in the Source table is to be grouped.
      Conditions Specify the filter conditions to be applied to the Source table while retrieving data.
      Note:
      A Timestamp or a Date field must be present in external Workflow Data Fabric tables to ensure that incremental data can be retrieved.
      Source value Select the field that should be used to calculate the aggregate score.
      Note:
      This is not applicable if the Aggregate type is Count.
      Source reference Select the source record used to resolve the Group by fields. This field is automatically populated if you selected a single reference type field in the Group by fields option.
      Source reference resolver
      You must update the Source reference resolver script and specify the fields that are to be mapped if the Group by fields contains:
      • Two fields (maximum allowed)
      • A non-reference field.
      • An external field.
    4. Select Submit to create this data source.

    Example

    A few examples on how to configure the data source are given below:
    • Total number of P1 cases: To calculate the total number of P1 customer cases on a monthly basis, specify the following:
      • Source table: customerservice_case
      • Conditions:
        • Priority: 1
        • Created between: Last month and current date
        • Group by: sold_product
        • Aggregation: Count
        • Source reference: Auto-populated to sold_product
    • Reassignment count sum: To calculate the sum of reassignment count by Account and Product, select:
      • Source table: customerservice_case
      • Conditions: Reassignment count is not 0
      • Group by: Account, Product
      • Aggregation: Sum
      • Source value field: Reassignment count
      • Source reference: sold_product
      • Source reference resolver: Specify the mapping between the Account and Product combination and the Sold Product table in the script as follows:
        • var account = groupByFieldValueMap[account]
        • var product = groupByFieldValueMap[product]

    What to do next

    After defining the data source, the next step is to configure the context engine mapper. See Configure the Context Engine Mapper for details.