*** Video quality may vary based on your internet connection. For the best experience, select 1080p in the video settings to play in HD if available.
*** Video quality may vary based on your internet connection. For the best experience, select 1080p in the video settings to play in HD if available.
Combine Rules
Combination Methods: Define how rules are combined.
Additive: Discounts are added together (e.g., 10% Early Bird + 20% Stay/Pay = 30% total discount).
Sequential: Discounts are applied one after the other (e.g., apply the 10% Early Bird discount first, then apply the 20% Stay/Pay discount to the already discounted price).
Best Value: The system selects the combination of rules that provides the customer with the greatest discount.
Exclusion Rules: Implement the ability to create rules that exclude each other. For example, a "Holiday Discount" might exclude an "Early Bird" discount.
Condition Matching and Rule Application:
Comprehensive Condition Evaluation: The system must accurately evaluate all conditions associated with each rule. This includes date ranges, room types, booking durations, and advance booking windows.
Multiple Rule Triggering: When a booking meets the conditions of multiple rules, the system should identify all applicable rules.
Dynamic Calculation: The system must dynamically calculate the final booking price based on the selected combination method and the applicable rules.
Example Scenario (Stay 4 Pay 3 + Early Bird):
Booking Details: A customer books a 5-night stay 30 days in advance.
Rule Matching:
"Stay 4 Pay 3" rule: The booking meets the 4-night minimum stay requirement.
"Early Bird" rule: The booking is made 30 days in advance.
Rule Combination:
If the combination method is additive, the customer receives both the "Stay 4 Pay 3" discount and the "Early Bird" discount.
If sequential, the 4th night is removed, then the early bird discount is applied to the remaining 4 nights.
Final Price Calculation: The system calculates the final price based on the combined discounts.
Technical Implementation:
Rule Engine: The core of the combined rule logic is a robust rule engine that can efficiently evaluate conditions and apply rules.
Database Design: The database must be designed to store rule parameters, priority levels, combination methods, and exclusion rules.
API Integration: Provide an API that allows external systems to retrieve and validate combined rule settings.