---
schema_version: "1"
id: f52cf9c7c61c268664306cd77f16a1697599169bf6430775eaabbfe16f17d252
title: Purchase Quantity Rules for a B2B Store
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/commerce/264-0-0/comm_products_qr_intro.md
canonical_url: https://help.salesforce.com/s/articleView?id=commerce.comm_products_qr_intro.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: aa70fad0b5629d9d469706bc7cb3cfb19a5fa3bb826f6230d8b695b95141ea31
description: A purchase quantity rule defines the minimum and maximum amounts of a product that a customer can buy and the number of products that are added with each increase. You can assign one purchase quantity rule to each simple product and product variation. In the rule, the minimum and maximum quantities must be multiples of the increment. For example, minimum 3, maximum 300, increment 3. You can define quantity amounts as whole numbers or as fractions up to four decimal places.
products:
  - Commerce
  - B2B Commerce
release: "264"
---
# Purchase Quantity Rules for a B2B Store

A purchase quantity rule defines the minimum and maximum amounts of a product that a customer can buy and the number of products that are added with each increase. You can assign one purchase quantity rule to each simple product and product variation. In the rule, the minimum and maximum quantities must be multiples of the increment. For example, minimum 3, maximum 300, increment 3. You can define quantity amounts as whole numbers or as fractions up to four decimal places.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=commerce.comm_editions.htm&amp;language=en_US" target="_blank">View supported editions</a>.</td></tr></tbody></table>

[Which Salesforce Commerce Product Do I Have?](https://help.salesforce.com/s/articleView?id=commerce.comm_what_product.htm&language=en_US)

Assign a purchase quantity rule only to the product that it applies to. For example, let’s say you sell two kinds of espresso machines. One is for businesses to put in visitor areas and staff kitchens. Customers can buy as many as they like in any increment, so a quantity rule isn’t needed.

The other machine is industrial and sold to commercial customers, like coffee shop chains. For this machine, you receive a volume discount from your distributor. To pass that savings to buyers, you can establish a minimum purchase rule and an increment rule to keep the volume within your distributor’s parameters. For example, you can have a five-machine minimum, with a required increment of five with each addition. So your customer can buy 5, 10, 15 machines, and so on.

You can also control the maximum number for purchase. For instance, you want to ensure that you have enough stock to satisfy all your customers. Or, you want to keep a ceiling on shipping costs. So you limit the number of machines per customer to prevent anyone from cornering the market or to stay under your shipping ceiling.

You can set purchase quantity rules in a few places.

- Enable quantity rules through the [Object Manager](https://help.salesforce.com/s/articleView?id=commerce.comm_products_qr_product2_layout.htm&release=264.0.0&type=5 "To make purchase quantity rules available for your store’s products, add the Quantity Rule related list to the Product object’s page layout.").
- Define values for your rules and assign rules to simple products and product variations in the [Product Workspace](https://help.salesforce.com/s/articleView?id=commerce.comm_products_qr_create_assign.htm&release=264.0.0&type=5 "You can define the minimum and maximum amounts of a product that a customer can buy and the number of products to add with each increase. You can assign a quantity rule to simple products and product variations. Because parent products aren’t sold, they don’t need quantity rules.").
- Add display text for quantity rules using the Quantity Selector properties in Experience Builder components.

![Quantity rule display text above the quantity selector](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-comm-264-0-0-production-enus/d863e308-482a-4dfa-8d20-2a94737d394a/comm/images/quantity_display_text.png)

The rule text that you specify appears when buyers click the information icon on the quantity selector.

![Quantity selector information icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-comm-264-0-0-production-enus/d863e308-482a-4dfa-8d20-2a94737d394a/comm/images/quantity_selector_info_icon.png)

Cart Items, Product Detail Purchase Options, Quantity Selector, and Results Layout are components that have properties related to quantity rules. Use the properties to enter display text for the quantity rule and to show or hide quantity rules in the store. The components also show the minimum, increment, and maximum in whole numbers and fractional quantities. You can view or edit the quantity field with up to two decimal places only on the Order pages. Any other pages that reference these quantity fields also reflect only two decimal places.

If your store uses custom code for checkout operations like creating and editing cart items, make sure that your code performs validation on purchase quantity rules.