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

Schedule Promotion Calculation

プロモーション ID に基づいて、一括計算用のプロモーションジョブをキューに追加します。
ソフト制限:
  • PromotionLoaderMaxNumberOfPromotions に基づく、プロモーションローダーの最大プロモーション数。デフォルト値は 1000 です。
リソース
1SCHEDULE_PROMOTION_CALCULATION
使用可能なバージョン
55.0
Apex 要求の例
1// Endpoint name
2String endpointName = 'SCHEDULE_PROMOTION_CALCULATION';
3// Sales Organization name
4String salesOrg = '0001';
5// 
6String jobName = '<PromotionCalculationJobName>';
7Set<Id> promosIds = new Set<Id>{'<promotionId_1>', '<promotionId_2>'};
8
9<namespace>.OffPlatformCallout callout = new <namespace>.OffPlatformCallout(
10    endpointName,
11    salesOrg
12);
13
14<namespace>.OffPlatformCalloutResponse response = callout.execute(
15    <namespace>.TransactionHandler.getTransactionIdentifier(),
16    new Map<String, String>(),
17    JSON.serialize(
18        new Map<String, Object> {
19            'jobname' => jobName,
20            'salesorg' => salesOrg,
21            'promotionids' => promosIds,
22            'batchchain' => String.format(
23                'Promotion_Batch_Transaction_{0}',
24                new List<String>{
25                    <namespace>.TransactionHandler.getTransactionIdentifier()
26                }
27            )
28        }
29    )
30);
31if (response.status != 200) {
32   // Handle error
33}