IBM Support

How to consider multiple quantities for free gift rule for pricing type order total?

Question & Answer


Question

While creating a coupon based on order total it should give 2 quantity of items as free. If we add a promo code of some eligibility criteria, a free gift line of 2 quantity should get added to the order.However, the quantity is getting updated to 1. How to consider multiple quantities for free gift rule for pricing type order total?

Cause

For pricing rule of type order total for free gift rule the TargetOccurrenceLimit on PricingRuleAction kicks in during number of quantity on the order line. PricingRuleTargetItem are used w.r.t EACH_COMBINATION and for  IncludeOrExclude="INCLUDE" the inclusion targets Quantity and plays a role determining how many quantities should be included as part of free gift. The default behavior or quantity in PricingRuleTargetItem still hold the same as per java docs.

Answer

This issue can be resolved by using WhenToApply="SPECIFIC_NUMBER " and TargetOccurrenceLimit="2"

Sample XML below for quantity 2

<PricingRule Operation="" RuleCategory="PRICING" IsFreeGiftRule="Y"  OrganizationCode="DEFAULT"
IsCouponRule="Y" ItemOperatorCode="ANY_ITEM" PricingRuleName="bcoupon1" RuleType="ORDER_TOTAL" StartDateActive="1999-10-29T00:00:00-04:00" Currency="USD" DistributeAdjustment="N"
PricingRuleKey="bcoupon1" EndDateActive="2090-10-29T00:00:00-04:00" Description="PR2 - If OT>100, get 1 item2 stick for free"
PricingStatus="ACTIVE" EnableMixNMatchItems="Y" ExclusivityId="" ExclusivityType="" >
   <PricingRuleActionList Reset="">
       <PricingRuleAction Adjustment="-100" AdjustmentType="PERCENT"
           ApplyType="DISCOUNT" ChargeCategory="Discount"
           ChargeName="Discount" MaxAbsoluteAdjustment="" Operation=""
           OrderTotal="100.000000" PricingRuleActionKey=""
          TargetOccurrenceLimit="2" WhenToApply="SPECIFIC_NUMBER "/>
   </PricingRuleActionList>
   <PricingRuleTargetItemList>
       <PricingRuleTargetItem IncludeOrExclude="INCLUDE" Operation="" TargetItemID="item2" TargetUnitOfMeasure="EACH" Quantity="1" />
   </PricingRuleTargetItemList>
     <Coupon CouponID="bcoupon1"/>
</PricingRule>

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS6PEW","label":"Sterling Order Management"},"Component":"","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"9.4,9.5","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
30 December 2018

UID

ibm10791933