Shipping Promotions Import/Export

The import/export format for shipping promotions is similar to that of order promotions. The major difference is that shipping promotions let you define discounted shipping methods. This sample XML shows a tiered shipping promotion granting a 50% or 100% discount on selected shipping methods provided the qualifying products total exceeds $50 or $100 respectively.

<promotion promotion-id="tiered-shipping-promo" campaign-id="c1">
  <enabled-flag>true</enabled-flag>
  <name xml:lang="x-default">Tiered ShippingPromotion</name>
  <shipping-promotion-rule>
    <shipping-methods>
      <method-id>ups-ground</method-id>
      <method-id>ups-air</method-id>
    </shipping-methods>
    <discounts condition-type="shipment-total">
      <discount>
       <threshold>50</threshold>
       <percentage>50</percentage>
      </discount>
      <discount>
       <threshold>100</threshold>
       <fixed-price>0</fixed-price>
      </discount>
    </discounts>
  </shipping-promotion-rule>
</promotion>

The promotion in the above example has a condition-type of "shipment-total". Alternatively a shipping promotion might specify a condition-type of "product-quantity". Such promotions require that a certain quantity of qualifying products be in the shipment in order for the discount to apply. The XML for this type of promotion will include a <qualifying-products> section before the <discounted-methods>.

In general, a shipping promotion with a condition-type of "product-quantity" requires that a specified number of qualifying products and no excluded products be in the shipment. However, whether or not a shipping promotions permits or prohibits excluded products is configurable. The optional element <prohibit-excluded-products> which accepts values of true or false can be included in the promotion XML to control this behavior. If the element is omitted for a newly imported promotion, excluded products are prohibited.

See the schema promotion.xsd for details.