Apply Price According to Minimum and Maximum Quantity
You can specify the minimum and maximum quantities that you want to use when calculating the price on an order line.
Assume you need to give a different discount for the AS54888 item according to the customer that you're selling to and the quantity on the order line.
Try it.
- Go to the Pricing Administration work area, then click Tasks > Manage Matrix Classes.
- On the Manage Matrix Classes page, in the Name column, click Pricing Term Adjustment.
- On the Edit Matrix Class page, in the Condition Columns area, set the
values.
Name Source Code Name Comparison Compare to Attribute Required Allow Null MinQuantity MinQuantity < Line.LineQuantity Contains a checkmark. Doesn't contain a checkmark. MaxQuantity MaxQuantity >= Line.LineQuantity Contains a checkmark. Doesn't contain a checkmark. where
Line
specifies the order line.LineQuantity
specifies to examine the runtime value of the Quantity attribute on the order line.MinQuantity < Line.LineQuantity
specifies to compare the MinQuantity that you set on the discount rule to the quantity on the order line. If MinQuantity on the rule is less than the quantity on the order line, then the rule evaluates to true, and Pricing applies the discount.MaxQuantity >= Line.LineQuantity
specifies to compare the MaxQuantity that you set on the discount rule to the quantity on the order line. If MaxQuantity is equal to or greater than the quantity on the order line, then the rule evaluates to true, and Pricing applies the discount.- Make
sure you set Compare to Attribute to
Line.LineQuantity
. You must use this value when you apply a pricing rule according to the quantity on the order line. Don't use any other value. - Don't modify the Domain attribute.
- Click Tasks > Manage Discount Lists, then search for and open Discount List for Standard Desktop. For this example, assume you already created this list and added the AS54888 item to the list. For details, see Manage Discount Lists.
- In the Discount Rules area, click Actions > Create > Attribute Based Rule.
- In the dialog that displays, select MinQuantity and MaxQuantity, then click Finish.
- In the dialog that displays, set the values, then click
OK.
Customer MinQuantity MaxQuantity Adjustment Type Adjustment Amount Computer Service and Rentals 0 5 Discount Percent 5 Vision Operations 0 20 Discount Percent 10 Here's how this works. Assume your user sets the customer to Computer Service and Rentals and the quantity to 2 on the order line at run time.
Design Time on Matrix Class Design Time on Rule Runtime Example MinQuantity is less than Line.LineQuantity. MinQuantity equals 0. LineQuantity equals 2, so the rule evaluates to true because 0 is less than 2. MaxQuantity is greater than or equal to Line.LineQuantity. MaxQuantity equals 5. LineQuantity equals 2, so the rule evaluates to true because 5 is greater than or equal to 2. - Test your set up. Go to the Order Management work area, create a sales order,
and verify:
- You give Computer Service and Rentals a 5% discount only when they order a quantity of 5 or less.
- You give Vision Operations a 10% discount only when they order a quantity of 20 or more.