Quantity Rules
SparkLayer has full support for pack sizing (sometimes called quantity increments), that lets you configure the quantities your customers have to order products in (e.g. units of 3, 6, 9, etc). Once set up, when your customers add an item to their order, the quantities will automatically update based on the pack size settings you've configured.

To enable this, SparkLayer uses special settings (sometimes referred to as metafields or attributes) that allow additional data to be stored against products.
Setting up metafields on Shopify To learn more about how to configure metafields on Shopify for SparkLayer, please refer to our guide here
Item | Details |
Custom data type | Variants |
Metafield type | This must be set as an integer |
Namespace | This must be set as sparklayer |
Key | This must be set as pack_size |
Value | This must be set as an integer, e.g. 6 |


By default, if you have pack sizing enabled, the product page widget will display a "pack price" that takes the unit price multiplied by the items within a pack. If you'd like this hidden, simply add the below CSS to your CSS overwrites.
Updating language and text You can update the default text by adding code to your Core Script. Learn more about how to update text on SparkLayer.
By default, pack sizing will apply to all customers, however it's possible to set up customer-specific pack sizing rules. For example:
- For your default B2B customers, they're able to buy a product in units of 1
- For other B2B customers, they have to purchase in units of 6.
To enable this, SparkLayer uses special settings (sometimes referred to as metafields or attributes) that allow additional data to be stored against products.
Setting up metafields on Shopify To learn more about how to configure metafields on Shopify for SparkLayer, please refer to our guide here
Item | Details |
Custom data type | Variants |
Metafield type | This must be set as an JSON |
Namespace | This must be set as sparklayer |
Key | This must be set as settings |
Value | This is then set per customer group you want to apply the pack size rules to. E.g. for the default B2B customer group:[{"customer_group":"base","pack_size":6}] For an additional customer group that had an internal ID of tier-2, you would use:[{"customer_group":"base","pack_size":6}, {"customer_group":"tier-2","pack_size":12}] You can find the internal ID from the Customer Groups area of the SparkLayer Dashboard. |
SparkLayer has support for a variety of different quantity product settings including:
Type | Details |
Minimum - Variant | Minimum product quantities at a variant level (e.g. products that have colours) |
Minimum - Product | Minimum product quantities at a parent level (allowing you to apply rules to the product as a whole. If it has variants, it can apply across multiple variants) |
Maximum - Variant | Maximum product quantities at a variant level |
Maximum - Product | Maximum product quantities at a parent level (allowing you to apply rules to the product as a whole. If it has variants, it can apply across multiple variants) |
It's possible to set 'minimum product quantities' for any SKU within your Shopify catalogue, meaning that customers must meet this minimum quantity before being able to purchase a product.

To enable this, SparkLayer uses special settings (sometimes referred to as metafields or attributes) that allow additional data to be stored against products.
Setting up metafields on Shopify To learn more about how to configure metafields on Shopify for SparkLayer, please refer to our guide here
Minimum product quantities: product-level
Item | Details |
Custom data type | Variants |
Metafield type | This must be set as an integer |
Namespace | This must be set as sparklayer |
Key | This must be set as min_order_quantity |
Value | This must be set as an integer, e.g. 6, 12, 20 etc |
Minimum product quantities: variant-level
Item | Details |
Custom data type | Variants |
Metafield type | This must be set as an integer |
Namespace | This must be set as sparklayer |
Key | This must be set as min_order_parent_quantity |
Value | This must be set as an integer, e.g. 6, 12, 20 etc |
As with minimum product quantities above, you can also set maximum product quantities to apply.
Setting up metafields on Shopify To learn more about how to configure metafields on Shopify for SparkLayer, please refer to our guide here
Maximum product quantities: product-level
Item | Details |
Custom data type | Variants |
Metafield type | This must be set as an integer |
Namespace | This must be set as sparklayer |
Key | This must be set as max_order_quantity |
Value | This must be set as an integer, e.g. 6, 12, 20 etc |
Maximum product quantities: variant-level
Item | Details |
Custom data type | Variants |
Metafield type | This must be set as an integer |
Namespace | This must be set as sparklayer |
Key | This must be set as max_order_parent_quantity |
Value | This must be set as an integer, e.g. 6, 12, 20 etc |
SparkLayer can support quantity pricing rules (e.g. buy 1 for $10, buy 10 for $8). To learn more, please see our full guide here.
By default, if a product has quantity rules set, it will display a message 'Qty rules apply' that a customer can interact with.

If you'd prefer to not show this, you can hide this by adding the below CSS to your CSS overwrites.