The example that follows shows these structures in operation. Note that in the normal course of events you should not have to work directly with the PMDL unless creating new promotions templates (see Adding New Promotions Templates). Occasionally, however, a user creates a promotion in which the PMDL is invalid; in this case, the promotion cannot be edited in Oracle ATG Web Commerce Merchandising or in the ATG Control Center, but must be manually corrected or discarded.

This rule describes a promotion in which a customer buys up to five of a particular product (xprod2104) to receive $5 off. The customer can buy six of the same item and receive $10 off.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE pricing-model SYSTEM dynamosystemresource:/atg/dtds/pmdl/pmdl_1.0.dtd">
  <pricing-model>
    <qualifier/>
    <offer>
      <discount-structure calculator-type="bulk"
        discount-type="amountOff">

        <discount-detail>
          <attribute name="band" value="1"/>
          <attribute name="adjuster" value="5"/>
        </discount-detail>
        <discount-detail>
          <attribute name="band" value="6"/>
          <attribute name="adjuster" value="10"/>
        </discount-detail>

    <target>
      <iterator name="up-to-and-including" number="1"
        sort-by="priceInfo.listPrice" sort-order="ascending">
        <collection-name>items</collection-name>
        <element-name>item</element-name>
        <element-quantity-property>quantity
        </element-quantity-property>
        <comparator name="equals">
          <value>item.auxiliaryData.productId</value>
          <constant>
            <data-type>java.lang.String</data-type>
            <string-value>xprod2104</string-value>
          </constant>
        </comparator>
      </iterator>
    </target>
  </discount-structure>
</offer>
</pricing-model>