Playground
Run LexQ's domain templates on the real decision engine. Pick a sample, change any input, and see which rule decides and why. No signup needed.
One order discount per order (member tier or first-order code), a capped AI-proposed discount on top of it, free shipping, and 5% member rewards.
Result
Run the engine to see the decision here.
The rules below then show which ones matched, which were selected, and which lost.
Rules
Each rule checks its condition against the inputs. Matching rules apply in priority order, #1 first.
- 1PLATINUM member: 15% offAlways-on member price for the top tier. Does not stack with other order discounts.
- 2WELCOME15: 15% off first order ($50+)Welcome code for a first order of $50 or more. No effect on repeat orders.
- 3GOLD member: 10% offAlways-on member price for GOLD.
- 4SILVER member: 5% offAlways-on member price for SILVER.
No mutex group: every matching rule applies
- 5Free shipping: members or $35+Members always ship free. Guests need a $35 merchandise subtotal.
- 6Member rewards: 5% backCredit is 5% of the subtotal after the order discount, before any AI-proposed discount.
- 7AI offer cap: 5% on electronicsElectronics carry low margins, so carts that include them get at most 5% from the AI assistant.
- 8AI offer cap: 10% under $1,000 lifetime spendCustomers with less than $1,000 lifetime spend get at most 10%.
- 9AI offer ceiling: 15%Caps the AI offer at 15%. It stacks on any order discount.
No mutex group: every matching rule applies
- 10Flag AI offers above 30% for reviewA person checks offers above 30%. The cap still applies.
What changes when a rule changes
LexQ's Impact Simulation runs the same requests through your current rules and an edited draft, so you can see how the results change before you deploy. Here, we ran 200 requests ahead of time through two drafts, each with one threshold changed.
What this draft changes
The 10% cap on AI offers now covers only customers under $500 in lifetime spend, down from $1,000. Offers to customers who have spent $500 to $999 are no longer capped by this rule.
This draft affects 10 of 200 requests.
- 10 requestsBeforeAfterAI-Suggested Discount (%)Overwritten by a ruleBefore: 10After: 15Rules fired in one version onlyBefore: AI offer cap: 10% under $1,000 lifetime spendAfter: AI offer ceiling: 15%
Inputs
Request Lifetime Spend (USD) AI-Suggested Discount (%) Load inputs into step 2 #8 605 42 #27 522 59 #44 601 48 #8
- Lifetime Spend (USD)
- 605
- AI-Suggested Discount (%)
- 42
#27
- Lifetime Spend (USD)
- 522
- AI-Suggested Discount (%)
- 59
#44
- Lifetime Spend (USD)
- 601
- AI-Suggested Discount (%)
- 48
Run the same comparison on your own rules and requests.
Start FreeComputed in advance with LexQ's Dry Run Compare, which runs two versions on the same input and compares the results, one request at a time. Impact Simulation makes the same comparison across many requests at once and reports aggregate metrics. This section does not call the engine. The requests are generated within fixed input ranges, not taken from real traffic. Each group lists only the rules that fired in one version but not the other, and only the inputs those rules check. Loading a request fills in all of its inputs.
Show the input ranges
- purchaseSubtotalUsd
- 10.19–399.83
- loyaltyTier
- NONE 80, SILVER 36, BRONZE 33, GOLD 32, PLATINUM 19
- appliedPromoCode
- "" 180, WELCOME15 20
- isFirstPurchase
- true 28, false 172
- customerLtvUsd
- 0–4,894
- cartCategoryTags
- beauty 68, accessories 64, apparel 56, home 50, electronics 44
- loyaltyCreditUsd
- 0–0
- aiSuggestedDiscountPercent
- 0–60