Develop > Presentation layer > Customize promotions > Promotion engine customization > Customization scenarios > Overview of creating a new promotion type using existing promotion elements > Custom promotion types

Custom conditions

Custom conditions can be created and used to build a promotion. A custom condition must implement the interface, which is a subclass of XMLizable. Here is the definition of this interface:

import; import*; 
public interface Condition extends XMLizable {

     * IBM copyright notice field.
    public static final String COPYRIGHT =
    boolean evaluate(PromotionContext context)
       throws PromotionConditionEvaluationException; }

The evaluate method is expected to return either true or false. If true, the condition is considered satisfied. If false, the condition is considered not satisfied and the promotion to which this custom condition belongs will not be applied.

All custom conditions must be thread safe and re-entrant.

Related reference

Custom promotion types