This promotion discounts an entire order when the shopper spends the specified amount in the specified collections.
The following example creates a promotion that discounts an order by 10% when the shopper spends $20 in the Summer Favorites collection, whose ID is cat60036.
{
"displayName":"Spend $20 in Summer Favorites Get Order Discount",
"description":"A sample spend y in x get order discount promotion",
"priceListGroups":["defaultPriceGroup"],
"enabled":true,
"priority":"1",
"startDate":"2016-03-10T00:00:00.000-05:00",
"endDate":"2116-03-30T00:00:00.000-05:00",
"templatePath": "order",
"templateName": "rawPmdlTemplate",
"templateValues":{"pmdl": {"xml": "<pricing-model><qualifier>
<quantifier name="at-least" number="20"><collection-name>items</collection-
name><element-name>item</element-name><aggregator name="spendAmount"
operation="total"/><comparator name="includes-any">
<value>item.auxiliaryData.productRef.ancestorCategoryIds</value>
<constant><data-type>java.util.Set</data-type><string-value>cat60036</string-
value></constant></comparator></quantifier></qualifier><offer>
<discount-structure calculator-type="standard" discount-type="percentOff"
adjuster="10"></discount-structure></offer></pricing-model>"}
}
}
