Concept - Promotion Conditions

1 Introduction

This article is meant to give a rough overview of promotion conditions. It is intended to discuss

  • What promotion conditions are,
  • Which different kinds of conditions have already been implemented,
  • How the given conditions are configured properly and
  • Which effect different condition configurations have.

For the implementation of a new condition, please refer to Cookbook - Promotions (valid to 7.7).

1.1 Background

The background for promotion conditions is the same as for promotion actions.

A promotion has (Discount/Rebate) rules - apart from other things. Each rule mainly consists of a condition and an action. Condition and action are configured in Commerce Management application by means of suitable webforms. If a rule's condition is fulfilled during basket calculation, then the related action is executed, i.e., a corresponding discount or rebate is granted - given that the surrounding promotion applies.

Assume a customer browses in a web shop. A condition is advertised to the customer via a message like 'FREE SHIPPING on LED-TVs', i.e., the condition is the presence of an LED-TV in basket. So the customer fulfills the condition and finds out the truth about the advertisement. That is all a customer has to know about conditions.

A marketing manager of an enterprise that has a web shop has to look at conditions from a configuration perspective. How to choose, configure and combine the conditions that are available in back office?

A software developer of the above enterprise has to know how to implement new conditions.

Conditions from a customer's perspective need no further explanation and from a developer's perspective are dealt with in Cookbook - Promotions (valid to 7.7). So, the present concept focuses on a marketing manager's view and primarily answers the question what kinds of conditions are available.

Note

The promotion framework allows to create more complex promotions coming with a set of rules like, e.g., if step 1 is fulfilled, discount 1 will be granted and if step 2 is fulfilled, discount 2 will be granted, and so on.

The calculation algorithm to apply a promotion evaluates the rules top down and always takes the first rule that matches. Left over rules will not be evaluated.

Note

It is not possible to configure one promotion with multiple actions like, e.g., providing an item percentage off discount and a free shipping discount by entering one promotion code.

To configure such multiple actions, multiple promotions need to be combined with each other.

1.2 References

2 Promotion Conditions Available

As described in Cookbook - Promotions (valid to 7.7), the implementation of each of our conditions comprises a specific PromotionConditionDescriptor and a specific PromotionConditionEvaluator. The descriptor contains all necessary attributes and methods to access, configure and evaluate a condition in the back office configuration scenario as well as in the storefront basket calculation and product advertising scenario. So, an instance of the evaluater is an essential attribute of the descriptor.

The PromotionConditionDescriptor as it currently is mainly allows for four different types of conditions:

  1. Time
  2. Customer
  3. Item
  4. Order

However, apart from admitting of a coarse classification of condition types, this distinction is only used in order to enable or disable the so-called condition type grouping. Condition type grouping means that different conditions of the same type, e.g., Item, can be created in back office within one condition creation step that begins with clicking New in the Promotion Condition section. These different conditions of the same type created in the afore-mentioned step are automatically AND combined without possibility to change this later on and they are displayed as one group or one condition.

At present the condition type grouping is enabled for the type Item only.

Look at the following picture that displays the effect of type grouping.

Two groups of conditions can be seen. The upper one (1) consists of separate conditions which are connected with a changeable operator. The lower item condition group uses type grouping (2): The group is displayed as a single item condition. Well, internally there are of course two separate item conditions that are AND connected, but due to the type grouping the operator cannot be changed in this group. The chart below shows that normal groups and type groups can be recognized by means of bold face operators (3) and a special TG operator (4), respectively.

2.1 Time Conditions

2.1.1 Activation Time Condition

The activation time condition allows to specify a sequence of time intervals. The condition is fulfilled if the promotion validation time is within one of the specified intervals. If the pre-configured values of a new activation time condition are not changed, the specified sequence of time intervals will simply be the time period between start and end date of the promotion. However, the main configuration parameters added by the ActivationTimeCondition descriptor are as follows.

  • DaysActive: type String
  • DayOfWeek: type Integer, constraint: value in {1, 2, ..., 7}
  • DayOfMonth: type Integer, constraint: value in {1, 2, ..., 31}
  • ConditionStartDate: type Date, constraint: value not before promotion start date
  • ConditionEndDate: type Date, constraint: value not after promotion end date
  • ConditionIntraDayStartTime: type Date
  • ConditionIntraDayEndTime: type Date

The values of ConditionStartDate and - EndDate restrict the condition's sequence of time intervals to the period between these values, and hence, are required. Both, the start and the end date parameter have two further fields:

  • for specifying a day and
  • for specifying a time.

Within the above global time frame of ConditionStartDate and - EndDate, ConditionIntraDayStartTime and - EndTime can be used to define an intra day time interval. Thus, in the global time frame the condition's sequence of time intervals can only consist of those intra day time intervals.

Finally, the required value of DaysActive is used to select days within the global time frame. Thus, the intra day time intervals of these days are part of the sequence of time intervals. The values of DaysActive can be as follows.

  • all: each day
  • dayofweek: each occurrence of the selected week day, specified by the value of DayOfWeek
  • dayofmonth: each occurence of the selected day of a month, specified by the value of DayOfMonth

