To fulfill business processes, run the batch server processes available with the Trade
Promotion Management package. These server processes
manage recalculations
for updates in interfaced data and require that the master data be loaded into
the system. When you schedule the TPM Calculation chain, the server process runs Promotion
Reorganization—cleaning up deleted or inactive promotions, Promotion Calculation, Account
Product List, and Account Plan Add-Ons.
Required Editions
Available in: Lightning Experience in Enterprise, Professional,
and Unlimited Editions that have Consumer Goods Cloud enabled
Ensure that tenant pairing is successfully completed and that the master data be loaded into the
system
User Permissions
Needed
To schedule server processes:
CGCloud Business Admin
From Setup, select Developer Console.
Click Debug | Open Execute Anonymous Window.
The Enter Apex Code window opens.
To run the batch process, run one of these Apex classes:
Batch Process To
Apex Class
Code Snippet
Remove all promotion attachments that aren’t linked to any
promotion.
Trigger the TPM calculation chain. When the TPMCalculationChain class is
triggered, processes are run as per the flow that’s set for the calculation
chain.
The default calculation chain flow is only for demonstration. Use it
as a model to set up your customized calculation chain. After you configure
your calculation chain, you can’t change the order of the processes. The
calculation chain calculates promotions for only one level.
TPMCalculationChain
Use one of these code snippets:
To include all processes:
new
cgcloud.TPMCalculationChain('##SALES_ORG##').startProcess();
.
cgcloud.TPM_BC_Settings s = new
cgcloud.TPM_BC_Settings('##SALES_ORG##');cgcloud.TPMCalculationChain c =
new cgcloud.TPMCalculationChain(s);c.startProcess();: To exclude
single processes by changing the configuration of the TPM_BC_Settings
object, change the settings, such as time range, and accounts of the
TPM_BC_Settings object to adjust the scope of the configuration.
Enter a valid sales org, for example, 0001 in: ##SALES_ORG##.
After the code run, the debug log is listed on the Logs tab.
Did this article solve your issue?
Let us know so we can improve!
Loading
Salesforce Help | Article
Cookie Consent Manager
General Information
Required Cookies
Functional Cookies
Advertising Cookies
General Information
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.