As part of the process of defining the properties of a new promotion, you create a discount rule, which specifies the circumstances under which to apply the promotion.

Note: Discount rules are called Pricing Model Description Language (PMDL) rules in the Creating Promotions section of the Using and ExtendingPricing Services chapter in the ATG Commerce Programming Guide.

To create a discount rule, click the empty box in the Discount Rule property for this promotion in order to activate the box; then click the corresponding button that displays. The following image shows the location of the button:

When you click the button, the Discount Rule dialog box appears, as follows:

Discount rules contain two parts, as represented by the two fields in the dialog box:

  • A Condition statement, which defines when the discount applies, for example “Always” or “When order contains at least one (product named Shatterproof Helmet).”

  • An Apply Discount To statement, which specifies the target items to which you want to apply the discount, for example, “Apply discount to every (product in category named BMX Bikes).”

The default Condition is “Always.” The default Apply Discount To statement depends on the discount type. In the example shown above, the discount type is Item Discount - Percent Off, so the default is “Apply discount to all items.” If you leave this rule as it is, the system applies the discount to all items in the product catalog. The exact amount and type of the discount are specified by the Discount Type and Discount Price/Amount/Percentage/Multiplier properties.

For example, in the Pioneer Cycling Store, one of the sample promotions (called “10% off for members”) offers a 10% discount on any products to anyone who registers at the site. This promotion has its Discount Type and Discount Percentage properties set as follows:

  • Discount Type: Item Discount - Percent Off

  • Discount Percentage: 10

The rule for this promotion is the default rule shown above: “Always discount all items.” In combination with the other properties, the rule tells the system to give a 10% discount on all items. (For information on how to specify the people to whom the promotion applies, see Specifying the People Who Receive the Promotion.)

In most cases, however, you probably want to change the rule so that you narrow the set of circumstances under which the discount is applied. To change the rule, click its parts so that menus appear, and then select the items that define the rule as required.

If you use “and” in the “Apply Discount to” statement of a promotion, all of the conditions in the statement must be true for the discount to be applied. The use of “and” in the following example would cause problems as described below:

Apply discount to: up to 1 (product named Blue Shirt and product named
Green Shorts)

The discount is not applied to all products named “blue shirt” and all products named “green shorts.” The discount is only applied to items named both “blue shirt” and “green shorts.” Therefore, this discount target would never apply a discount because products only have one name.

The rest of this section describes more examples of various discount rules taken from the Pioneer Cycling Store.

Example 1: Discounting Items from a Specific Category

Condition:
Always
Apply discount to:
every (product in category named BMX Bikes)

This rule is taken from the “25% percent off BMX Bikes” sample promotion in the Pioneer Cycling Store. Key properties in this promotion are as follows:

In combination with these properties, the rule tells the system to apply a 25% discount to all products in the category called “BMX Bikes.”

Example 2: Discounting a Given Amount from a Total Order

Condition:
Always
Apply discount to:
Order Total

This rule is taken from the “20% off order” sample promotion. Key properties in this promotion are as follows:

In combination with these properties, the rule tells the system to apply a 20% discount to the customer’s total order.

Example 3: Offering a Promotion on Shipping

Condition:
When Order's priceInfo's amount is greater than 399.99
Apply discount to:
Shipping Group

This rule is taken from the “Free shipping for orders over $400” sample promotion. Other key properties in this promotion are as follows:

In combination with these properties, the rule tells the system to charge a fixed shipping price of $0 (in other words, to provide free shipping) to any orders over $399.99. Note that, in this example, the first parameter of the Condition statement is “When” rather than “Always.”

Example 4: Offering a Discount on One Product if a Customer Buys A Different Product

Condition:
When order contains at least 1 (product in category named Whole Bikes)
Apply discount to:
up to 1 (product in category named Helmets)

This rule is taken from the “40% off helmet with purchase of bike” sample promotion. Other key properties in this promotion are as follows:

In combination with these properties, the rule tells the system to offer a 40% discount on any helmet to customers who buy any bike.

Example 5: Offering a 2-for-1 Discount

Condition:
When Order contains at least 3 (product in category named Lights)
Apply discount to:
Up to 1 (product in category named Lights)

This rule is taken from the “Buy 2 lights get 1 free” sample promotion. Other key properties in this promotion are as follows:

In combination with these properties, the rule tells the system to give one free light to anyone who orders at least three lights.

Note: There are various ways to set up this type of promotion. In this example, a customer must order three items in order to get one for free; to make sure that the customer does in fact order three items, you could add a note explaining the process to the order form or to the promotion media itself. In addition, this example uses the structure “at least three,” which means that a customer would also receive one free light if he ordered, for example, five. For examples of other ways to set up this type of promotion, please refer to the Creating Promotions section of the Using and ExtendingPricing Services chapter in the ATG Commerce Programming Guide.

 
loading table of contents...