Skip to main content

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

  1. Priority order — Lower numbers evaluate first (priority 1 before 100)
  2. Non-stackable stops everything — Once applied, no further rules are evaluated
  3. Exclusive groups — Only one rule per group can apply per cart
  4. Savings are capped — Discounts can never exceed the cart subtotal
  5. Walk-in customers — Only "On Every Order" rules apply to walk-ins

Trigger Types

TriggerWhen It ActivatesCustomer Required?Use Case
On Every OrderEvery cartNo (works for walk-ins)Store-wide sales
On First OrderCustomer has zero past ordersYesWelcome offers
On Repeat CustomerCustomer has ≥ N visits in timeframeYesLoyalty rewards
On Single OrderOnce per customer, everYesOne-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

  1. Go to Manage → Discount Rules → "+ Add Rule"
  2. Fill in the form:
FieldDescription
Rule Name (required)Unique, descriptive name
Description (optional)Details about the promotion
Trigger TypeChoose one of the four triggers
Value TypePercentage (%) 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 DateWhen the rule is active
Target Categories (optional)Product, Service, and/or Package
Specific Items (optional)Individual catalog items
Publish ImmediatelyWhether 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

TriggerWalk-inRegistered
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

IssueSolution
Discount not appearing in cartCheck: Is rule active? Start date in past? End date passed? Customer linked?
Customer should qualify but doesn'tVerify visit count meets threshold within timeframe
Too many discounts stackingUse exclusive groups or mark premium rules as non-stackable
Can't delete a ruleRule is referenced in past orders; deactivate instead
Walk-in not getting discountWalk-ins only receive "On Every Order" rules