DBOrderPromo

The DBOrderPromo component, which usually appears in the Order Adjust Price stage of an order processing pipeline, runs a query to retrieve data about promotions from the database and then adjusts the item price accordingly.

Note

This component is used for compatibility with Commerce Server version 2.0 sites, in which the database connection is provided by the Content object in the Pipe Context. Commerce Server 3.0 sites should use the DBOrderPromoADO component.

This query must return at least the following database columns:

Remarks

An order promotion has three criteria: the customer criterion, a condition criterion, and an award criterion. If the customer does not match the customer criterion, the promotion is not applied. If the customer does match the customer criterion, then the other two criteria are applied to all the items in the order, producing two sets: the condition set (those matching the condition criterion) and the award set (those matching the award criterion).

For example, if the promotion is Buy $100 in hats, get a free pair of gloves, the condition set is all of the hats the customer bought, and the award set is the gloves the customer will receive for free. Often, the same item is in both sets.

The condition set must be of some minimum size ($100 in this example). This is given by two variables: cond_min (10000 in this case, because the value is given in cents) and cond_basis (P in this case, meaning that size is measured by price and not by quantity).

The award set is limited to a maximum size (one in the example); this size is always measured in quantity:

There are two types of discounts (specified by the value disc_type):

The preceding example has the values set as follows.

Field Value
cond_column _product_type
cond_op =
cond_value hat
award_column _product_type
award_op =
award_value gloves
shopper_column @
shopper_op @
shopper_value @
cond_min 10000
cond_basis P
award_max 1
disc_value 100
disc_type %

Note

A given product can be adjusted only once. For this reason, the order in which promotions are applied is important. For example, if you apply a query that returns two rows from a promotion table, only the first promotion will be applied.

Related Topic


© 1997-1998 Microsoft Corporation. All rights reserved.