Rule-based discount assets

The following diagram illustrates the rule-based discount structure in the WebSphere Commerce Server.

Store default currency

This is the default currency for the store as defined in the STOREENT table. Rule-based discounts are defined in this currency, but may be evaluated on demand, using any currency supported by the store.

Calculation code

A discount is represented in the calculation framework by a discount calculation code. A discount calculation code indicates how the discount is calculated for order items by the corresponding calculation rule.

A calculation code belongs to a store entity. Multiple calculation codes can be defined within a store entity. If the store entity is deleted, the calculation codes defined within that store entity are also deleted.

Each discount calculation code can have a start date and an end date, which define the time period in which the discount is effective. The discount calculation code can also be associated with one or more member groups, which define the eligible member groups.

The discount calculation code can be attached to one or more catalog entries, and catalog groups. Attaching a calculation code to a catalog group has the same effect as attaching it to all the catalog entries directly in the catalog group. However, discount calculation codes attached to catalog group A are not attached to products and items in catalog group B if catalog group A contains catalog group B.

RLPromotion

This is the parent object for rule-based discounts. While RLPromotion is the object type name, it should be understood that it corresponds to a rule-based discount. Each rule-based discount has a name, various descriptions which display in different circumstances, a priority, a target customer segment, and an execution schedule governing both dates and times.

The priority attribute should be further clarified. The priority attribute exists to help resolve conflicts when there are multiple discounts that can be applied concurrently. Applicable discounts are applied in the order defined by their respective priority values, in descending order. That is, the discount with the highest priority value is applied first.

All of the child objects further categorize the rule-based discount types, and introduce values specific to the discount type where required. Each of these objects also contains the appropriate logic to manipulate the domain XML file, which defines the discount.

RLProduct level promotion

These objects represent product level rule-based discounts. This class is derived from the RLPromotion class. This class requires an additional attribute, SKU, which identifies the target product.

RLItem level promotion

These objects represent item level rule-based discounts. This class is derived from the RLPromotion class. This class requires an additional attribute, catEntryID, which identifies the target product. These item level promotions are also used to target prebuilt kits with rule-based discounts since they are separately orderable, with their own catEntryID and price. Bundles and dynamic kits are not targetable by rule-based discounts.

RLOrder level promotion

These objects represent order level rule-based discounts. This is a derivative of the RLPromotion. This class requires an additional attribute, inCombineWithProductLevelDiscount, which determines whether the order level discount can be applied at the same time as a product level promotion.

Order level shipping discount

This class is derived from the RLOrder level promotion class. This class requires additional attributes which define the shipping method to use, and the discounted rate.

Promotion

These objects represent incentives offered to customers in order to entice them to make a purchase.

Promotion Execution Record

A class used by the promotion engine. Each instance of this class represents a promotion being applied to an order once.

Line Item

This class represents the an order item to the promotion engine. Each line item is either an order item or a portion of an order item.

Order Item

Order items are the individual products or items that make up an order.

Promotion Adjustment

This class represents changes to an order as the result of applying a particular promotion to that order.

Target Condition

Conditions that specify which customer segments are targeted or excluded by a promotion.

Purchase Condition

This class defines the purchases a customer has to make in order to qualify for a promotion.

Promotion Schedule

This class represents the time periods during which a promotion is available.

Order

Orders represent the list of products selected by a customer for purchase.

Promotion Context

These objects are used exclusively by the promotion engine to keep track of information related to a call to the promotion engine.

Promotion Execution Agenda

A list of promotions that potentially require evaluation. An agenda is passed with every call to the promotion engine.

Promotion Policy

Promotion policies represent business rules which govern the application of promotions to an order.

Promotion Group

A grouping mechanism with which promotions and promotion policies are associated.

Promotion Engine

This class evaluates the promotions applicable to an order, and computes the results of applying the corresponding adjustments.

Order Factory

This class converts a WebSphere Commerce Order object into an object that can be interpreted by the promotion engine.

Promotion Code Manager

This class manages promotion codes associated with an order.

Catalog Entry Factory

This class converts a WebSphere Commerce Catalog Entry object into an object that can be interpreted by the promotion engine

Promotion Execution Agenda Builder

This class builds a PromotionExecutionAgenda. An agenda is passed with every call to the promotion engine.

Coupon Manager

The class that manages coupons.

Sequence Builder

This class sorts promotions in the PromotionExecutionAgenda to determine the order in which these promotions should be evaluated and applied.

Order Item Factory

This class converts a WebSphere Commerce Order Item object into an object that can be interpreted by the promotion engine.

Customer Factory

This class converts a WebSphere Commerce User object into an object that can be interpreted by the promotion engine.

Customer Profile Factory

This class converts a WebSphere Commerce Member Group object into an object that can be interpreted by the promotion engine.

Related concepts