# Quantity pricing

URL: https://docs.sparklayer.io/help/pricing/quantity-pricing

Set up tiered quantity pricing and unit of measure pricing for boxes or pallets in SparkLayer, by CSV or in the Price editor, including rules for variants.

> **Quick summary**
>
> - **Quantity pricing** (also called tiered pricing or price breaks) lowers the unit price as customers buy more, for example 1 unit at $14.99, 5 at $10.99 and 10 at $8.99.
> - **Unit of measure pricing** prices set units such as boxes, cases or pallets, and works out the average unit price for the quantity ordered.
> - Set both up with prices you upload: a `qty` column (and `unit_of_measure`) in your [CSV upload](https://docs.sparklayer.io/help/pricing/csv-upload.md), or in the [Price editor](https://docs.sparklayer.io/help/pricing/price-editor.md). An automatic pricing rule can't create them.
> - Always include a price for a quantity of 1. Both features are available on every plan.

## How it works

With quantity pricing, the **unit price** depends on the quantity the customer adds to their order. SparkLayer finds the tier the quantity falls into and uses that tier's price. If the customer also has discounts, SparkLayer then takes them off the unit price.

For example:

| Quantity | Unit price |
| --- | --- |
| 1 or more | $14.99 |
| 5 or more | $10.99 |
| 10 or more | $8.99 |

Customers see the price breaks in the [Product Detail Interface](https://docs.sparklayer.io/help/storefront/interfaces/product-detail.md), as a table of **Qty**, **Price** and **Savings**. By default, the savings are worked out from the single unit price of the product or variant. To base them on the RRP (retail price) instead, see [How prices are shown](https://docs.sparklayer.io/help/pricing/pricing-display.md#base-savings-on-the-rrp).

## Set up quantity pricing

Quantity pricing works with prices you upload, not with an automatic pricing rule. On an automatic price list, upload prices for the products that need quantity pricing. See [Price lists](https://docs.sparklayer.io/help/pricing/managing-pricing.md).

1. Prepare a CSV file with `sku`, `price` and `qty` columns. Add one row per price break, and always include a row for a quantity of `1`:

   ```csv
   sku,price,qty
   123-abc,14.99,1
   123-abc,10.99,5
   ```

   Here, SKU `123-abc` costs 14.99 each from 1 unit and 10.99 each from 5 units.
2. Go to **Pricing > Price lists** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/pricing/lists)), or **SparkLayer Wholesale > Pricing > Price lists** in the Shopify app and click **Upload** next to the price list.
3. Choose the file, check the rows under **Check your upload**, then click **Import**. See [Upload prices by CSV](https://docs.sparklayer.io/help/pricing/csv-upload.md) for the full steps.

| Column | What it contains | Required |
| --- | --- | --- |
| `sku` | The product SKU as set up in your eCommerce platform or backend system. | Yes |
| `price` | The unit price for the SKU at the quantity in the `qty` column. | Yes |
| `qty` | The quantity from which this price applies. | No (defaults to 1) |

You must include a unit price for a quantity of `1`, even if customers can't buy single units because you've set up minimum quantities or pack sizes. See [Quantity rules](https://docs.sparklayer.io/help/storefront/quantity-rules.md).

To change quantity pricing for a single product, use the [Price editor](https://docs.sparklayer.io/help/pricing/price-editor.md): open the variant, then edit a price or click **Add a new price** to add another quantity break.

## Choose how variants are counted

For products with variants (for example colour or size), you choose whether quantities are counted across all variants or per variant.

| Behaviour | What happens |
| --- | --- |
| **Across all variants** (default) | Quantity pricing applies across every variant of the product. If a product comes in Small, Medium and Large and the price break starts at 5, a customer gets the lower price for any combination, such as 1 Small, 2 Medium and 3 Large. |
| **Per variant** | Quantity pricing only counts the quantity of each variant on its own. For example, you can set quantity pricing that only applies to the Large size. |

To count per variant, turn off **Tiered pricing across variants** at **Settings > Configurations > Pricing and cart** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/configuration/settings/general)), or **SparkLayer Wholesale > Settings > Configurations > Pricing and cart** in the Shopify app and save. The same switch is also at **Storefront > Options > Pricing and display** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/storefront/options)), or **SparkLayer Wholesale > Storefront > Options > Pricing and display** in the Shopify app; changing it in one place changes it in the other.

## Set up unit of measure pricing

Unit of measure pricing lets customers order in set units such as boxes, cases or pallets. You set a unit price for each unit, and SparkLayer prices any quantity left over at the single unit price.

It works like quantity pricing: customers buy more and pay less per unit. The difference is how the line total is worked out. SparkLayer splits the quantity across your units of measure, then adds up the line total. The unit price shown is the average across the total quantity.

