Use Case: Fund Amount

The Fund object stores the fund amount in Salesforce. To show a fund amount for a particular category or brand, fetch it from the Salesforce database by using custom data sources.

Prerequisites

  1. Create a KPI definition for the fund amount. For this KPI definition, ensure that the object scope is Account and it has the writeback feature enabled.
    Note

    Note

    This KPI definition only provides a name for the external KPI. The Apex class defines how to input values in this KPI.

  2. Enter the name of the datasource table as Account Measure.
  3. Add the KPI to the Reporting KPI set that's used in the report.

Report Configuration

Apart from defining RTRSalesforceMonthlyMeasures as an additional datasource in the report configuration, ensure that you add the newly created KPI to the list of measures.

{
"label": "Fund Amount",
"name": "myFndAmount"
},

Apex Classes

The custom data sources are related to two base Apex classes. You can use both classes only for code-routing and not to perform any actual logic, queries, or calculations; this is because all reports share these classes.

Note

Note

In RTR, integration users run both the Apex classes, not the user who opens the report. As a result, integration users must have access permissions to the used Apex classes.