2.2 Customer Conditions

Customer conditions are intended to be directly related to known properties of the current customer that browses in storefront.

2.2.1 Customer First Purchase Condition

The customer first purchase condition(descriptor: CustomerFirstPurchaseCondition) cannot be configured. The condition is fulfilled if a registered customer purchases something at the online shop for the first time.

2.2.2 Customer First Purchase per Month Condition

The customer first puchase per month condition(descriptor: CustomerFirstPurchasePerMonthCondition) cannot be configured either. The condition is fulfilled if a registered customer purchases something at the online shop for the first time in a month.

2.2.3 Customer First Purchase Since Date Condition

The customer first purchase since date condition(descriptor: CustomerFirstPurchaseSinceDateCondition) has the following required configuration parameter:

  • SinceDate: type Date

The condition is fulfilled if a registered customer purchases for the first time at the online shop since the date stored as value of configuration parameter SinceDate.

2.3 Item Conditions

Item conditions are meant to be directly related to known properties of the items in cart.

2.3.1 Item Inclusions and Exclusions Condition

The item inclusions and exclusions condition (descriptor: ItemInclusionsExclusionsCondition) allows to specify products and categories to be included or excluded.

Note

An item inclusion/exclusion condition always requires an inclusion. This may be a product inclusion or a category inclusion or both.

The following matrix shows the all conceivable configurations for this feature.

The column Validity and indicates whether the condition is true or false. Only a valid condition can trigger a promotion discount.

Included products

Included categories

Excluded products

Excluded categories

Validity

    NOT VALID
   xNOT VALID
  x NOT VALID
  xxNOT VALID
 

x

  VALID
 x xVALID
 xx VALID
 xxxVALID

x

   VALID
x  xVALID
x x VALID
x xxVALID
xx  VALID
xx xVALID
xxx VALID
xxxxVALID

x = Assignment

Note

Exclusion first, then inclusion! Application level exclusions are of course taken into account for condition evaluation.

2.3.2
Item Minimum Number Condition

The item minimum number condition(descriptor: ItemMinCountCondition) has a configuration parameter

  • MinCount

which is a positive integer. A subset of a basket fulfills the condition if the number of items in it is at least the value of MinCount.

2.3.3 Item Shipping Method Condition

The item shipping method condition(descriptor: ItemShippingMethodCondition) allows to specify a collection of shipping methods. The condition is fulfilled for a sub set of products in cart if one of those products is known to be shipped with one of the specified methods.

2.3.4 Item Shipping Region Condition

The item shipping region condition(descriptor: ItemShippingRegionCondition) allows to specify a collection of shipping regions. The condition is fulfilled for a sub set of products in cart if one of those products is known to be shipped into one of the specified regions.

2.3.5 Item Minimum Price Condition

The item minimum price condition(descriptor: ItemMinPriceCondition) allows to specify a lower price bound. The condition is fulfilled for a sub set of products in cart if one of those products has a price that is above the specified lower price bound. Depending on what is the level on which the promotion is defined to take effect, either base products or discounted products, the lower price bound is compared with the product's base prices or with the prices that result from previous discount appliences.

2.3.6 Item Minimum Purchase Amount Condition

The item minimum purchase amount condition(descriptor: ItemMinPurchaseAmountCondition) allows to specify a money value lower bound. For condition evaluation two cases have to be distinguished: Promotion's effect level is

  1. base price: The condition is fulfilled if the total basic purchase amount of all filtered products in cart, where for the filtering item inclusions and exclusions are taken into account, is above the specified lower bound money value.
  2. discounted price: Instead of basic purchase amounts only discounted purchase amounts are summed up and compared with the lower bound.

2.4 Order Conditions

Order conditions are related to properties of the order as a whole.

2.4.1 Order Minimum Value Condition

The order minimum value condition(descriptor: OrderMinValueCondition) is similar to the item minimum purchase amount condition. It also allows to specify a money value lower bound that is compared with some total purchase amount during condition evaluation. However, the difference here is that item level inclusions and exclusions aren't taken into account. Only the application level product and category exclusions are respected unless the rule is set to override the application level exclusions.

2.4.2 Order Minimum Number of Products Condition

The order minimum number of products condition(descriptor: OrderMinNumberOfProductsCondition) allows to specify a lower bound number. The condition is fulfilled for an order if the total number of all products in basket is not less than the lower bound number.

2.4.3 Order Shipping Method Condition

The order shipping method condition(descriptor: OrderShippingMethodCondition) allows to specify a collection of shipping methods. The condition is fulfilled for an order if one of the products in cart will be shipped with one of the specified methods.

2.4.4 Order Shipping Region Condition

The order shipping region condition(descriptor: OrderShippingRegionCondition) allows to specify a collection of shipping regions. The condition is fulfilled for an order if one of the products in cart will be shipped into one of the specified regions.

2.4.5 Payment Method Condition

The payment method condition(descriptor: PaymentMethodCondition) allows to specify a collection of payment methods. The condition is fulfilled if the payment method of an order is in the specified set of payment methods.

Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Support Tickets