Getting started
Install the app, write your first rule, test it against a sample cart, and turn it on.
Batten Discount Rules is one Shopify Function fed by a rule table. You write rules in the admin, the app compiles them into a single automatic discount, and the Function evaluates them against every cart.
1. Install
Install from the Shopify App Store. The app is embedded, so it runs inside your Shopify admin.
2. Write a rule
Open the app and choose New rule. A rule has three parts.
Conditions. All conditions on a rule must match. Available conditions:
- Cart subtotal, minimum or maximum
- Item quantity, minimum
- Product, collection, or tag membership
- Variant SKU list
- Customer tags (Pro and above)
- Customer email domain (Pro and above)
- Market or country (Pro and above)
- Shipping method
- Cart attribute
- Day of week and time window
- First order only (Pro and above)
Actions. What happens when the conditions match:
- Percentage or fixed amount off the matching lines
- Quantity tiers, for example buy 10 and save 5 percent, buy 25 and save 10 percent
- Buy X get Y, either cheapest free or Y at a discount
- Gift with purchase, applied as a discount on a specific variant
- Order level discount
- Shipping discount
- Exclude items already on sale, meaning anything with a compare at price
- Cap the discount per order
Priority and stacking. Rules are ordered. Each rule declares whether it stacks with other rules in the same class. Where two rules could both apply, the order decides.
As you build, the rule reads back as a sentence, for example: 10 percent off all items in Fasteners when the cart has 25 or more units, for customers tagged wholesale.
3. Test before you turn it on
Open the test panel and enter a sample cart. The panel shows which rules fire and what each one takes off. The admin and the Function run the same rule evaluator, so what the panel shows is what a shopper gets.
4. Save and activate
On your first save, the app creates one automatic discount pointing at the Function and stores the rule table on it. Later saves update the same discount.
This matters because a store may only hold 25 active automatic discounts, and app and Function discounts count toward that limit. Keeping every rule inside one discount node means a rule set costs one slot.
How many rules you can have
Three on Free, eight on Growth, and twelve on Pro and Plus. Twelve is also the ceiling on every plan, and it is a measured limit rather than a commercial one. A discount Function gets a fixed instruction budget per checkout evaluation, and going over it means the discount does not apply at all. Twelve rules is the largest set that stays inside that budget on an ordinary ten line cart in the worst case, where every rule is enabled, in class, and matches every line. The limit rises only when the Function itself gets cheaper.
Migrating from Shopify Scripts
Scripts was switched off on June 30, 2026. Common recipes map across as follows.
| Script recipe | Rule to build |
|---|---|
| Tiered discount by quantity | Quantity tier action with one row per break |
| Buy one get one free | Buy X get Y action, cheapest free |
| Gift with purchase over a threshold | Cart subtotal condition plus a gift with purchase action |
| Customer tag pricing | Customer tags condition plus a percentage off action |
| Free shipping over a threshold | Cart subtotal condition plus a shipping discount action |
| Exclude sale items from a promotion | Any rule plus Exclude items already on sale |
| Hide a payment method | Not supported. Payment customizations are a separate Shopify Function type. |
Rebuild the rules first, run each one through the test panel, then activate.
Still stuck? Send it through the support form and you will have a reply inside two business days.