Skip to content

NPS score in reports and dashboards

The NPS score is the share of promoters minus the share of detractors. Salesforce can't count that by itself, so you add two small formula fields to NPS Response, and calculate the score in a report. A dashboard can then show it.

NPS score on a dashboard

Before you start

  • The nps.today package is installed and syncs responses, see Install the package.
  • You can create fields, reports and dashboards in Salesforce.

Step 1: Add the formula fields

Each field is 1 when the response is a promoter or a detractor, and 0 otherwise.

  1. Go to Setup → Object Manager → NPS Response → Fields & Relationships, and click New.
  2. Choose Formula and click Next.
  3. Field Label: Is Detractor. Field Name: change it to IsDetractor, without the underscore Salesforce suggests, so the API name is IsDetractor__c as in the report formula below. Formula Return Type: Number, with 0 decimal places. Click Next.
  4. Enter the formula, and click Next until you can Save:

    IF(ISPICKVAL(npstoday__RatingGroup__c, "-1"), 1, 0)
    
  5. Do the same for a field with the label Is Promoter and the field name IsPromoter (API name IsPromoter__c), with this formula:

    IF(ISPICKVAL(npstoday__RatingGroup__c, "1"), 1, 0)
    

The formula fields on NPS Response

"-1" and "1" are the API names of the values Detractor and Promoter in the picklist Rating Group:

The values of Rating Group

Step 2: Calculate the score in a report

  1. Create a report on NPS Responses.
  2. Add Is Promoter and Is Detractor as columns.
  3. Add a Summary Formula column, e.g. NPS, with the format Number and this formula:

    npstoday__Response__c.IsPromoter__c:SUM / RowCount * 100
    -
    npstoday__Response__c.IsDetractor__c:SUM / RowCount * 100
    

    The summary formula

  4. Save the report. Group it, e.g. by account owner or by month, to get the NPS score per group.

Step 3: Show it on a dashboard

Add a dashboard component based on the report, e.g. a gauge or a metric with the NPS column.

Check it

Compare the score in the report with the NPS score of the same campaign and period in nps.today. They match when the report includes the same responses.