ATG Commerce pricing services are based on the behavior of two complementary elements: pricing engines and pricing calculators, which work together to determine prices for catalog items, total orders, sales tax, and shipping.
Pricing engines are responsible for three tasks:
Retrieving any promotions that are available to the site visitor.
Determining which calculators generate the price.
Invoking the calculators in the correct order.
Pricing calculators are responsible for the following:
Looking up the price in the catalog by
priceList
.Invoking a qualifier service that identifies the objects to discount. (Refer to the Qualifier Class section for more information.)
Using information they receive from the engines and from the qualifier service to perform the actual process of determining prices.
By default, ATG Commerce can perform dynamic pricing for the following types of pricing object:
Items. Each item has a list price that can be specified in the
listPrice
property of the Product Catalog repository. ATG Commerce pricing services adapt the list price by applying any discounts or other promotions that you have set up. For example, you might set up a “2-for-1” sale for a limited period on a specific type of item. (Note that an “item” is aCommerceItem
, which represents a quantity of a SKU or a product).Orders. ATG Commerce pricing services calculate the total cost of an order and can apply any discounts that are applicable (for example, a customer might have a coupon offering a 10% discount on a total order.
Shipping price. ATG Commerce pricing services can calculate the price of shipping for an order and apply discounts if applicable.
Tax. ATG Commerce pricing services can calculate the sales tax for an order.
ATG Commerce uses the same basic structure for pricing each type of object described above. The structure includes the following:
A pricing engine
One or more calculators
A helper method in the qualifier service
An item-descriptor in the Promotions repository.
For example, the structure for pricing and discounting catalog items includes the following:
An Item Pricing Engine
An Item List Price Calculator, an Item Sale Price Calculator, and an Item Discount Calculator
The
findQualifyingItems
call inatg.commerce.pricing.Qualifier
The
Item Discount
item-descriptor in the repository/atg/commerce/pricing/Promotions
.
Note: The structure for determining sales tax is slightly different because ATG Commerce does not support offering discounts on tax. For this reason, there is no item-descriptor for tax discounts in the default Promotions repository. You could add such an item item-descriptor if necessary.