Promotion

This section provides information about promotion..

  • 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
PropertyDescriptionRequired or Optional
.IdSFDC Id or External Id for the Promotion.Optional
.PromotionTemplatePromotion Template Name or SFDC Id of the Promotion TemplateRequired
  • Description: Sets the Promotion Anchor (Account, Account Set or null) depending on the template
  • Classname: Promotion2BoApiCoreWorkflowSteps
  • Method: setPromotionAnchor
PropertyDescriptionRequired or Optional
.AnchorAccountSFDC Id or External Id for the customer.Optional
.AnchorAccountSetSFDC Id or Name for the customer set.Optional
  • Description: Sets the dates (from/thru, commit, placement, order, delivery for a promotion)
  • Classname: Promotion2BoApiCoreWorkflowSteps
  • Method: setPromotionDates
PropertyDescriptionRequired or Optional
.DateFromStart date.Optional
.DateThruStart and end date.Optional
.CommitDateCommit date.Optional
.PlacementDateFromPlacement start date.Optional
.PlacementDateThruPlacement start and end date.Optional
.OrderDateFromOrder start date.Optional
.OrderDateThruOrder start and end date.Optional
.DeliveryDateFromDelivery start date.Optional
.DeliveryDateThruDelivery 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.

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.
  • 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.

  • Description: Sets the promotion categories.
  • Classname: Promotion2BoApiCoreWorkflowSteps
  • Method: setPromotionCategories
  • 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:

  • 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.