Promotion Classes
All promotion classes (product, order, shipping, and bonus) share certain elements that
are defined at the level of the promotion XML element and specified in
promotion.xsd
.
The differences between the main promotion classes (product, order, and shipping) are represented as an optional choice of promotion class specific rule elements.
<xsd:choice minOccurs="0" maxOccurs="1">
<xsd:element name="product-promotion-rule" type="ProductPromotionRule" />
<xsd:element name="shipping-promotion-rule" type="ShippingPromotionRule" />
<xsd:element name="order-promotion-rule" type="OrderPromotionRule" />
</xsd:choice>
Excluded product rules are imported and exported with order promotions
using the excluded-products
element.
<!-- order promotions -->
<xsd:complexType name="OrderPromotionRule" mixed="false">
<xsd:sequence>
<!-- new element-->
<xsd:element name="excluded-products" type="ProductSpecification" minOccurs="0" maxOccurs="1" />
<!-- end of new element-->
...
</xsd:sequence>
</xsd:complexType>
The qualifying-products
element is supported for shipping and order
promotions.
This is a sample of how an order promotions import and export XML appears:
<promotion campaign-id="Demo Campaign" promotion-id="OP_10_500">
<enabled-flag>true</enabled-flag>
<qualifiers>
<customer-groups/>
</qualifiers>
<exclusivity>class</exclusivity>
<name xml:lang="x-default">10% off orders $500 and up</name>
<callout-msg xml:lang="x-default">10% off orders $500 and up.</callout-msg>
<details xml:lang="x-default">10% off orders $500 and up.</details>
<order-promotion-rule>
<!-- excluded product section -->
<excluded-products>
<included-products>
<condition-group>
<category-condition catalog-id="mainproduct-catalog">
<category-id>GiftCerts</category-id>
</category-condition>
</condition-group>
</included-products>
</excluded-products>
<!-- end of excluded product section -->
<discounts condition-type="order-total">
<discount>
<threshold>500.0</threshold>
<percentage>10.0</percentage>
</discount>
</discounts>
</order-promotion-rule>
</promotion>
Note: The
non-qualifying-products
element is deprecated. It is supported on
import but not on export.