How to require 20 units then increments of 10 per Shopify variant
Short answer: For bulk-tagged products, require each variant to total at least 20 units and a multiple of 10, even when the same variant appears on separate cart lines. In Checkpost, choose “Variant minimum plus quantity increments” from Templates, adjust the values, test it, then save and enable the rule.
The problem
A merchant requested 20 units minimum, steps of 10, and a different minimum for one variant. One threshold cannot express both the floor and the interval. This preset checks each variant's combined quantity against both rules.
Related merchant discussion on Shopify Community
How to set it up
- Install Checkpost from the Shopify App Store.
- Open Templates and choose Variant minimum plus quantity increments.
- Set the minimum and increment. For a variant with a different minimum, select that variant in a separate rule.
- Use Try this rule to test a sample cart, then click Save rule.
The rule
Checkout is blocked when any of these conditions are true:
- Quantity per variant across cart lines (products tagged bulk) is less than 20
- Quantity per variant across cart lines (products tagged bulk) is not a multiple of 10
Shoppers see: “Order at least 20 of each bulk variant, in steps of 10 (20, 30, 40…).” at the top of checkout, in the cart and at checkout.
Rule definition (JSON)
{
"name": "Bulk variants: 20, 30, 40…",
"match": "any",
"conditions": [
{
"kind": "line_number",
"field": "variant_quantity",
"op": "lt",
"value": 20,
"filter": {
"productTags": [
"bulk"
]
}
},
{
"kind": "line_number",
"field": "variant_quantity",
"op": "not_multiple_of",
"value": 10,
"filter": {
"productTags": [
"bulk"
]
}
}
],
"message": "Order at least 20 of each bulk variant, in steps of 10 (20, 30, 40…).",
"target": "cart",
"runOn": "always"
}Examples with the default settings
These outcomes apply to this rule alone. Other enabled rules may also affect checkout.
| Test cart | Expected outcome |
|---|---|
| Same bulk variant split into 10 + 10 units | Allowed by this rule |
| 25 units of one bulk variant | Checkout blocked |
| 10 blue + 10 red: each is below its own minimum | Checkout blocked |
Where this rule works
These are cart and checkout validations, including supported accelerated checkouts. They are current-cart policies; they do not track previous purchases of a SKU. Shopify excludes POS, recurring subscription orders and native pre-order/Try Before You Buy flows from this API. See Shopify's validation compatibility.
Tips
- Tag the eligible products bulk; both the minimum and increment conditions must use the same selection.
- For a 50-unit exception, select specific variants in separate rules and remove those variants from the general rule's selection. Product tags include all variants.
- Configure volume discounts separately; this preset does not change pricing or the storefront quantity selector.
Can you do this without an app?
Where Shopify's native B2B catalogue quantity rules cover your purchasing channel, use their minimum and increment settings. Checkpost is useful for checkout policies outside that setup; compare your plan and catalogue requirements first.
FAQ
Does a minimum of 20 allow 25?
No. Twenty meets the floor and the increment, while 25 fails the increment of 10. Valid totals are 20, 30, 40 and so on.
Do personalised copies of the same variant combine?
Yes. Two lines with the same variant identity are summed, even when line-item properties split them into separate rows.
Related rules
Wholesale-only products
Prevent retail customers from buying wholesale SKUs by requiring a wholesale customer tag or a B2B company account.
B2B minimum order value
Apply a minimum order amount only to B2B company buyers (or wholesale-tagged customers), leaving retail checkout untouched.
Wholesale minimum excludes other products
For customers tagged wholesale, require at least 100 in products tagged bulk; unrelated retail items do not count toward the wholesale minimum.