In this use case, the custom datasource is used to include a fixed fund KPI in Real
Time Report (RTR). As a result, the fixed funds are aggregated on both category and brand
levels. One visualization option is this report, in which a brand value is only available for
one brand. However, this value is not summed up to the category level. For the calculation of
category levels, the data that's stored on Salesforce and Processing Services is
used.
Report Configuration
- Create new KPI definitions for each use case, such as Fixed RDF Brand. Ensure that the object scope of these KPI definitions is Account.
- Enter the name of the datasource table as Account Measure.
- Define these KPI definitions in the report configuration
- Create a custom metadata type, TPM_RTRRouting__mdt, which is linked to the KPI definition, sales
organization, fund template, and KPI levels.
Field API Name Type Description Fund_Template__c Text Determines the KPI to which the fixed funds are to be attributed. For example, All Transaction Row Records, in which the target fund has the RDF Brand Fund that belongs to the Fixed RDF KPI. KPI_Definition__c Text Name of the Fixed Funds KPI (such as FXDR and FTDR) that determines the data which should be returned from the logic in the Apex class. KPI_Level__c Text Fixed funds can be stored on different levels (currently, category and brand). This is needed to determine the method that should be run. (category and brand use different logic.) Sales_Org__c Text Sales organization to which the record belongs. - On the cgcloud__Fund_Transaction_Row__c object,
add a new field.
Field API Name Type Description Formula TPM_RTRAmount__c Formula (Double) Fixed Funds for Brands are calculated based on the value of the Amount field on the transaction record. Depending on the transaction type (withdraw or deposit), the sum of the aggregated amounts either increases (deposit) or decreases (withdraw). The formula field turns the amounts of records with transaction type = deposit to negative values. Instead of aggregating the amount field, you can aggregate the TPM_RTR_Amount__c field.
IF(ISPICKVAL( cgcloud__Transaction_Type__c , 'Withdraw'), cgcloud__Amount__c * (-1), cgcloud__Amount__c ) - On the cgcloud__Fund_Transaction_Header__c object, add a new field.
Field API Name Type Description TPM_Product__c Lookup(Product) Used to link products to the Multi-Fund Transaction object. - On the cgcloud__Fund_Template__c object, add a new field.
Field API Name Type Description TPM_RTRRoutingFundType__c Picklist Used to filter fund template records. The picklist values of this field are fund template record names.