Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Schedule Rate Based Funding Calculation

Schedules a collection of Rate Based Funding (RBF) Objects for calculation.

The calculation process creates conditions from the Rate Based Funding calculation results and write them to the account product measures storage. Some KPIs can also be written back to the Rate Based Funding Objects in Salesforce.

Resource
1SCHEDULE_RATE_BASED_FUNDING_CALCULATION
Available version
55.0
Apex Request Example
1String salesOrg = '0001'; // Sales Organization name
2<namespace>.Job jobInstance = new <namespace>.Job();
3Set<Id> rbfIds = new Set<Id>{'rbfId_1','rbfId_2'};//Ids from RBF records
4jobInstance.JobChainName = 'TPM_Calculation_Chain_'+Datetime.now().getTime();
5jobInstance.JobName = 'ScheduleRateBaseFundingJob';
6jobInstance.JobModes = new List<String>{'MapCalculationResultsWithKpiMap','WritebackConditionRecords'};
7jobInstance.JobThreads = 25; // ⚡ ADD: Number of parallel workers (default: 5, max: 25 on production/full copy sandbox, 3 on other sandboxes)
8List<cgcloud__Rate_Based_Funding__c> rbfs = new List<cgcloud__Rate_Based_Funding__c>([SELECT Id FROM cgcloud__Rate_Based_Funding__c WHERE Id IN :rbfIds]);
9<namespace>.ScheduleRBFCalculationCallout callout = new <namespace>.ScheduleRBFCalculationCallout(salesOrg);
10<namespace>.OffPlatformCalloutResponse response = callout.execute(
11    <namespace>.TransactionHandler.getTransactionIdentifier(), 
12    jobInstance, 
13    rbfs
14);
15if (response.status != 200) {
16    //Handle error
17}