Skip to main content
Gainsight Inc.

Tutorial: Load Scorecard 2.0 data to CustomerInfo object

In this tutorial, we will load Scorecard 2.0 scores to the Customer Info object with the help of a Bionic Rule. By loading Scorecard 2.0 data to Customer Info object you can have all the customer related information in one object and easily generate reports. Scorecard 2.0 values/data reside in MDA and CustomerInfo object contains all the other info related to customers. By adding the scoring information as well to the Customer Info object, all the customer info can be found at one place (CustomerInfo). 

First, we will create two custom fields in the Customer Info object to store Current and Previous scorecard 2.0 scores. 

  1. Current score 2.0 of Number datatype - to store current scores. 
  2. Score Previous 2.0 of Number datatype - to store previous scores.

Following is an illustration of the steps performed in this bionic rule

Create Custom fields on Customer Info object

  1. In Salesforce, go to Setup > Create > Objects
  2. Click CustomerInfo object.
  3. In Custom Fields & Relationships section, click New
  4. Select Number as the data type and click Next
  5. Provide Field Labels as Current Score 2.0 or Previous Score 2.0
  6. Click Next and proceed to Step 4. 
  7. Click Save. Two new fields will be created with the names Current Score 2.0 and Previous Score 2.0. These two fields are used to store scorecard data from 2.0 in Customer Info object. 

Create a Rule to fetch and load scorecard 2.0 data

In this rule, we use the fetch task type in bionic rules and use a merge task to achieve the output.

Create the following tasks in the Bionic Rule:

  1. Fetch Company Data - In the first fetch task, select Matrix Data and select Company object. 
    • Add SFDC Account ID and GSID as the Show fields and save the fetch task. 
  2. Fetch Scorecard Fact ID - In the second fetch task, select Matrix Data select Account Scorecard Scorecard Fact object. 
    • Add Company ID, Current Score ID, Previous Score ID, Measure ID and save the fetch task. 
  3. Merge 1 - merge the outputs of Company data and Scorecard Fact ID.
    1. Select Retain all records from the right dataset as the join type. 
    2. Unselect GSID
    3. Select the Show Selected box. 

  1. Fetch Measure Name - fetch measure names from the Scorecard Measures object in MDA. 
    • Select GSID and Name as the Show fields. 
  2. Merge 2 - merge the outputs of Merge 1 and Fetch Measure Name. 
    1. Select Retain all records from the right dataset as the join type. 
    2. Unselect GSID
    3. Select the Show Selected box. 

  1. Fetch Current Score - Select Scoring Scheme Definition object in Matrix Data to fetch the current score. 
    • Select GSID, Label, and Score as the Show fields and save the fetch task. 
  2. Merge 3 - merge the outputs of Merge 2 and Fetch Current Score. 
    1. Select Retain all records from the left dataset as the join type. 
    2. Unselect GSID.
    3. Select the Show Selected box.

  1. Fetch Previous Score - using Scoring Scheme Definition object in Matrix Data to fetch the previous score. 
    • Add GSID, Label, and Score as the Show fields and save the fetch task. 
  2. Merge 4 - merge the outputs of Merge 3 and Fetch Previous Score. 
    1. Select Retain all records from the left dataset as the join type. 
    2. Unselect GSID.
    3. Select the Show Selected box. 

  1. Fetch scorecard comments - using Account Scorecard Fact object in Matrix Data to fetch the comments. 
    • Add Comments, Company ID as the Show fields and save the fetch task. 
  2. Merge 5 - merge the outputs of Merge 4 and Fetch scorecard comments. 
    1. Select Retain all records from the left dataset as the join type. 
    2. Unselect GSID.
    3. Select the Show Selected box 
  3. Click Save

Load to Customer Info object 

  1. Proceed to Setup Action step. 
  2. Click + ACTION
  3. Select Load to Customers
  4. Map the following items on this page: 
    1. Current Score with Current Score 2.0 (Double)
    2. Previous Score with Score Previous 2.0 (Double)
    3. SFDC Account ID with Account (Reference)
    4. Comments with Comments (Text Area)

  1. Save the action. 
  2. Proceed to Schedule step and schedule the rule as per your requirement. 
  • Was this article helpful?