The Overall Score section of the scorecard feature relies on data within the Scorecard Fact object in order to calculate correctly. You may encounter instances where the Overall Score does not calculate correctly.
This is commonly caused by duplicate records on the Scorecard Fact object providing incorrect data for the Overall Score to use in its calculations. When this occurs, Scorecard sections for affected records will likely appear similar to the example image above.
Ideally, each customer should only have a single record for a single scorecard measure in the “Scorecard Fact” object. For example, if there are 5 Scorecard measures, then each customer should have a maximum of 5 scorecard fact records against that customer. (If there is a score applied for each measure then there should be max of 5 scorecard fact records against that customer, but if only one scorecard measure has a value then scorecard fact should have only one record).
Check for Duplicate Records
- Navigate to the Report Builder and create a report on the ScorecardFact object.
- Select the following fields: Id, Account Name, Current Score Id Name, and Metric Id Name.
- Apply a filter for the Account where you are seeing the issue.
- If there are duplicates as shown below, the issue is caused by duplicate records.
If duplicates do not appear within this report, contact Gainsight Support for additional assistance with this issue.
In order for the Overall Score to calculate correctly for affected records, the duplicate records will need to be deleted from the Scorecard Fact object.
This can be achieved using a data loader tool such as Workbench to query and manipulate data within the Scorecard Fact object. When using a data loader tool to remove duplicate records, we recommend using the following query:
“SELECT JBCXM__Account__r.Name accName, count(Id) cnt from JBCXM__ScorecardFact__c group by JBCXM__Account__r.Name HAVING count(Id) > X”- where X is the number of Scorecard Measures.
Or, use the report illustrated below to identify if there are duplicate scorecard fact records:
Once the duplicate records are identified, get the duplicate record Ids by building a new report (image in Troubleshooting steps), and then delete the duplicate record Ids.
To delete duplicate records, use this query:
- Delete [Select Id FROM JBCXM__ScorecardFact__c WHERE Id in (input the list of duplicate Id)]
Note: Deleting duplicate records also deletes the score associated with that measure.