For example, a product sells as single units, in boxes of 7 and on pallets of 150. A customer orders 320 units:

| Unit | Unit price | Units in the order | Line |
| --- | --- | --- | --- |
| Pallet (150 units) | $8.99 | 300 (2 pallets) | $8.99 × 300 = $2,697.00 |
| Box (7 units) | $10.99 | 14 (2 boxes) | $10.99 × 14 = $153.86 |
| Single unit | $14.99 | 6 | $14.99 × 6 = $89.94 |
| **Total** | | **320** | **$2,940.80** |

The unit price shown is $2,940.80 ÷ 320 = **$9.19**.

### Upload unit of measure prices

1. Prepare a CSV file with a `unit_of_measure` column as well as `sku`, `price` and `qty`. Set `qty` to the number of units in each unit of measure, and leave `unit_of_measure` blank for the single unit price:

   ```csv
   sku,price,qty,unit_of_measure
   123-abc,14.99,1,
   123-abc,10.99,7,box
   123-abc,8.99,150,pallet
   ```

2. Upload it to the price list from **Pricing > Price lists** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/pricing/lists)), or **SparkLayer Wholesale > Pricing > Price lists** in the Shopify app. See [Upload prices by CSV](https://docs.sparklayer.io/help/pricing/csv-upload.md).

| Column | What it contains | Required |
| --- | --- | --- |
| `sku` | The product SKU as set up in your eCommerce platform or backend system. | Yes |
| `price` | The unit price for the SKU at the quantity in the `qty` column. | Yes |
| `qty` | The quantity for this price. For a unit of measure, the number of units it contains. | No (defaults to 1) |
| `unit_of_measure` | The unit of measure the quantity belongs to. Use letters and numbers only, with underscores as separators, for example `box`, `pallet` or `pallet_box`. | No |

As with quantity pricing, you must include a unit price for a quantity of `1`, even if customers can't buy single units.

You can also set up unit of measure pricing in the [Price editor](https://docs.sparklayer.io/help/pricing/price-editor.md): add or edit a price, and enter the unit of measure and its unit price.

### How unit of measure pricing shows to customers

The [Product Detail Interface](https://docs.sparklayer.io/help/storefront/interfaces/product-detail.md) shows the price for each unit, for example "1+", "7 (box)" and "150 (pallet)", and a breakdown of how the unit price has been calculated. The [My Cart Interface](https://docs.sparklayer.io/help/storefront/interfaces/my-cart.md) shows the same breakdown, so customers can see how the line total and unit price were worked out.

## Show a quantity pricing table

SparkLayer shows your price breaks in the [Product Detail Interface](https://docs.sparklayer.io/help/storefront/interfaces/product-detail.md) by default. To show the table anywhere else on your product page, add a code snippet. See [Show the quantity pricing table](https://docs.sparklayer.io/help/pricing/pricing-display.md#show-the-quantity-pricing-table).

## Related quantity rules

Quantity rules control how customers order, rather than what they pay. See [Quantity rules](https://docs.sparklayer.io/help/storefront/quantity-rules.md). To combine price breaks, pack sizes and discounts for bigger orders, follow [Run volume pricing and promotions for trade customers](https://docs.sparklayer.io/help/guides/volume-discounts.md).

- **Pack sizes** (also called quantity increments): make customers add items in set packs, for example packs of 3 or 6.
- **Minimum quantities** for a variant (for example products that come in colours), or for the parent product as a whole, across its variants.
- **Maximum quantities** for a variant or for the parent product.

## For developers

These changes are made in code, so they're usually done by your developer or agency. You don't need them to set up quantity pricing.

### Name and pluralise units of measure

Language strings for each unit of measure let the storefront pluralise quantities in messages to customers (for example "1 box", "2 boxes"). Use the key you set for the unit of measure in your price list. Add the strings to your SparkLayer [Core Script](https://docs.sparklayer.io/help/storefront/storefront-options.md#add-a-core-script-setting):

```javascript title="Core Script"
translations: {
  en: {
    "unit-of-measure.unit-type.box": "{uomQuantity, plural, =1 {box} other {boxes}}",
    "unit-of-measure.unit-type.pallet_box": "{uomQuantity, plural, =1 {pallet box} other {pallet boxes}}"
  }
},
```

See [Languages and international](https://docs.sparklayer.io/help/storefront/languages-and-international.md) for more on language strings that contain variables.

## FAQs

**Can I use quantity pricing with an automatic price list?**

Not from the automatic rule: quantity pricing needs prices you upload. Upload manual prices to the automatic price list for the products that need quantity pricing. See [Price lists](https://docs.sparklayer.io/help/pricing/managing-pricing.md).

**Do I need a price for a single unit?**

Yes. When you import a price list with quantity pricing, include a row for each SKU with a quantity of `1`, even if customers can't buy single units.
