この文章は Salesforce 機械翻訳システムを使用して翻訳されました。詳細はこちらをご参照ください。
英語に切り替える

Schedule Account Plan Calculation V2

取引先プランの計算をスケジュールします。一括チェーンでは、編集可能な取引先プランがサポートされます。計算では最大 500 個の取引先プラン ID をスケジュールできます。

このエンドポイントは、取引先プランを計算する場合に使用します。取引先プランは、新規プロジェクトの作成時に顧客のビジネスプランで処理されます。「取引先プラン」「顧客のビジネスプラン」を参照してください。

リソース
1SCHEDULE_ACCOUNT_PLAN_CALCULATION_V2
使用可能なバージョン
55.0
Apex 要求の例

ベースライン計画の計算

1// name of the salesorg for which the hob should be scheduled
2String salesOrg = '0001';
3<namespace>.ScheduleAccountPlanCalculationV2Callout callout = new <namespace>.ScheduleAccountPlanCalculationV2Callout(salesOrg);
4
5// Log Transaction Id
6String txId = <namespace>.TransactionHandler.getTransactionIdentifier();
7
8// Job object
9<namespace>.Job job = new <namespace>.Job();
10job.JobChainName = 'TPM_Calculation_Chain_<timestamp>';
11job.JobName = 'AccountPlanCalculationBasic';
12job.BatchChainType = 'default';
13
14// Account Plans in Scope
15List<cgcloud__Account_Plan__c> accountPlansToCalculate = [
16    SELECT Id FROM cgcloud__Account_Plan__c WHERE cgcloud__Sales_Org__c = :salesOrg 
17    // AND ... 
18];
19
20<namespace>.ScheduleAccountPlanCalculationV2Callout.Options options = new <namespace>.ScheduleAccountPlanCalculationV2Callout.Options();
21options.writebacksubsets = new List<String> { 'basic' };
22options.cleanupobsoletemeasures = false;
23
24
25<namespace>.OffplatformCalloutResponse response = callout.execute(txId, job, accountPlansToCalculate, options);
26
27if (response.status != 200) {
28   // Handle error
29}

BusinessPlan の計算

1// name of the salesorg for which the hob should be scheduled
2String salesOrg = '0001';
3<namespace>.ScheduleAccountPlanCalculationV2Callout callout = new <namespace>.ScheduleAccountPlanCalculationV2Callout(salesOrg);
4
5// Log Transaction Id
6String txId = <namespace>.TransactionHandler.getTransactionIdentifier();
7
8// Job object
9<namespace>.Job job = new <namespace>.Job();
10job.JobChainName = 'TPM_Calculation_Chain_<timestamp>';
11job.JobName = 'AccountPlanCalculationBusinessPlan';
12
13// Account Plans in Scope
14List<cgcloud__Account_Plan__c> accountPlansToCalculate = [
15    SELECT Id FROM cgcloud__Account_Plan__c WHERE cgcloud__Sales_Org__c = :salesOrg 
16    // AND ...  
17];
18
19<namespace>.ScheduleAccountPlanCalculationV2Callout.Options options = new <namespace>.ScheduleAccountPlanCalculationV2Callout.Options();
20options.writebacksubsets = new List<String> { 'businessplan' };
21options.cleanupobsoletemeasures = false;
22
23
24<namespace>.OffplatformCalloutResponse response = callout.execute(txId, job, accountPlansToCalculate, options);
25
26if (response.status != 200) {
27   // Handle error
28}