How WebSphere Commerce selects the correct price from the OFFER database table

Offers for catalog entries are stored in the OFFER database table. When setting pricing for catalog entries, WebSphere Commerce uses specific criteria to find valid offers from the OFFER table and then select the correct price.

Offer evaluation and selection

To set the price for a catalog entry, WebSphere Commerce must first determine all the valid offers for each applicable price list. To be valid, the offer must meet the following criteria according to data in the OFFER table:
  • The offer must be published, that is, the PUBLISHED value must be 1.
  • The quantity of the catalog entry being purchased must be within the MINIMUMQUANTITY and MAXIMUMQUANTITY values for the offer.
  • The purchase date must be within the defined STARDATE and ENDDATE values for the offer.

If you load pricing data into WebSphere Commerce using the Data Load utility or SQL statements, it is possible to have more than one valid offer for a catalog entry. If there is more than one valid offer, WebSphere Commerce sets the price using the offer with the highest value in the PRECEDENCE column of the OFFER table. If multiple offers exist with that same highest precedence value, the offer with the lowest price is used.

Price rules and offer price selection

If your store uses price rules for storefront pricing, the price rule also retrieves offers from the OFFER table, but then the price rule might perform additional calculations on the offer price. Consider the following price rule: Example price rule

In this price rule, the Get Price from Price List action retrieves the offer from the OFFER table and then performs the mark down and rounding on the offer price. To evaluate and select the correct offer to retrieve from the OFFER table, WebSphere Commerce uses the same criteria described earlier in this topic.