---
schema_version: "1"
id: 81d6495e4fbf9e88cff2ee8547bb2021d00ea02cf98a4efc091d016a0058869c
title: ScoreCard Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/retail_api/apex_class_CGCloud_RTRReportResult_ScoreCard.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/apex_class_CGCloud_RTRReportResult_ScoreCard.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: f6d80f8a59446d5063f02f962393a4fa1db8f70390935ccfc579fc0734d894c5
description: Represents a Real Time Reporting (RTR) report scorecard component. This class extends the ReportComponent class.Returns true if a record can be retrieved.
---
# ScoreCard Class

Represents a Real Time Reporting (RTR) report scorecard component. This class extends the ReportComponent class.

## Namespace

[CGCloud](https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/apex_namespace_CGCloud.htm "The CGCloud namespace provides classes that allow you to customise Real Time Reporting (RTR) data extraction from Apex.")

## Usage

The RTRReportResult.ScoreCard class is accessible outside of the managed package.

## Example

Here’s an example of how to extract the ScoreCard data from the RTRReportResult object.

// Extract the ScoreCard from the result
// - The component name must match its 'uimapping' name
// - The result must be casted to the correct type.
cgcloud.RTRReportResult.ScoreCard scoreCard = (cgcloud.RTRReportResult.ScoreCard) 
    reportResult.getComponent('ScoreCard');
    
// Extract KPI data. We assume the specified KPI's are in the configured scorecard
Decimal kpiValue = scoreCard.getValue('ProPlanIncrVolume');

system.debug('Value: ' + kpiValue);

- **[ScoreCard Methods](https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/apex_class_CGCloud_RTRReportResult_ScoreCard.htm#apex_CGCloud_ScoreCard_methods)**

## ScoreCard Methods

The following are methods for ScoreCard.

- **[getValue(String kpiName)](https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/apex_class_CGCloud_RTRReportResult_ScoreCard.htm#apex_CGReporting_ScoreCard_getValue)**  
    Returns true if a record can be retrieved.

### getValue(String kpiName)

Returns true if a record can be retrieved.

#### Signature

public RTRReportResult.ScoreCard getValue(String kpiName)

#### Parameters

- **kpiName**: Type:String. The name of the KPI from which the value is to returned. The key performance indicator (KPI) must be included in the scorecard.

#### Return Value

Type:Decimal