Promotion

This section provides information about promotion..

loadPromotionDefaults2

  • Description: Loads promotion values. If the Input Id matches and existing promotion by Id or by External Id, the Promotion will be loaded. If not, a new promotion will be created.
  • Classname: Promotion2BoApiCoreWorkflowSteps
  • Method: loadPromotionDefaults
Table 1. Input Properties
Property Description Required or Optional
.Id SFDC Id or External Id for the Promotion. Optional
.PromotionTemplate Promotion Template Name or SFDC Id of the Promotion Template Required

setPromotionAnchor2

  • Description: Sets the Promotion Anchor (Account, Account Set or null) depending on the template
  • Classname: Promotion2BoApiCoreWorkflowSteps
  • Method: setPromotionAnchor
Table 2. Input Properties
Property Description Required or Optional
.AnchorAccount SFDC Id or External Id for the customer. Optional
.AnchorAccountSet SFDC Id or Name for the customer set. Optional

setPromotionDates2

  • Description: Sets the dates (from/thru, commit, placement, order, delivery for a promotion)
  • Classname: Promotion2BoApiCoreWorkflowSteps
  • Method: setPromotionDates
Table 3. Input Properties
Property Description Required or Optional
.DateFrom Start date. Optional
.DateThru Start and end date. Optional
.CommitDate Commit date. Optional
.PlacementDateFrom Placement start date. Optional
.PlacementDateThru Placement start and end date. Optional
.OrderDateFrom Order start date. Optional
.OrderDateThru Order start and end date. Optional
.DeliveryDateFrom Delivery start date. Optional
.DeliveryDateThru Delivery start and end date. Optional

This workflow step sets the dates for a promotion. It maps the following Simple Promotion JSON properties to their equivalents on the Promotion Object.

DateFrom => Date_From__c
DateThru => Date_Thru__c
CommitDate => Commit_Date__c
PlacementDateFrom => Placement_Date_From__c
PlacementDateThru => Placement_Date_Thru__c
OrderDateFrom => Order_Date_From__c
OrderDateThru => Order_Date_Thru__c
DeliveryDateFrom => Delivery_Date_From__c
DeliveryDateThru => Delivery_Date_Thru__c
It has 2 different cases:
  • On New Promotion
    • DateFrom and DateThru are required. If they're missing, raise an exception.
    • If any of the other properties is missing, the value from it's equivalent in the DateFrom/DateThru will be used instead
  • On Update Promotion
    • If any of the other properties is not provided, the original value remains untouched.

applyPromotionDateHandling2

  • Description: Applies automatic date handling rules to new promotions. must be executed after setPromotionDates rule.
  • Classname: Promotion2BoApiCoreWorkflowSteps
  • Method: applyPromotionDateHandling

This rule must run after setPromotionDates rule.

setPromotionCategories2

  • Description: Sets the promotion categories.
  • Classname: Promotion2BoApiCoreWorkflowSteps
  • Method: setPromotionCategories

setPromotionSubAccounts2

  • Description: Sets the promotion default sub accounts.
  • Classname: Promotion2BoApiCoreWorkflowSteps
  • Method: setPromotionSubAccounts

This workflow step sets the Sub Account information for the promotion. On a new Promotion, it checks for the Sub_Accounts_Enabled__c flag of the template. If set, set the SubAccounts selection using the methods of the Promotion Factory class:

setPromotionParticipatingCustomers2

  • Description: Sets the promotion default participating customers list.
  • Classname: Promotion2BoApiCoreWorkflowSteps
  • Method: setPromotionParticipatingCustomers

This workflow step sets the Participating Customer information for the promotion. On a new Promotion, it checks for the Is_Pushable__c flag of the template.