company logo

Help center

All collectionsVolume PricingCode ExamplesMetafield Reference

Metafield Reference

The mnml.volume_pricing_tiers metafield: schema, field reference, precedence rules, and how to read and write it with the Shopify Admin API, Storefront API or Liquid.

Saul Sampson·November 10, 2026

MNML Volume Pricing stores each product’s tiers in a standard Shopify metafield that your store owns. Any tool that writes metafields can set it (Admin GraphQL API, Matrixify, Shopify Flow, a PIM), and Liquid, the Storefront API and the Admin API can all read it.

There is no sync step. The discount function reads the metafield on every cart evaluation, so a write via the API applies to the next cart. You do not need to open or save anything in the app afterwards.


The metafield

Namespace

mnml

Key

volume_pricing_tiers

Type

json

Owner types

PRODUCT (all plans), PRODUCTVARIANT (Pro plan and development stores)

Ownership

Store-owned. The app creates the definition the first time it is opened; the data stays on your store if the app is uninstalled

Validation

The definition carries a JSON schema. Writes that don’t match it are rejected with a userErrors message

If you write the metafield before the app has been opened, Shopify stores it as an undefined metafield with no validation. It starts working as soon as the definition exists.

Schema

JSON
{
  "combineVariantQuantities": false,
  "tiers": [
    { "qty": 5,  "type": "amount", "price": 1000, "badge": "" },
    { "qty": 10, "type": "amount", "price": 900,  "badge": "Most popular" }
  ],
  "markets": {
    "europe": {
      "currency": "EUR",
      "countries": ["DE", "FR", "NL"],
      "tiers": [
        { "qty": 5,  "type": "amount", "price": 1150 },
        { "qty": 10, "type": "amount", "price": 1050 }
      ]
    }
  }
}

Top-level fields

Field

Type

Required

Description

tiers

array

Yes

The default tier list. May be empty only when markets provides tiers

combineVariantQuantities

boolean

No (default false)

Product level only. When true, quantities of all variants of the product are summed to pick the tier, and any variant-level tiers are ignored

markets

object

No

Per-market overrides, keyed by any handle you choose. See below

Tier fields

Field

Type

Required

Description

qty

integer, ≥ 1

Yes

Minimum line quantity for this tier

price

number, ≥ 0

Yes

For amount: the unit price in the currency’s minor units (1000 = 10.00). For percentage: the percentage off (15 = 15%)

type

"amount" or "percentage"

No (default "amount")

Any value other than "percentage" is treated as "amount"

badge

string

No

Label shown beside the tier in the storefront widget. Omit or use "" for none

Market fields

Field

Type

Required

Description

countries

array of ISO 3166-1 alpha-2 codes

Yes

Buyer countries this entry applies to. Case-insensitive

currency

ISO 4217 code

No

If set, the entry only applies when the cart’s presentment currency matches

tiers

array

Yes

Tiers in the market’s own currency. Not converted

The first market in document order whose countries includes the buyer’s country (and whose currency, if set, matches) wins. Otherwise the default tiers apply. Markets with an empty tiers list are ignored.

Parsing notes

  • Tiers can be in any order; the function sorts them by qty.

  • Numeric strings ("price": "900") are accepted. A tier with a non-numeric value is skipped.

  • Unknown keys are ignored, so you can add your own fields.

  • A bare array [ {tier}, {tier} ] is also accepted. It is the legacy shape; write the object form.

Precedence

  1. Pricing Rules are not stored on this metafield. A product or variant with tiers on this metafield always overrides any Pricing Rule that covers it.

  2. Variant tiers override product tiers for that variant, when the shop has Pro access.

  3. combineVariantQuantities: true on the product overrides variant tiers. All variants price from the product’s tiers.

  4. Market tiers override default tiers for buyers in a listed country.


Reading

liquid
{% assign vp = product.metafields.mnml.volume_pricing_tiers.value %}
{% for tier in vp.tiers %}
  {{ tier.qty }}+ : {{ tier.price | divided_by: 100.0 | money }} each
{% endfor %}

For variants, read variant.metafields.mnml.volume_pricing_tiers.value and fall back to the product value when it is blank. Creating a Custom Volume Pricing Block has complete examples.

Storefront API

Storefront access is off by default on the definition. Before querying from a headless storefront, turn it on in Settings → Custom data → Products → Volume Pricing Tiers → Storefronts: Read, or with metafieldDefinitionUpdate and access: { storefront: PUBLIC_READ }. Then:

GraphQL
{
  product(handle: "example") {
    metafield(namespace: "mnml", key: "volume_pricing_tiers") { value }
    variants(first: 50) {
      nodes {
        id
        metafield(namespace: "mnml", key: "volume_pricing_tiers") { value }
      }
    }
  }
}

Admin API

product.metafield(namespace: "mnml", key: "volume_pricing_tiers") { value } with no extra setup.

Behaviour notes

  • Metafield writes apply on the next cart evaluation. The app has no cache and no sync step.

  • The checkout discount is created the first time the app is opened in the admin. On a new install, open the app once; after that, API writes are enough on their own.

  • Fixed prices above the regular price are ignored (Unless you’re a Plus store using Price update mode), because Shopify discounts can only lower a price. A percentage tier is relative to the current price, so it is the safer choice when prices vary by market or catalog.

  • Unit prices are rounded to the currency’s minor unit at checkout.

  • Shopify caps a JSON metafield at 64 KB. A typical tier set is under 1 KB.

  • On uninstall, the metafield and its data remain on your store.

Not on this metafield

Data

Where it lives

Pricing Rules (tiers for many products or collections, Mix & Match)

App settings, managed on the app’s Pricing Rules page. Not writable via this metafield

Discount title, eligibility, stacking, exclusions

App settings

Which tier a cart line received

The order’s discount application (Discount mode) or line price (Price Update mode)

Related

  • Bulk Import Volume Pricing Tiers with Matrixify

  • Creating a Custom Volume Pricing Block

  • Add a “From” Price to Product Cards

  • Combine Variants for Volume Pricing

Did this answer your question?
😞
😐
😁