Modeling the runtime promotion XML
You can model the runtime promotion XML for your new promotion type to identify the data that must be managed for your custom promotion type. The data you identity as required information is used in subsequent promotion customization tasks to help create your promotion type.
Before you begin
About this task
Most customized promotion types focus on customizing the <PurchaseCondition> element. The purchase condition defines what customers must have in their shopping cart before they qualify for a promotion, as well as the reward. Business users enter data for a specific promotion in the Purchase Condition and Reward section of the user interface.
Procedure
Example
- Buy catalog entry X, get a percentage off catalog entry Y
- Customers who purchase two dining chairs (FULO-01) qualify to purchase a dining table (FULO-02) at the reduced price of $200
Your model of the <PurchaseCondition> element in the runtime promotion XML looks like the following sample:
<PurchaseCondition impl="com.ibm.commerce.marketing.promotion.condition.PurchaseCondition">
<Pattern impl="com.ibm.commerce.marketing.promotion.condition.Pattern">
<Constraint impl="com.ibm.commerce.marketing.promotion.condition.Constraint">
<WeightedRange impl="com.ibm.commerce.marketing.promotion.condition.WeightedRange">
<LowerBound>2</LowerBound>
<UpperBound>2</UpperBound>
<Weight>1</Weight>
</WeightedRange>
<FilterChain impl="com.ibm.commerce.marketing.promotion.condition.FilterChain">
<Filter impl="com.ibm.commerce.marketing.promotion.condition.MultiSKUFilter">
<IncludeCatEntryKey>
<CatalogEntryKey>
<SKU>FULO-01</SKU>
<DN>ou=b2c,o=seller organization,o=root organization</DN>
</CatalogEntryKey>
</IncludeCatEntryKey>
</Filter>
</FilterChain>
</Constraint>
<Constraint impl="com.ibm.commerce.marketing.promotion.condition.Constraint">
<WeightedRange impl="com.ibm.commerce.marketing.promotion.condition.WeightedRange">
<LowerBound>1</LowerBound>
<UpperBound>1</UpperBound>
<Weight>1</Weight>
</WeightedRange>
<FilterChain impl="com.ibm.commerce.marketing.promotion.condition.FilterChain">
<Filter impl="com.ibm.commerce.marketing.promotion.condition.MultiSKUFilter">
<IncludeCatEntryKey>
<CatalogEntryKey>
<SKU>FULO-02</SKU>
<DN>ou=b2c,o=seller organization,o=root organization</DN>
</CatalogEntryKey>
</IncludeCatEntryKey>
</Filter>
</FilterChain>
</Constraint>
</Pattern>
<Distribution impl="com.ibm.commerce.marketing.promotion.reward.Distribution">
<Type>Volume</Type>
<Base>Quantity</Base>
<Currency>USD</Currency>
<Range impl="com.ibm.commerce.marketing.promotion.reward.DistributionRange">
<UpperBound>-1</UpperBound>
<LowerBound>1</LowerBound>
<UpperBoundIncluded>false</UpperBoundIncluded>
<LowerBoundIncluded>true</LowerBoundIncluded>
<RewardChoice>
<Reward impl="com.ibm.commerce.marketing.promotion.reward.DefaultReward">
<AdjustmentFunction impl="com.ibm.commerce.marketing.promotion.reward.AdjustmentFunction">
<FilterChain impl="com.ibm.commerce.marketing.promotion.condition.FilterChain">
<Filter impl="com.ibm.commerce.marketing.promotion.condition.MultiSKUFilter">
<IncludeCatEntryKey>
<CatalogEntryKey>
<SKU>FULO-02</SKU>
<DN>ou=b2c,o=seller organization,o=root organization</DN>
</CatalogEntryKey>
</IncludeCatEntryKey>
</Filter>
</FilterChain>
<Adjustment impl="com.ibm.commerce.marketing.promotion.reward.FixedCostAdjustment">
<FixedCost>200</FixedCost >
<Currency>USD</Currency>
<AdjustmentType>IndividualAffectedItems</AdjustmentType>
</Adjustment>
</AdjustmentFunction>
</Reward>
</RewardChoice>
</Range>
<PatternFilter impl="com.ibm.commerce.marketing.promotion.condition.DummyPatternFilter" />
</Distribution>
</PurchaseCondition>