Oracle ATG Web Commerce pricing services are based on two complementary elements: pricing engines and pricing calculators. These components work together to determine prices for orders, sales tax, and shipping.

Pricing engines are responsible for these tasks:

Pricing calculators are responsible for the following:

The following overview describes the way Commerce calculates prices.

Note: If your promotions were generated using Oracle ATG Web Commerce 9.1 or earlier versions, see the documentation for that version; the pricing process treats promotions differently depending on the version of Commerce used to create them.

Before pricing happens, the following steps take place:

The result is that PricingModelHolder has a merged list of global and active promotions for each pricing engine. When the customer performs an action that prompts a pricing operation, such as adding an item to their cart, the following steps are performed:

  1. The business layer logic (such as a PriceItem servlet bean in a page) invokes a pricing engine (see The Base Pricing Engine).

  2. The pricing operation invokes PricingTools which then gets the PricingModelHolder for that customer.

  3. PricingTools gets the promotions from the PricingModelHolder and calls the pricing engine’s priceItems method, passing in the promotions as a list.

  4. The pricing engine applies its configured precalculators in the order in which they appear in its preCalculators property. A precalculator modifies a price without using any associated promotions. For example, a site could use a list price precalculator or an order subtotal precalculator to establish a base price to which subsequent calculators then apply a discount.

    Each type of engine calls its corresponding type of precalculator – for example, the OrderPricingEngineImpl calls OrderPricingCalculators and the TaxPricingEngineImpl calls TaxPricingCalculators.

  5. The pricing engine then takes the promotions list that was passed in and can again veto promotions from that list. The remaining promotions are sorted by priority and then evaluated.

    Each promotion contains a PMDL rule that describes the discount. For example, a rule might define a discount in which a customer buys one item and receives a second for free. The PMDL specifies the calculator type to use to determine the amount of the discount in the calculator-type attribute of the discount-structure element. The calculator type maps to a calculator component in the calculatorTypeCalculators map.

    For each available promotion, Commerce does the following:

  6. The pricing engine applies its configured PostCalculators, which make any necessary modifications to the price after discounts have been applied. Each pricing engine calls postcalculators of its own type.

  7. The pricing engine returns an updated PriceInfo object.

This process is repeated every time a price is requested. Price requests are resource-intensive, and should be performed only when necessary.

Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices