Loading
Set Up and Maintain Retail Execution
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          AggregatePromotionBatch

          AggregatePromotionBatch

          To show the promotions for visits or show the promoted products for orders, create promotion store records that link promotions to stores by using the AggregatePromotionBatch batch. A retail promotion is set up using either an anchor account or an anchor account set. The anchor account is higher in the account hierarchy. Lower-level accounts are designated valid stores (Current Date is between Store Valid From and Store Valid Thru dates in Account Extension).

          Required Editions

          Available in: Lightning Experience

          Available in: Enterprise and Unlimited Editions where Consumer Goods Cloud is enabled

          Considerations

          Keep these considerations in mind during the batch run.

          • The batch handles the promotions that have an anchor account (the Anchor Customer field isn’t null).
          • To find the store accounts, the batch job looks into the account hierarchy by using the flatten account hierarchy.
          • The batch doesn’t consider the promotions that have an anchor customer set for batch processing. The accounts in the customer set are directly targeted for ‌promotion, eliminating the need for hierarchical checks.
          • The batch runs ad-hoc or can be scheduled periodically and Salesforce runs the batch at the given time interval. If the batch is scheduled, it runs with a batch size in the corresponding batch process configuration record. If no batch process configuration record is found, it runs with the default batch size in the class, which is 1. Batch process configuration records are shipped via static resource CSV files during the org setup.

          Batch Job Details

          • The batch retrieves the promotions that have:
            • The Active field as checked
            • Current Date between Date From and Date Thru
            • Phase as Committed
            • Anchor Account as not null
            • Record Type as SellablePromotion (Starting from Spring ’25)
          • The batch process finds the stores that belong to the anchor account hierarchy.
          • The batch creates promotion store records linking the promotion to the store for the anchor account. The batch verifies if promotion store records are added or removed for each batch run.
          Example
          Example

          Here are the promotions and flatten account hierarchy for NTO Atlanta.

          Advanced Promotion

          Slogan Active Anchor Customer Date From Date Thru Phase
          Special Cookies Checked NTO Atlanta 1/1/2000 1/1/2099 Committed

          Flatten Account Hierarchy

          Account Node Level Account Level 01 Account Level 02 Result Level
          NTO Atlanta 1 NTO Atlanta   Trade Org
          NTO Store 2 NTO Atlanta NTO Store Store

          This batch creates these promotion store records.

          Promotion Store

          Promotion Store
          Special Cookies NTO Store
           
          Loading
          Salesforce Help | Article