Schedule Accruals
To trigger the accrual calculation process chain, schedule the Accrual Process Chain class.
Required Editions
Available in: Lightning Experience Available in: Enterprise and Unlimited Editions where Trade Promotion Management, Data Cloud, and CRM Analytics are enabled |
| User Permissions Needed | |
|---|---|
| To schedule accruals: | CGCloud Business Admin |
To schedule the Accrual Process Chain, run this code:
cgcloud.ScheduleTPMAccrualProcessChain c = new
cgcloud.ScheduleTPMAccrualProcessChain(Date.today(), new List<string>{'0001'}, 'full');
c.execute(null);
The class initiates the operations in this order.
- Accrual Rule Extract Worker: Extracts accrual rules from tactics, generates CSV files, and uses the Data Cloud Ingestion API to move the files to the tpm-accrualrule_ingest data lake object (DLO).
- TPM_DATA_TO_ACCRUAL_ENGINE: Transforms TPM data into the accrual engine's ingest DLOs (accrualinput_ingest, accrualrule_ingest, and accrualclaim_ingest).
- ACCRUAL_DELTA_CALCULATION: Calculates changes from ingested inputs and routes claims and existing accrual outputs for the next step.
- ACCRUAL_RULE_PROCESSING: Applies accrual rule mechanics, generates accrual output records, and processes closed accrual rules.
- TPM_ACCRUAL_OUTPUT_DECORATION: Enriches the accrual output records with other TPM context for reporting.
- TPM_CALCULATE_TACTIC_FUND_LIABILITY_USING_ACCURALS: Shows the liability accrued in the Tactic-Fund card of a promotion.
For more information, see ScheduleTPMAccrualProcessChain Class.
Did this article solve your issue?
Let us know so we can improve!

