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:
Navigate to Administration > Rule Engine > +RULE.
Provide the following details:
- Rule Type: Bionic Rule
- Rule For: Account
- Rule Name: Load to Scorecard History
- Description (Optional): Add description as required.
Click NEXT to save the rule details and navigate to Setup Rule to set up the 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.
- Click DATASET TASK to create a fetch task.
- Enter the task details:
- Task Name
- Task Description
- Output Dataset Name
- Select Matrix Data as data source.
- Select the Past Usage Data (Custom object created and used for this article) object.
- Add the fields to the Show fields section as the following:
Note: Ensure to select Account ID, required Measures and Snapshot Date, to map the intended data appropriately in the action.
- Click SAVE to save the task details.
- Setup Action
This page allows you to set up an action for the data fetched in the previous step.
- 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.
- 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.
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 overall score is recalculated (if rollup is enabled) along with the exceptions.
Note: The action is performed with an assumption that the aggregated records with the appropriate granularity are brought into the system while importing.