Discount Rules Engine
The Discount Rules system lets you create automated promotions that are applied to customer carts in real-time. Instead of manually calculating discounts, SlonAxis evaluates every active rule during checkout and automatically applies the best deals.
Key Capabilities
- ✅ Automatic application — Discounts evaluated and applied in real-time
- ✅ Customer-aware triggers — Target first-time visitors, repeat customers, or everyone
- ✅ Flexible values — Percentage-based (10% off) or fixed amounts (₹100 off)
- ✅ Precise scoping — Apply to all items, specific categories, or individual items
- ✅ Stacking control — Decide whether discounts combine or run exclusively
- ✅ Validity windows — Schedule promotions with start and end dates
- ✅ Priority ordering — Control evaluation order when multiple rules are eligible
Who Can Access?
Only users with the action.discount.write permission can create, edit, or delete discount rules. Typically available to Managers and Owners.
How the Engine Works
Key Rules
- Priority order — Lower numbers evaluate first (priority
1before100) - Non-stackable stops everything — Once applied, no further rules are evaluated
- Exclusive groups — Only one rule per group can apply per cart
- Savings are capped — Discounts can never exceed the cart subtotal
- Walk-in customers — Only "On Every Order" rules apply to walk-ins
Trigger Types
| Trigger | When It Activates | Customer Required? | Use Case |
|---|---|---|---|
| On Every Order | Every cart | No (works for walk-ins) | Store-wide sales |
| On First Order | Customer has zero past orders | Yes | Welcome offers |
| On Repeat Customer | Customer has ≥ N visits in timeframe | Yes | Loyalty rewards |
| On Single Order | Once per customer, ever | Yes | One-time promos |
Repeat Customer — Extra Settings
- Min Visits — Minimum paid orders required (e.g.,
5) - Timeframe (Days) — Rolling window to count visits (e.g.,
30)
Example: Min Visits = 5, Timeframe = 60 → "Customer must have 5+ purchases in the last 60 days."
Creating a Discount Rule
- Go to Manage → Discount Rules → "+ Add Rule"
- Fill in the form:
| Field | Description |
|---|---|
| Rule Name (required) | Unique, descriptive name |
| Description (optional) | Details about the promotion |
| Trigger Type | Choose one of the four triggers |
| Value Type | Percentage (%) or Fixed (₹) |
| Discount Value (required) | Amount of the discount |
| Priority (default: 100) | Lower = evaluated first |
| Exclusive Group (optional) | Tag for mutual exclusion |
| Stackable (default: ON) | Whether it combines with other discounts |
| Start/End Date | When the rule is active |
| Target Categories (optional) | Product, Service, and/or Package |
| Specific Items (optional) | Individual catalog items |
| Publish Immediately | Whether rule is live or saved as draft |
Example Scenarios
Store-Wide Seasonal Sale
- Name: "Summer Special 15% Off Services"
- Trigger: On Every Order
- Value: 15% percentage
- Target: Services only
- Dates: June 1 → August 31
- Stackable: ON (can combine with loyalty discounts)
New Customer Welcome Offer
- Name: "Welcome Discount ₹200"
- Trigger: On First Order
- Value: ₹200 fixed
- Priority: 10 (high priority)
- Target: All items (global)
Loyalty Reward
- Name: "Loyal Customer 10% Reward"
- Trigger: On Repeat Customer (Min Visits: 5, Timeframe: 30 days)
- Value: 10%
- Exclusive Group: "loyalty"
Priority & Stacking Strategy
- If a non-stackable rule at P:1 applies, rules at P:50, P:80, P:100 are all skipped
- If all rules are stackable, they all apply (subject to exclusive group restrictions)
Walk-in Customers & Discounts
| Trigger | Walk-in | Registered |
|---|---|---|
| On Every Order | ✅ Applied | ✅ Applied |
| On First Order | ❌ Skipped | ✅ If zero past orders |
| On Repeat Customer | ❌ Skipped | ✅ If threshold met |
| On Single Order | ❌ Skipped | ✅ If not redeemed |
Tips
- ✅ Name rules clearly — "Monsoon 15% Service Discount" instead of "Rule 1"
- ✅ Use priority wisely — Give exclusive offers lower numbers
- ✅ Set end dates — Avoid forgotten promotions running indefinitely
- ✅ Deactivate, don't delete — Preserve historical data for past orders
- ✅ Test with walk-ins — Remember they only receive "On Every Order" discounts
- ✅ Use exclusive groups — Prevent conflicting promotions from stacking
Troubleshooting
| Issue | Solution |
|---|---|
| Discount not appearing in cart | Check: Is rule active? Start date in past? End date passed? Customer linked? |
| Customer should qualify but doesn't | Verify visit count meets threshold within timeframe |
| Too many discounts stacking | Use exclusive groups or mark premium rules as non-stackable |
| Can't delete a rule | Rule is referenced in past orders; deactivate instead |
| Walk-in not getting discount | Walk-ins only receive "On Every Order" rules |