Discount Engine (v1)
Understanding the Rule builder
The Rule builder is at the heart of the function builder and allows you to build exhaustive logic for your discount function.
With the Rule builder You can create rules that determine when discounts are applied to items in a customer's shopping cart. Each line in the cart is checked against these rules. If all conditions are met, the discount is applied.
How it Works:
You set up conditions in the Rule Builder.
Each line item in the cart is checked against these conditions.
If an item satisfies all the conditions, it gets the discount.
We're moving from Rule engine v1 to v2 for powering more advanced logics and allow merchants to run better promotions than ever before.
Rule engine v1 will continue to remain as a legacy offering by Dollarlabs and maintained - but no new features will be prioritised for it anymore,
Let's understand this with an example ?
Example: Let's say you have a discount that applies if all the below conditions are met:
Condition 1: The cart subtotal must be greater than $100 (Cart sub total > $100).
Condition 2: The customer must be logged in (Customer logged in = true).
Condition 3: The product must be from a specific vendor, say "Vendor A" (Product Vendors = Vendor A).
Let's test our logic on a user's cart
Here's an example cart from a user that we'll test our logic on, assuming that the customer is logged in.
Item 1: Price = $50, Vendor = Vendor A
Item 2: Price = $60, Vendor = Vendor B
Item 3: Price = $30, Vendor = Vendor A
Finding 1 → The cart subtotal is $140 (which is greater than $100), and the customer is authenticated.
Finding 2 → The discount is applied to Item 1 and Item 3, but not to Item 2. This way, the rule ensures that only the eligible items get the discount based on the conditions set.
Walkthrough of the Rule builder UI
Last updated