e-commerce and retail

Loyalty Discount

This Decision Table uses a calculation column to compute discount based on loyalty class.

DecisionRules

David Škarka

Template author

This Decision Table is designed to determine the final price of a transaction and generate a corresponding customer message. It utilizes a specific calculation column to compute a percentage discount based on the customer's loyalty class, their accumulated credit, and the basic price of the item.

Solution Components
The logic relies on specific input data and pre-defined user variables to execute the rules:
  • Input Data:
    • Basic Price: The starting price of the item (basicPrice).
    • Loyalty Class: The customer's assigned tier, such as "REGULAR", "LOYALTY1", or "FIRST_VISIT" (customer.loyaltyClass).
    • Credit: A numeric score representing the customer's credit standing (customer.credit).
  • Rule Variables (configuration):
    • regularDiscount: Set to a value of 10.
    • loyaltyDiscount: Set to a value of 20.
    • specialDiscount: Set to a value of 40.
Decision Logic
The decision table evaluates rules top-down, segmented by price caps and loyalty tiers. 
Output Calculation
Once the discount percentage is determined by the logic, the Final Price (finalPrice) is computed, and the specific message (e.g., "You get 20% discount!") is generated.
Check iconA checkmark inside a circle signifying "yes"Minus iconA minus inside a circle signifying "no"PROS IconA plus symbol representing positive aspects or benefits.CONS IconA minus symbol representing negative aspects or drawbacks.

More Templates

See Other Templates

financial servicessuggested

A/B Testing

Discover a simple way to assign a test group for performing A/B Testing on your decisions.

Explore
financial servicessuggested

Risk Based Pricing

Discover a simple way to apply a suitable Risk Based Pricing matrix based on a type of client.

Explore
financial servicessuggested

Eligibility and Policy Rules

Discover a simple way to define and execute various sets of rules and get the final decision outcome.

Explore