Case Study
Building a High-Performance Decision Engine for Complex Culinary Entitlements at Fortune 500 Scale
Executive Summary
A Fortune 500 company operating a high-volume consumer entertainment environment required a flexible, high-performance rules and decision engine capable of evaluating culinary entitlements across millions of transactions.
The challenge extended far beyond conventional coupon processing. The organization needed to support dining plans, one-time coupons, time-based free items, percentage and fixed-value discounts, BOGO offers, promotional entitlements, and future benefit structures that had not yet been defined.
Complicating the problem further, multiple entitlements could apply to the same transaction. The order in which those entitlements were evaluated and consumed could materially change the outcome for both the guest and the business.
To address these requirements, a generalized culinary entitlement decision engine was developed around a simple architectural principle:
Coupons, discounts, dining plans, BOGOs, stored value, and promotional benefits are all forms of tender.
Rather than embedding every business rule into a monolithic register system, the architecture models each entitlement as an independently defined tender capable of evaluating individual items, an entire order, or both.
The resulting C++ engine provides a highly extensible decision framework capable of executing sophisticated entitlement strategies while maintaining the performance required for transaction processing at Fortune 500 scale.
A similar generalized implementation of this architectural approach is available through the open-source Pinion Register Engine.
Organizational Context
The organization operates a large-scale culinary and retail environment processing millions of consumer transactions.
Its entitlement ecosystem includes combinations of:
Dining plans
Meal entitlements
One-time coupons
Percentage discounts
Fixed-value discounts
Buy-one-get-one promotions
Complimentary items
Time-sensitive benefits
Product-specific entitlements
Order-level promotions
Stored-value and cash-like tenders
Promotional programs with specialized eligibility rules
These benefits may coexist within the same transaction.
As the number and complexity of entitlement programs increased, conventional conditional logic became progressively more difficult to maintain. A solution designed around individual promotion types would inevitably accumulate special cases and become increasingly resistant to change.
The organization instead required a generalized decision engine capable of representing both existing and future entitlement structures without redesigning the underlying transaction engine.
Problem Statement
A dining entitlement is not necessarily a simple discount.
An entitlement may provide a free entrée during a particular time window. Another may provide a percentage discount against qualifying items. A dining plan may permit specific categories of products at predetermined intervals. A BOGO promotion may depend upon relationships between multiple items within the same transaction.
Each program can introduce different rules governing:
Item eligibility
Transaction eligibility
Time and date restrictions
Usage frequency
Quantity
Product categories
Discountability
Monetary value
Redemption limits
Interactions with other entitlements
Hard-coding each permutation directly into the transaction system would produce a continuously expanding matrix of conditional logic.
The architecture therefore needed to support new entitlement types without requiring the core engine to understand them.
Decision Ordering
Determining whether an entitlement can be applied is only part of the problem.
When multiple entitlements are available, the order in which they are applied can change the economic result of the transaction.
Consider a transaction where a guest possesses a free-item entitlement, a percentage discount, and a fixed-value coupon. Applying those benefits in different sequences can produce different amounts due and consume different benefits from the guest's account.
Different business scenarios may therefore require different optimization objectives.
The system may need to:
Maximize total guest savings
Preserve higher-value entitlements for future use
Minimize the amount deducted from a dining plan
Maximize the value obtained from an entitlement
Apply benefits according to explicit business priority
Follow deterministic first-in-order processing
The engine therefore could not impose a single universal definition of the "best" transaction.
It needed to separate entitlement eligibility from entitlement optimization.
Transaction-Scale Performance
Entitlement decisions occur directly within the transaction path.
The engine therefore cannot behave like a traditional heavyweight business-rules platform where latency is secondary to flexibility. Evaluation must occur rapidly enough to support high-throughput transaction processing without becoming a material bottleneck.
At millions of transactions, even small amounts of unnecessary computation accumulate into significant infrastructure and latency costs.
Performance was consequently treated as an architectural requirement rather than a later optimization.
Solution Architecture
Design Principle: Everything Is a Tender
The central abstraction of the system is intentionally simple:
If something contributes value toward a transaction, it can be represented as a tender.
Under this model, cash, coupons, discounts, dining plans, complimentary items, BOGOs, and promotional benefits become implementations of the same broader concept.
The decision engine does not need a hard-coded registry containing every possible entitlement.
Instead, individual tender implementations define their own rules and communicate whether an application should be accepted, rejected, or considered not applicable.
This inversion of responsibility allows business-specific behavior to evolve independently from the engine responsible for executing it.
Tender Flexibility
Entitlements can operate at different scopes.
An item-level tender evaluates individual order lines. This is appropriate for rules such as:
Free qualifying item
Category-specific discounts
Product-specific coupons
BOGO relationships
Item-level dining-plan benefits
An order-level tender evaluates the transaction as a whole. This supports scenarios such as:
Percentage discounts
Transaction-level coupons
Spending-threshold promotions
Whole-order benefits
A tender can also support both models simultaneously.
The core engine therefore remains unchanged whether the organization introduces a simple coupon or a substantially more sophisticated dining entitlement.
Item Adaptability
Enterprise transaction systems rarely share identical item models.
Products may contain organization-specific information such as category, location, revenue center, discountability, entitlement classifications, modifiers, menu relationships, or other domain-specific attributes.
Requiring every application to translate those models into a rigid engine-specific product schema would introduce unnecessary mapping, allocations, and maintenance.
The engine instead allows existing item models to be templated directly into tender implementations.
Business logic can consequently operate against the application's actual domain model while the underlying engine remains generic.
This maintains separation between:
Transaction Engine → Entitlement Logic → Organization-Specific Item Model
without forcing the core engine to understand every property used by the business.
Algorithmic Decision Modes
The engine separates the definition of a tender from the strategy used to apply multiple tenders.
This distinction is critical.
A tender answers:
"Can I apply to this item or transaction, and what value do I provide?"
The engine answers:
"Given the available tenders, how should they be applied?"
Multiple algorithmic modes can therefore evaluate the same collection of entitlements according to different objectives.
When no optimization strategy is selected, the engine remains intentionally unopinionated. Applications can establish their own priority simply through deterministic tender ordering.
This allows the same engine to support both highly optimized decision making and strict business-defined sequencing.
Deterministic Results
Transaction processing requires explainability.
Given the same items, tenders, rules, and execution strategy, the engine should produce the same result.
This is particularly important when entitlement consumption affects downstream systems such as:
Point-of-sale transactions
Guest accounts
Dining-plan balances
Financial reporting
Revenue allocation
Transaction auditing
Customer-service investigations
Rather than returning only a final monetary amount, the resulting order model preserves the relationship between the engine's decisions and the original transaction items.
This makes the decision process easier to integrate, inspect, test, and audit.
C++ Performance
The engine was implemented in C++ to prioritize deterministic, low-overhead execution within a transaction-critical workload.
The architecture emphasizes lightweight in-process evaluation rather than introducing network calls or heavyweight external rule-processing infrastructure into the core decision path.
This provides several advantages:
Low execution overhead
Efficient memory utilization
Predictable runtime characteristics
Native-code performance
Suitability for high-throughput transaction processing
For an engine expected to participate in millions of transactions, performance is part of the domain requirement.
The objective is not simply to determine the correct entitlement outcome.
It is to determine that outcome quickly enough that increasingly sophisticated business rules do not compromise the transaction experience.
Results
The architecture transformed culinary entitlement processing from a collection of promotion-specific rules into a generalized decision system.
Entitlement Adaptability
The tender abstraction provides a common framework for implementing fundamentally different benefit structures.
New programs can introduce specialized eligibility and redemption logic without requiring corresponding changes to the core engine.
This reduces the architectural impact of launching new culinary products and promotional programs.
Decision Optimization
By separating tender behavior from tender application strategy, the organization can optimize entitlement processing according to the objective appropriate for a particular business scenario.
The same underlying entitlements can be evaluated differently when the desired outcome changes.
This enables strategies designed around guest value, entitlement conservation, business-defined priority, or other optimization objectives without duplicating the underlying entitlement logic.
Transaction Performance
Native C++ execution provides the performance characteristics necessary for high-volume, transaction-critical processing.
Entitlement evaluation can remain within the transaction path while supporting complex decision logic across millions of transactions.
Reduced Core-System Coupling
New entitlement types do not need to become permanent concepts within the core transaction engine.
Instead:
The engine understands how to evaluate tenders.
The tender understands the business rule.
This boundary substantially reduces coupling between promotional programs and transaction infrastructure.
Improved Testability
Individual entitlement implementations can be tested independently from the overall transaction system.
The decision engine can likewise be tested against combinations of tenders and items to validate ordering, optimization, rejection, eligibility, and edge-case behavior.
This separation creates a more manageable verification surface for a financially consequential system.
Analysis
The scalability of the system is attributable primarily to several architectural decisions.
Generalization Over Specialization
The engine does not contain separate architectural concepts for coupons, dining plans, BOGOs, discounts, and complimentary products.
They are generalized into tenders.
This prevents each new business program from increasing the conceptual complexity of the engine itself.
Policy and Mechanism Are Separated
Entitlement implementations define policy: what qualifies and what value should be provided.
The engine provides mechanism: how eligible tenders are evaluated and applied to a transaction.
Optimization algorithms provide another independent policy layer governing which combination or sequence of valid decisions should be preferred.
This separation allows each component to evolve independently.
Optimization Is a First-Class Requirement
Tender ordering is not merely an implementation detail.
When multiple benefits interact, ordering becomes an optimization problem with measurable financial consequences.
Treating optimization strategy as an explicit engine capability makes those decisions intentional, testable, and adaptable rather than incidental consequences of procedural code.
Extensibility Occurs at the Boundary
The core engine does not need advance knowledge of every future culinary program.
Instead, extensibility occurs through the tender interface.
This follows the Open/Closed Principle: the system can be extended with new entitlement behavior while minimizing modification of the stable execution engine.
Performance Was Designed In
A transaction engine operating at enterprise scale cannot rely upon flexibility at the expense of latency.
Using a compact native engine allows sophisticated entitlement processing to remain computationally inexpensive enough for high-volume transaction workloads.
Rather than attempting to optimize a heavyweight rules platform after implementation, performance was established as a fundamental architectural constraint.
Open-Source Lineage: Pinion
A generalized version of the architectural concepts behind this approach is available publicly as Pinion, an open-source enterprise register engine.
Pinion demonstrates the same core principles:
User-defined tender types
Item-level tenders
Order-level tenders
Tenders capable of operating at both scopes
Custom item-model integration
Algorithmic tender application modes
User-controlled prioritization
A simple execution model
The open-source project demonstrates how a relatively small set of abstractions can represent a wide range of transaction and entitlement scenarios without requiring the engine to understand every business-specific promotion.
Lessons Learned
1. Entitlements Are Better Modeled as Behavior Than Data
An entitlement is not simply a record containing a discount amount.
Real-world entitlements contain eligibility, applicability, valuation, timing, and interaction rules. Modeling them as executable tender behavior provides substantially greater flexibility.
2. The Engine Should Not Know Every Business Rule
When the core engine must explicitly recognize every promotion type, every new promotion becomes an engine change.
A stable engine should understand the contract through which rules participate, not every rule that will ever exist.
3. Application Order Is a Business Decision
When entitlements interact, sequencing has financial consequences.
The desired ordering strategy should therefore be explicit rather than emerging accidentally from implementation details.
4. Optimization Objectives Can Change
There is no universally correct definition of the best entitlement outcome.
One use case may prioritize maximum guest savings while another preserves scarce entitlements or follows strict contractual ordering.
The architecture should permit optimization strategy to change without rewriting entitlement rules.
5. Performance and Flexibility Are Not Mutually Exclusive
Highly adaptable rule systems are often associated with heavyweight runtime infrastructure.
A carefully constrained abstraction implemented in native code demonstrates another approach: maintain extensibility at the business-rule boundary while keeping the execution engine small and computationally efficient.
Conclusion
Complex culinary entitlements are fundamentally a decision-engine problem.
As dining plans, coupons, BOGOs, discounts, complimentary products, timing restrictions, and promotional programs begin interacting within the same transaction, conventional conditional processing becomes increasingly difficult to scale.
By reducing these concepts to a common tender abstraction, separating entitlement policy from application strategy, supporting custom item models, and treating optimization as a first-class capability, the organization created a decision architecture capable of adapting to both existing and future culinary programs.
C++ provides the execution performance necessary to apply that architecture within a high-volume Fortune 500 transaction environment processing millions of transactions.
The broader architectural lesson extends beyond culinary entitlements:
When the number of possible business rules is effectively unlimited, the scalable solution is not to teach the engine every rule. It is to design an engine that does not need to know them.