Rule-based promotion assets

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

High level rule-based promotion diagram
Store default currency
This currency is the default currency for the store as defined in the STOREENT table. Rule-based promotions are defined in this currency, but can be evaluated on demand, by using any currency that is supported by the store.
Calculation code

A promotion is represented in the calculation framework by a promotion calculation code. A promotion calculation code indicates how the promotion 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 that are defined within that store entity are also deleted.

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

The promotion 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, promotion calculation codes that are 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 object is the parent object for rule-based promotions. While RLPromotion is the object type name, it can be understood that it corresponds to a rule-based promotion. Each rule-based promotion has a name, various descriptions which display in different circumstances, a priority, a target customer segment, and an execution schedule that governs both dates and times.

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

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

RLProduct level promotion
These objects represent product level rule-based promotions. 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 promotions. 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 promotions since they can be ordered separately, with their own catEntryID and price. Bundles and dynamic kits are not targetable by rule-based promotions.
RLOrder level promotion
These objects represent order level rule-based promotions. This representation is a derivative of the RLPromotion. This class requires an additional attribute, inCombineWithProductLevelDiscount, which determines whether the order level promotion can be applied at the same time as a product level promotion.
Order level shipping promotion
This class is derived from the RLOrder level promotion class. This class requires more attributes which define the shipping method to use, and the discounted rate.
Promotion
These objects represent incentives that are offered to customers to entice them to make a purchase.
Promotion Execution Record
A class that is used by the promotion engine. Each instance of this class represents a promotion that is being applied to an order once.
Line Item
This class represents 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 that a customer makes 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 that are selected by a customer for purchase.
Promotion Context
These objects are used exclusively by the promotion engine to track 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 that are 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 are 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.