> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.accounteditor.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Connect quantity rules

Do you set a smallest or largest quantity at checkout? Order editing could let customers get round it afterwards. The **MinMax** integration applies the same limits when a customer changes an order. Set it up under **Features → Integrations**.

## Why this matters

A cap set at checkout is worth nothing if a customer can raise the quantity later. The same goes for case packs and minimum orders.

## Set it up

1. Go to **Features → Integrations**.
2. Find **MinMax** and turn it on.
3. Paste your product and SKU rules as CSV lines.
4. Save.

The lines are checked when you save. A bad one is flagged with its line number, so you can fix it.

## B2B contract rules come first

Is the customer on a B2B contract? Then **Shopify's own quantity rules win**. Those come from the company location's contract pricing.

MinMax applies where there is no contract rule.

## What customers see

The quantity stepper obeys the limits. Customers see a message saying why, instead of a silent failure:

* *Minimum {min} required*
* *Maximum {max} allowed*
* *Quantity must be a multiple of {multiple}*
* *This product cannot be modified*

## Good to know

**Without this, editing gets round your rules.** That is the whole point of it.

**B2B contracts win.** Shopify's contract rules beat anything set here.

**The file is checked on save.** A bad line is named, so fix it and save again.

**Multiples matter for case packs.** A "multiple of 12" rule stops a customer editing a case pack down to 11.

## Troubleshooting

* **Customers exceed your limits** — Why: The integration is off, or the product is not listed — Fix: Check both
* **An error when you save** — Why: A line is wrong — Fix: The error names the line
* **Limits differ from checkout** — Why: A B2B contract rule is taking priority — Fix: Expected
* **A product cannot be changed at all** — Why: A rule locks it — Fix: Check your rules for that product
* **The rules do nothing** — Why: Item quantity editing is off — Fix: Turn it on under **Features → Item edits and refunds**

## FAQ

### Why do I need this?

Because a rule set at checkout can be got round by editing the order later.

### What if a customer is on a B2B contract?

Shopify's contract rules win. MinMax applies where there is no contract rule.

### What format are the rules in?

CSV lines for products and SKUs. The app checks them on save and names any bad line.

### Do customers see why they are blocked?

Yes. The stepper shows the minimum, maximum, or required multiple.

## Related articles

* [Let customers change items and quantities](/en/article/let-customers-change-items-and-quantities-zx99mp/)
* [Connect fraud checks](/en/article/connect-fraud-checks-1u6gnmi/)
* [Which orders can be edited](/en/article/which-orders-can-be-edited-1bis0nl/)
* [Making order editing work with your warehouse](/en/article/making-order-editing-work-with-your-warehouse-109htqb/)
