Promotions Import/Export

Use the promotion.xsd to specify an import/export file for both campaigns and promotions. For information about specific section of the import/export schema, see the following topics:

The top-level elements can be either, as follows:

<!-- top-level element -->
  <xsd:element name="promotions">
        <xsd:element name="campaign" type="Campaign" minOccurs="0" maxOccurs="unbounded" />
        <xsd:element name="promotion" type="Promotion" minOccurs="0" maxOccurs="unbounded" />

For importing mass data, use this structure:

<!-- fake element for mass data support -->
<xsd:element name="campaign" type="Campaign" />
<xsd:element name="promotion" type="Promotion" />


Campaign, a complex data type within the promotion.xsd, is primarily used to group promotions. They are also associated with customer groups. You can specify customer groups as within a promotion import/export file, or separately using the customergroup.xsd. The following is within the promotion.xsd:

<xsd:complexType name="CustomerGroups" mixed="false">
     <xsd:element name="customer-group" type="CustomerGroup" minOccurs="0" maxOccurs="unbounded" />
<xsd:complexType name="CustomerGroup" mixed="false">
    <xsd:attribute name="group-id" type="Generic.NonEmptyString.256" use="required" />

Promotion Classes

All promotion classes (product, order, shipping and bonus) share certain elements that are defined at the level of the promotion XML element (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, as follows:

<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" />

Excluded product rules are imported and exported with order promotions via the excluded-products element, as follows:

<!-- order promotions -->
<xsd:complexType name="OrderPromotionRule" mixed="false">
   <!-- new element-->
    <xsd:element name="excluded-products" type="ProductSpecification" minOccurs="0" maxOccurs="1" />
    <!-- end of new element-->

The qualifying-products element is supported for shipping and order promotions.

This is a sample of how an order promotions import/export XML would look:

<promotion campaign-id="Demo Campaign" promotion-id="OP_10_500">
  <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>
<!-- excluded product section -->
              <category-condition catalog-id="master-catalog">
<!-- end of excluded product section -->	
      <discounts condition-type="order-total">
Note: The non-qualifying-products element is deprecated. It is supported on import but not on export.
X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.