Skip to main content
Gainsight Inc.

Load to Scorecard History using Rules Engine

This article describes how to load to Scorecard History object using Bionic Rules in Rules Engine. Load to Scorecard History action type introduced in Setup Action area of Rules Engine enables Admins to:

  • Build historical health scores for accounts by bringing in backdated data from other systems (via Salesforce Or Custom Objects).
  • Modify health score calculations based on a newly added measure.
  • Modify historical health scores of account to reflect any changes made to the scorecard scoring methodology. This includes changes in measure criteria, weightages, new measures added etc...

Note: This action type is available only in Bionic Rules. For more information about Bionic Rules, refer to Getting Started with Bionic Rules.

Configure a Bionic Rule to load to Scorecard History object

To configure a Bionic Rule:

  1. Create Rule

  1. Navigate to Administration > Rule Engine > +RULE.

Administration _Rule Engine _+RULE.png

  1. Provide the following details:

  • Rule Type: Bionic Rule
  • Rule For: Account
  • Rule Name: Load to Scorecard History
  • Description (Optional): Add description as required.
  1. Click NEXT to save the rule details and navigate to Setup Rule to set up the rule.

  1. Setup Rule

This page allows you to create various tasks to fetch the required data to be loaded to Scorecard History object. In this article, an MDA custom object which contains data loaded from an external source (Past Usage Data ), is used to select the required scorecard fields in setting up the rule. For more information about tasks, refer to Bionic Rule Task Creation.

  1. Click DATASET TASK to create a fetch task.
  2. Enter the task details:
  • Task Name
  • Task Description
  • Output Dataset Name
  1. Select Matrix Data as data source.
  2. Select the Past Usage Data (Custom object created and used for this article) object.
  3. Add the fields to the Show fields section as the following:

Setup Rule.png

Note: Ensure to select Account ID, required Measures and Snapshot Date, to map the intended data appropriately in the action.

  1. Click SAVE to save the task details.
  1. Setup Action

This page allows you to set up an action for the data fetched in the previous step.

  1. Provide the details as following:
  • Action Type: Select Load to Scorecard History from the drop-down list.
  • Operation: Select an option as required from the drop-down list.
  • Select Account Identifier: Select the required account identifier for which records will be updated in the Scorecard History object.
  • Select Measure: Select the required measure from the drop-down list.
  • Select Scorecard: Select the required scorecard from the drop-down list. Only scorecards of the selected measure in the previous step are displayed here.
  • Time Granularity (Optional): Select a value for which action related calculations are performed. By default, weekly calculations are performed.
  • Date Identifier: Select a date for which scorecard history details are stored.
  • From Date: Select a date from the Calendar. This is the start date of the date range within which the action related calculations are performed.
  • To Date: Select an end date of the date range from the Calendar.
  • Set Score from: Select a scheme from the available fields.
  • Scale field value check-box: Select this option to provide the Source Range values. 

Setup Action.png


  • Only one measure can be selected in the action.
  • Only Scorecards 2.0 (both Account and Relationship) are supported. For more information about configuring Scorecards 2.0, refer to Configure Scorecards (2.0).
  • Only ‘weekly’ granularity is supported.
  • The date range allows a maximum limit of only six months.
  • For any given week, Scorecard history can hold the history of only one Scorecard. If you try to load one Scorecard's history into a week populated with another Scorecard's history, the existing Scorecard history will NOT be overwritten.
    Example: Scorecard A (applicable from Jan - Mar and Scorecard B (applicable from April - June) has the same measure ' Bugs'. If you try to load the history of Scorecard B for the duration of Jan - March, even though the rule is run successfully, you get the result with the history of scorecard A. The rule will not overwrite the history, unless the history of scorecard A is deleted from back end.
  1. Click SAVE to save the details or RUN NOW to run the rule immediately. To schedule the rule navigate to the Schedule screen. For information about how to schedule a rule, refer to Scheduling Rules.

When Load to Scorecard History action is run with the mentioned configuration, the weekly label or snapshot date that falls within the mentioned Start Date and End Date for the selected Accounts is considered. The records for this weekly label or snapshot date are considered. If:

  • One record exists, it is updated.
  • Multiple records exist, the latest record is updated.

On selecting either Upsert or Insert operation, the roll-ups (overall & group scores) will be automatically calculated (based on what the current scorecard definition is) along with the exceptions. Rollup should be enabled.

Note: The action is performed with an assumption that the aggregated records with the appropriate granularity are brought into the system while importing.

  • Was this article helpful?