pricing
npx skills add https://github.com/crystallizeapi/ai --skill pricingCrystallize Pricing Skill
Design, recommend, and implement pricing strategies in Crystallize. This skill covers the full pricing hierarchy — from global price variants through localized price lists to cart-level promotions — and helps you make sound architectural decisions about how to structure pricing for any commerce use case.
The Pricing Hierarchy
Crystallize resolves prices through a layered hierarchy. Each layer can override or adjust the one above it:
┌─────────────────────────────────────────────────┐│ 1. Price Variants (base layer) ││ Global price types applied to all products ││ e.g. Retail, Sales, B2B, Members │├─────────────────────────────────────────────────┤│ 2. Price Lists (override layer) ││ Market/customer-specific adjustments ││ e.g. "EU Retail EUR", "US B2B USD" │├─────────────────────────────────────────────────┤│ 3. Promotions (cart layer) ││ Checkout-time discounts and campaigns ││ e.g. "20% off", "Buy 3 pay for 2" │└─────────────────────────────────────────────────┘Resolution order: When a customer checks out, the system evaluates:
- Which price variant applies (based on context)
- Whether a price list overrides that variant (based on market, customer, customer group, time period). When several match, the lowest price wins
- Whether any promotions apply (based on cart contents, coupon codes, triggers)
Which price, from which API, for whom
Read this before building a storefront. The three read APIs resolve price lists for different audiences, and only one of them knows the customer in the cart:
| Price | API | Call | Where |
|---|---|---|---|
| List, sale and “from” price | Discovery | <variant>Price, the priceVariants hash, variantGroups.summary.price |
Server, cached |
| Market price (public) | Discovery: markets only | <variant>PriceFor(marketIdentifiers), <variant>BestPriceListFor(marketIdentifiers), for the SKUs on screen |
Server, cached |
| Contract price for display (B2B) | Shop API price check, or Catalogue | A throw-away hydrate with the customer; or Catalogue priceFor(customerIdentifiers) for any customer |
Server, cached per org |
| What the cart charges | Shop API /cart |
hydrate resolves the cart’s customer (and its parents), plus context.price.markets and customerGroups |
Server action |
- Discovery has no customer argument anywhere.
<variant>BestPriceListanswersnullfor a list aimed at a customer, because Discovery does not know who is asking. Never use it for a contract price. - Discovery is open by default, and when open, everything it serves is public: every price variant and, to anyone who knows a market’s identifier, that market’s price list. A “market per agreement” makes the agreement readable without a token, so keep confidential terms out of it.
- A market identifier works as a key. A price list aimed at a customer and a market applies to anyone who
sends that market. On a sandbox tenant, a guest cart (
isGuest: true) withcontext.price.markets: ["b2b-contract"]got the contract price (71.2 instead of 89), and DiscoverydefaultPriceForgave the same price anonymously. Price resolution reads the markets the caller passes, nothing else, so derive markets on the server from the signed-in session, never from the browser, a query string or an agent tool’s arguments. - With price lists or contract prices, restrict Catalogue and Search & Discovery. Both can be open, and are by default, but then the prices above can be read without a token. Restricting them is strongly recommended: read them with the static token from the server, and re-ignite Discovery after the change ([[query]]).
- The Shop API and the Catalogue resolve the same list, so a contract price shown from either agrees with the cart. The Shop API resolves only the cart’s customer; the Catalogue resolves any customer, which is what a seller tool or a cached per-organisation price table needs.
- Core is never on this path. For the storefront as a whole, see [[storefront]]; for the tables behind each row, see references/price-lists-and-markets.md, “Where each API resolves a price list”.
Quick Start Decision Tree
START: You need to set up pricing.
Q1: Do you sell in a single currency with one price per product? → Yes → Use the built-in "default" price variant, in your currency → No → Continue
Q2: Do you need different price *types* (retail vs wholesale, regular vs sale)? → Yes → Create a price variant per type (see Price Variant Patterns below)
Q3: Do you sell in multiple currencies or regions? → Multiple currencies → Create a price variant per currency: a price list cannot change the currency → Regional adjustments → Create Markets + Price Lists (see Markets & Price Lists below)
Q4: Do you need temporary discounts, coupon codes, or "buy X get Y" deals? → Yes → Set up Promotions (see Promotions below)
Q5: Do you have customer-specific pricing (B2B agreements, VIP tiers)? → Yes → Use Price Lists targeted at the customer (see Contract prices below)A negotiated price is a price list, not a price variant. Price variants are price types — list, recommended, wholesale, one per currency — shared by the whole catalogue. Modelling one per customer looks tempting for B2B and then collapses: every new account needs a new variant on every product, and the storefront has to know which variant to ask for. Put the agreement in a price list aimed at that customer instead, and keep the tiers on the underlying variant. See references/price-lists-and-markets.md, “Contract prices”.
Price Variants
Price variants are global definitions — they define the types of prices available across your entire catalogue. Every product variant can then have a value for each price variant.
Key Concepts
- Name: Human-readable (e.g. “US Dollar Retail”)
- Identifier: API-safe, lowercase (e.g.
usd-retail) - Currency: ISO 4217 code (e.g.
USD,EUR,NOK) - A single price variant = one currency. For multi-currency, create separate variants.
The Default Price Variant
Every Crystallize tenant comes with a default price variant. It must always exist — it cannot be deleted.
Best practice: give it a display name that matches your primary use case. The identifier stays default for good: updatePriceVariant takes name, currency and tierConfig and no identifier, and deletePriceVariant refuses default. So do not plan a retail identifier for it; every API call keeps saying default. Set its currency too: it is created without one and answers the tenant’s default currency (EUR on a fresh tenant). Make default your primary currency’s price rather than adding a nok variant next to it, or you carry two copies of the same price.
| Business Type | Name default |
Currency | Rationale |
|---|---|---|---|
| B2C single market | “Retail” | Your main currency | The standard consumer price |
| B2C multi-market | “Retail” (main market) | Main market currency | The primary market’s retail price |
| B2B single market | “B2B” or “Wholesale” | Your main currency | Your main B2B list price |
| B2B + B2C | “Retail” (main market) | Main market currency | Retail is the most common base |
default is what a cart selects when selectedVariantIdentifier is not sent, and what the Catalogue API’s price answers without an identifier. So it should represent your most common, primary price type for your main market. It is not a fallback for a missing price: see Pricing a Cart.
Naming Conventions
Use clear, consistent names that encode purpose and currency:
| Pattern | Example Identifier | Example Name | Currency |
|---|---|---|---|
| Single market | default |
Default | USD |
| Currency-based | usd, eur, nok |
US Dollar, Euro, Norwegian Krone | respective |
| Purpose-based | retail, sales, b2b |
Retail, Sales, B2B | same |
| Combined | usd-retail, eur-b2b |
USD Retail, EUR B2B | respective |
Recommended Patterns by Business Type
In the patterns below, retail stands for the primary price type. That is either the default variant named “Retail”, in which case every API call still says default, or a retail variant you created alongside it.
Simple B2C (single market)
Price Variants: └── default (USD) — The only price, used everywhereWhen: Single-country store, one currency, no B2B. Start here and add complexity later.
B2C with Sales Pricing (single market)
Price Variants: ├── retail (USD) — The standard price / compare-at price ("was" price) └── sales (USD) — The marked-down selling price ("now" price)When: You show was/now or strikethrough pricing. Retail is the reference price — the “compare at” price displayed crossed out. Sales is the actual selling price. When no sale is active, the storefront falls back to the Retail price (Sales is left empty or equal to Retail).
Key rule: Retail is always set. Sales is only set when the product is on sale. The storefront checks: if Sales exists and is lower than Retail → show strikethrough. Otherwise → show Retail as the current price. The cart needs the same rule spelled out in its context: see Pricing a Cart.
B2C Per-Market (the most typical B2C pattern)
Price Variants: ├── retail (USD) — US retail (the default variant, named "Retail") ├── sales (USD) — US sales / marked-down price ├── retail-eur (EUR) — EU retail ├── sales-eur (EUR) — EU sales ├── retail-gbp (GBP) — UK retail └── sales-gbp (GBP) — UK salesWhen: Multi-market B2C with was/now pricing per market. Each market gets a Retail + Sales pair. The default variant, named “Retail”, serves the primary market. Secondary markets use retail-{currency} / sales-{currency} suffixes.
Resolution per market:
- Primary market (US): Check
sales→ fall back toretail - EU market: Check
sales-eur→ fall back toretail-eur - UK market: Check
sales-gbp→ fall back toretail-gbp
Price Lists can further override any of these per market.
B2C Multi-Currency (no sales pricing)
Price Variants: ├── usd (USD) — US market price ├── eur (EUR) — European market price └── gbp (GBP) — UK market priceWhen: You sell internationally with manually set prices per currency but don’t show was/now pricing. Simpler than the retail/sales pattern.
B2C + B2B (single currency)
Price Variants: ├── retail (USD) — Consumer price / compare-at reference ├── sales (USD) — Consumer sale price (when on sale) └── b2b (USD) — Wholesale/business priceWhen: You serve both consumers and business customers in the same currency. B2B customers typically don’t see sales pricing — they have fixed contract rates.
B2C + B2B Multi-Currency
Price Variants: ├── retail (USD) — US consumer price (default, named "Retail") ├── sales (USD) — US consumer sale price ├── b2b (USD) — US wholesale price ├── retail-eur (EUR) — EU consumer price ├── sales-eur (EUR) — EU consumer sale price ├── b2b-eur (EUR) — EU wholesale price └── ...per additional marketWhen: International B2B+B2C. Each market gets a retail/sales pair for consumers plus a B2B variant. The most complex but most flexible setup.
Membership / Loyalty Tiers
Price Variants: ├── retail (USD) — Standard consumer price ├── members (USD) — Loyalty program price └── vip (USD) — Top-tier customer priceWhen: You have tiered customer programmes. Often combined with Price Lists for more granular control.
How Many Price Variants?
Guidelines:
- Start minimal — You can always add more. Begin with 1–2 and expand when the business requires it.
- Avoid explosion — 10+ variants is a warning sign. Use Price Lists for market-specific overrides instead.
- One per purpose × currency — If you have 3 currencies and 2 purposes (retail + B2B), that’s 6 variants.
- Don’t duplicate what Price Lists do — Price variants are for structurally different price types. Regional adjustments belong in Price Lists.
| Business Complexity | Typical Count | Variants |
|---|---|---|
| Simple single-market | 1 | default |
| B2C with sales pricing | 2 | retail + sales |
| Multi-currency B2C | 2–5 | One per currency |
| B2C + B2B single currency | 2–3 | retail + sales + b2b |
| Enterprise multi-market | 4–8 | Purpose × currency |
Common Mistakes
- Creating a variant per country — Use Price Lists for regional adjustments instead
- Leaving “default” named as “default” — Always set its display name to reflect its purpose (e.g. “Retail” for B2C, “B2B” for B2B). The name “default” tells nobody what the price represents.
- Confusing retail and sales — Retail is the reference/compare-at price (always set). Sales is the marked-down price (only set during a sale). The storefront falls back to Retail when Sales is empty.
- Using promotions when you need persistent sales pricing — Promotions are for cart-level, time-limited campaigns. If you always show a was/now price on the product page, use a
salesprice variant instead. - Inconsistent naming — Pick a convention (
{purpose}-{currency}or{purpose}) and stick with it across all variants - No currency suffix for secondary markets — When multi-currency, primary market variants can be just
retail/sales, but secondary markets should include a currency suffix:retail-eur,sales-eur - Too many variants — 10+ variants is a red flag. Use Price Lists for customer-specific or regional fine-tuning instead of creating more variants
Price Lists
Price lists override or adjust prices for specific contexts. They sit between variants and promotions in the hierarchy.
When to Use Price Lists (not Price Variants)
| Scenario | Use Price Variant? | Use Price List? |
|---|---|---|
| USD vs EUR base prices | ✅ Yes | No |
| B2B vs Retail price type | ✅ Yes | No |
| “Norway gets 10% less than global EUR” | No | ✅ Yes |
| “VIP customers get special prices” | No | ✅ Yes |
| “Black Friday EU pricing” | No | ✅ Yes |
| “Wholesale customer X negotiated rate” | No | ✅ Yes |
Price List Configuration
Each price list can:
- Target specific price variants (e.g. only adjust B2B prices)
- Apply to all or specific products (by drag-and-drop or bulk selection)
- Adjust by: percentage, relative value, or absolute price
- Have a time period: start/end dates for seasonal campaigns
- Be scoped to: everyone, a market, or individual customers (organisations reach their people). Customer groups are accepted by the input but do not work today: see below
Recommended Price List Patterns
Regional Adjustments
Price Lists: ├── "EU Retail" — Applies to: eur-retail variant, Market: EU ├── "US Retail" — Applies to: usd-retail variant, Market: US └── "Nordic B2B" — Applies to: eur-b2b variant, Market: NordicsCustomer-Specific B2B
Price Lists: ├── "Wholesale Tier 1" — 15% off B2B variant, Market: wholesale-tier-1 ├── "Wholesale Tier 2" — 25% off B2B variant, Market: wholesale-tier-2 └── "Acme Corp Agreement" — 12% off B2B variant, Customer: acme-corp (the organisation)Tiers are markets because price lists cannot target customer groups: createPriceList answers CustomerGroupNotFoundError (or NotFoundError) for a group that exists, seen on four tenants. The storefront then sends the tier’s market in context.price.markets; a market’s customerIdentifiers do not put a customer’s cart in it. A tier market is public in Discovery, so it suits published tiers, not confidential terms. Keep an agreement a PERCENTAGE list so the variant’s volume tiers survive, and send the whole SKU set on every updatePriceList: see references/price-lists-and-markets.md, “Price lists that work”.
Seasonal Campaigns
Price Lists: ├── "Summer Sale EU" — 20% off retail, Market: EU, Period: Jun–Aug └── "Black Friday Global" — Specific prices, Period: Nov 25–28Markets
Markets define selling contexts. They group together the rules for who gets which prices, promotions, and configurations. A market is only a name and an identifier: it holds no currency, tax or price of its own, and a price list cannot change the currency of the price variant it adjusts.
What Markets Represent
A market can be:
- A country (Norway, Sweden, Germany)
- A region (EU, Nordics, North America)
- A segment (Norway B2B, Norway Retail)
- A channel (Online, In-Store, Marketplace)
Market Setup Recommendations
Simple: No Market
A tenant starts with no markets, and a single selling context needs none: a cart’s markets defaults to [], and a price list aimed at EVERYONE applies regardless.
Multi-Region
Markets: ├── "us" — United States ├── "eu" — European Union ├── "uk" — United Kingdom └── "row" — Rest of World (there is no automatic fallback: the storefront sends it)B2B + B2C per Region
Markets: ├── "eu-retail" — EU consumers ├── "eu-b2b" — EU businesses ├── "us-retail" — US consumers └── "us-b2b" — US businessesHow Markets Connect to Pricing
Market ──→ Price Lists (which prices apply) ──→ Promotions (which campaigns apply) ──→ Checkout context (resolved at purchase time)Markets are set in the checkout context — at cart/checkout time, context.price.markets determines which price lists and promotions are evaluated. Set them on the server from the signed-in session: whoever sends a market gets its prices.
Promotions
Promotions apply at the cart level — they only become visible during checkout, not on product pages. This keeps your base pricing clean while enabling flexible campaigns. They are managed in the app under Special prices, or through the Shop API’s cart/admin endpoint: see references/promotions.md.
Promotion Mechanisms
The app and the API use different names. “Fixed” means a different thing in each:
| In the app | API mechanism.type |
What value is |
Example |
|---|---|---|---|
| Percentage | Percentage |
% off the price | “20% off all shoes” |
| Cart | Fixed |
Amount off, spread across the targeted lines | “$10 off orders over $50”, “$20 off the cart” |
| Fixed | DynamicFixed |
New unit price, applied when lower than current | “All T-shirts at $15” |
| X for Y | XforY |
0: X and Y go in triggers.xForY |
“Buy 3, pay for 2” |
Promotion Components
- Mechanism — How the discount is calculated (see above)
- Period (optional) — When the promotion is active (one or more start/end windows)
- Trigger (optional) — What activates it (e.g. “3 items of product X in cart”)
- Target (optional) — Which products are affected (if empty, applies to all)
- Limitations — Cumulative rules, max usage, per-customer limits
When to Use Promotions vs Price Lists
| Scenario | Promotions | Price Lists |
|---|---|---|
| Time-limited discounts | ✅ | Possible but less ideal |
| Coupon codes | ✅ | ❌ |
| “Buy X get Y” deals | ✅ | ❌ |
| Permanent regional pricing | ❌ | ✅ |
| Customer-specific agreements | ❌ | ✅ |
| Free shipping thresholds | ✅ | ❌ |
Consultation Approach
When advising on pricing setup, ask these discovery questions:
Discovery Questions
-
Business Model
- “Is this B2C, B2B, or both?”
- “Do you have tiered pricing for different customer groups?”
-
Geographic Scope
- “Which markets/countries do you sell to?”
- “Do you need separate currencies, or do you use a single currency?”
- “Are prices manually set per region, or derived from a base price?”
-
Sales Strategy
- “Do you run sales or show ‘was/now’ pricing?”
- “Do you use coupon codes or promotional campaigns?”
- “Do you have seasonal pricing patterns?”
-
Customer Relationships
- “Do you have wholesale/B2B customers with negotiated rates?”
- “Do you have a loyalty or membership programme?”
- “Do individual customers have unique pricing agreements?”
-
Complexity Assessment
- “How many products are in your catalogue?”
- “How often do prices change?”
- “Who manages pricing? (technical team vs merchandisers)”
Response Framework
After discovery, structure your recommendation as:
- Price Variants — The base layer: how many, naming, currencies
- Markets — If multi-region: how to segment
- Price Lists — Regional/customer overrides (if needed)
- Promotions — Campaign strategy (if needed)
- Migration path — Start simple, grow into complexity
Always recommend starting with the minimum viable setup and adding layers as the business requires them.
Pricing a Cart
The Shop API hydrate mutation prices a cart from input.context.price. The storefront sends it on every hydrate: an omitted field goes back to its default, it does not keep the previous value.
| Input | Default | Effect |
|---|---|---|
customer on the cart (hydrate or setCustomer) |
guest | Customer-targeted price lists, inherited from parent customers: a person under an organisation gets its list |
selectedVariantIdentifier |
default |
The price variant that sets the price |
fallbackVariantIdentifiers |
none | Tried in order when the selected variant has no price for the SKU: campaign then default prices campaign-or-list |
compareAtVariantIdentifier |
none | The “was” price (or the RRP next to a B2B price), read before price lists. A gap to the selected price lands in discounts |
markets |
[] |
Which market-targeted price lists and promotions can match. Not read from the market’s customerIdentifiers |
customerGroups |
[] |
The same for groups. Not read from the customer record |
voucherCodes |
[] |
A list of coupon codes. voucherCode is deprecated. Check one with validateVoucher(voucher) |
currency |
eur |
A label, and what triggers.currencies tests. It selects no variant and converts nothing |
decimals |
0 |
Rounds every amount returned. Left at 0, 39.99 comes back as 40. Send 4, see below |
pricesHaveTaxesIncludedInCrystallize |
false |
Whether the stored price is gross, see below |
taxRate |
none | A fraction (0.25, not 25), overrides the product’s tax group |
discountOnNetPrices |
false |
Promotions and minValue work on net instead of gross |
A SKU with no value on the selected variant or on any fallback silently takes its first price variant, possibly in another currency, and a variant with no price at all hydrates at 0, not as an error.
compareAtVariantIdentifierfalls back too. When the SKU has no value on the compare-at variant, the cart compares with its first variant: a $64 line without ausd-beforeprice reported a 1,172 “discount” (90 %) against the NOK price. Send it only for SKUs that have a before-price.- Ask for
decimals: 4and round for display only, half up. With 2 decimals, a percentage list on a small unit price drifts a cent between the cart and the product page. The Shop API rounds half up (11.70 × 0.85 = 9.945 → 9.95), whileMath.round(x * 100) / 100gives 9.94: round viatoFixed(4)first. - A cart line’s
priceis the line total, while order lines carry the unit price. Divide before you compare with a product page. - A PERCENTAGE list must carry every price variant the cart can select. With
campaignselected anddefaultas fallback, a list with a modifier ondefaultonly leaves campaign-priced SKUs at full price.
Was/now in a cart:
context: { price: { selectedVariantIdentifier: "sales" fallbackVariantIdentifiers: ["default"] compareAtVariantIdentifier: "default" currency: "USD" decimals: 4 markets: ["us-retail"] }}A contract price for display without the Catalogue API is a throw-away hydrate on the server: a cart with the signed-in customer and the SKUs on screen, read once, cached per organisation, then remove(id). It answers what the real cart will charge.
Tax & Pricing
Prices in Crystallize are stored as raw numbers — the system does not enforce whether they are tax-inclusive or tax-exclusive. This is a business decision:
- B2C (most of Europe, Australia): Prices typically include VAT. Store gross prices in your variants, and hydrate with
pricesHaveTaxesIncludedInCrystallize: true. - B2B / US B2C: Prices are typically tax-exclusive. Store net prices and leave it at
false, so that gross = price × (1 + rate). - Mixed: Use price variants or price lists to maintain both. For example, EU retail variants hold gross prices while US retail variants hold net prices.
The Shop API calculates the tax. The rate is the first of: taxRate on the cart item, context.price.taxRate (both 0–1), the percentage of the product’s tax group. To use an external tax service, pass its rate as taxRate. The pricing hierarchy (variants → price lists → promotions) resolves the price; tax is applied on top of (or extracted from) that resolved price.
Migration Paths
Start simple and add layers as the business requires them:
| From → to | Add | Keep |
|---|---|---|
| One variant → sales pricing | A sales variant in the same currency, set only on products on sale |
default, with the display name “Retail” |
| One currency → several | A retail-{currency} / sales-{currency} pair per currency, and markets |
The primary market’s variants as they are |
| B2C → B2C + B2B | A b2b variant, a B2B market, price lists per organisation or tier |
The consumer variants |
| Static pricing → campaigns | Promotions for time-limited cart discounts | The variant structure; price lists for lasting adjustments |
Further Reading
- Price Variants Reference — Detailed technical reference for variant setup, reading prices, and volume tiers
- Price Lists & Markets Reference — Price list configuration and market architecture
- Promotions Reference — Promotion types, mechanisms, limitations, and the admin API
Reference Details
Price Lists & Markets Reference
Price lists and markets work together to localize and personalize pricing. Markets define where and who; price lists define what price they get.
Markets
What Markets Are
A market is a named selling context. It groups together the pricing, promotion, and configuration rules that apply when a customer checks out. It holds a name, an identifier and an optional list of customers: no currency, no type, no tax.
Markets are set at checkout time via the cart context — they are not assigned to products directly.
Creating Markets
In the Admin UI:
- Go to Settings → Markets
- Click Add market
- Enter a name (e.g. “Norway B2B”) and identifier (e.g.
norway-b2b) - Click Create market
The identifier is used in the API and checkout context. Choose it carefully — it should be lowercase, hyphenated, and descriptive. It cannot be changed afterwards.
Via PIM API
Markets exist only on the legacy PIM API: the Core API has no market mutation.
mutation CreateMarket { market { create( input: { tenantId: "your-tenant-id", identifier: "eu-retail", name: "EU Retail", customerIdentifiers: [] } ) { identifier name } }}create refuses customerIdentifiers that don’t exist yet (MARKET_INVALID_CUSTOMER_IDENTIFIERS), so seed customers first, then markets, then price lists. Listing customers in customerIdentifiers does not put their carts in that market. Price resolution reads the markets the caller passes, nothing else.
Market Architecture Patterns
By Country
Markets: ├── norway — "Norway" ├── sweden — "Sweden" ├── germany — "Germany" └── us — "United States"By Region
Markets: ├── nordics — "Nordics" (NO, SE, DK, FI) ├── eu — "European Union" ├── uk — "United Kingdom" └── us — "United States"By Segment × Region
Markets: ├── eu-retail — "EU Retail" ├── eu-b2b — "EU B2B" ├── us-retail — "US Retail" └── us-b2b — "US B2B"By Channel
Markets: ├── online — "Online Store" ├── in-store — "Physical Stores" └── marketplace — "Marketplace"How Markets Connect to Checkout
At checkout time, the storefront sets the market in the cart context:
mutation HydrateCart { hydrate( input: { context: { price: { markets: ["eu-retail"], selectedVariantIdentifier: "retail-eur", currency: "EUR", decimals: 2 } } items: [{ sku: "TSHIRT-RED-L", quantity: 1 }] } ) { id items { variant { sku name } price { gross net currency } } total { gross net currency } }}The market selection determines:
- Which price lists are evaluated
- Which promotions apply
It does not determine the currency. The storefront maps its market to a price variant and sends that in selectedVariantIdentifier, with the matching currency: see “Pricing a Cart” in the main pricing guide.
Price Lists
What Price Lists Do
Price lists override or adjust the base price (from price variants) for specific contexts. They answer: “Given this market / customer group / time period, what price should this customer see?” A modifier is a plain number applied to one price variant, so a list keeps that variant’s currency.
Creating Price Lists
In the Admin UI:
- Go to Special Prices → Price Lists
- Click Create price list +
- Configure:
- Name and identifier — e.g. “EU Summer Sale”,
eu-summer-sale - Products — All products, or specific ones (drag-and-drop / bulk select)
- Price variants — Which variant(s) this list adjusts
- Adjustment type — Percentage, relative value, or absolute price
- Period (optional) — Start and end dates
- Target — Everyone, a market, or individual customers (customer groups: see “Contract prices”)
- Name and identifier — e.g. “EU Summer Sale”,
Via Core API
mutation CreatePriceList { createPriceList( input: { identifier: "eu-summer-sale" name: "EU Summer Sale" modifierType: PERCENTAGE priceVariants: [{ identifier: "retail", modifier: -10 }] selectedProductVariants: { type: ALL_SKUS } targetAudience: { type: SOME, marketIdentifiers: ["eu-retail"] } startDate: "2025-06-01T00:00:00Z" endDate: "2025-08-31T23:59:59Z" } ) { ... on PriceList { identifier name } ... on BasicError { errorName message } }}Every part of the input is an object, not a bare identifier:
| Field | Shape |
|---|---|
priceVariants |
[{ identifier, modifier, decimalPlaces? }] — modifier is read according to modifierType |
selectedProductVariants |
{ type: ALL_SKUS | SOME_SKUS, variants?: [{ sku, priceVariants: [{ identifier, modifier }] }] } |
targetAudience |
{ type: EVERYONE | SOME, marketIdentifiers?, customerGroupIdentifiers?, customerIdentifiers? } |
targetAudience.type is required. With SOME, name the audience in one or more of the identifier lists; with EVERYONE, name nobody or the call fails.
There is no ALL selection type — it is ALL_SKUS or SOME_SKUS. ALL_SKUS refuses variants. A list for specific SKUs:
selectedProductVariants: { type: SOME_SKUS variants: [{ sku: "olive-oil-500ml", priceVariants: [{ identifier: "retail", modifier: -15 }] }]}A SKU’s priceVariants overrides the list’s modifier for that SKU, and is optional: a SKU without it takes the list’s. An override only works for a price variant that is also in the list’s own priceVariants, or it is ignored.
createPriceList checks that customers, customer groups, SKUs and price variants exist, but not markets: a misspelled market identifier is accepted and the list never matches.
The legacy PIM API (priceList { create(input: { tenantId, ... }) }) takes the same input shape plus
tenantId. In a mass operation the intent is pricelist/create or pricelist/upsert, with the same
fields at the top level of the operation.
Adjustment Types
| Type | modifierType |
Description | Example |
|---|---|---|---|
| Percentage | PERCENTAGE |
Adjust up or down by % | -10% = 10% discount |
| Relative | RELATIVE |
Add or subtract a fixed amount | -5 = $5 off |
| Absolute | ABSOLUTE |
Set a specific price | 25.00 = exactly $25 |
The app labels ABSOLUTE “Fixed”. A result below 0 is clamped to 0.
Price List Patterns
Regional Price Adjustments
Different prices for different regions, all based on the same variants:
Price Variant: "retail" (EUR) — Base price: €100
Price Lists: ├── "Nordic Retail" → Market: nordics → Adjust: -5% → Final: €95 ├── "Southern EU Retail" → Market: southern-eu → Adjust: +10% → Final: €110 └── "Baltics Retail" → Market: baltics → Adjust: absolute €89 → Final: €89A market selling in pounds needs its own GBP price variant: absolute 89 on this variant is €89.
Customer Tiering
Price Variant: "b2b" (EUR) — Base price: €80
Price Lists: ├── "Wholesale Tier 1" → Market: tier-1 → Adjust: -10% → Final: €72 ├── "Wholesale Tier 2" → Market: tier-2 → Adjust: -20% → Final: €64 └── "Strategic Partner" → Customers: the partner organisations → Adjust: -30% → Final: €56Tiers are markets, not customer groups, because a list cannot target a group today (see “Contract
prices”). The storefront maps the signed-in customer to its tier and sends that market in
context.price.markets; listing customers on the market does not do it. Discovery serves a tier market’s
price to anyone who sends its identifier, so use markets for tiers you would publish anyway, and
customerIdentifiers for terms that are confidential.
Time-Based Campaigns
Price Lists: ├── "Summer Sale 2025" │ Period: Jun 1 – Aug 31 │ Adjust: -25% on retail variant │ Market: all │ └── "Black Friday EU" Period: Nov 25 – Nov 28 Adjust: absolute prices (manually set per product) Market: euIndividual Customer Agreements (B2B)
For B2B customers with negotiated rates:
Price Lists: └── "Acme Corp Agreement" Customer: Acme Corp (organization) Products: Specific items Adjust: absolute prices (per agreement) Period: Jan 1 – Dec 31 (annual renewal)Contract prices
A negotiated B2B price — an institution’s framework agreement, a chain’s terms — is a price list aimed at that customer, not a price variant per customer. Two properties make it work, both measured on a live tenant:
A percentage list applies on top of the price variant’s volume tiers. The list price for one SKU had
tiers 522 / 496 (from 10) / 470 (from 50) NOK. With a −18.0077 % list for the customer, the Catalogue API
answered 428 / 406.68 / 385.36 for count: 1 | 10 | 50 — each tier, less the percentage.
query ContractPrice($skus: [String!]!, $c: [String!]) { productVariants(skus: $skus, language: "en") { sku priceVariant(identifier: "nok") { price # the list price priceFor(count: 10, customerIdentifiers: $c) { price # what this customer pays for 10 identifier # which price list applied modifier modifierType } } }}So keep the tiers on the variant and make the contract a PERCENTAGE list. An ABSOLUTE list sets a
flat price and the tiers are gone — that is the only case where “price lists have no tiers” holds.
A list aimed at a customer reaches that customer’s children. With
targetAudience: { type: SOME, customerIdentifiers: ["acme-university"] }, the list resolved for a person whose
parents include the institution (verified: a person identifier answered the institution’s contract, with
the list’s identifier in priceFor), and for a department in between. One list per organisation is enough;
you do not need customer groups, and you do not need the customer’s own price variant.
Customer groups are a dead end here for now. A group created with Core createCustomerGroup is listed
by customerGroups, but createPriceList(targetAudience: { customerGroupIdentifiers }) answers
CustomerGroupNotFoundError (or NotFoundError — Entity not found: [object Object]), also after a wait —
seen on four tenants. Target the organisations by customerIdentifiers, or use markets. One build did get a
group list to apply in a cart that sent context.price.customerGroups, which is how the cart side works if
the list exists: the group is read from the context, never from the customer record. Use customer groups as
folders for customers, not as price-list targets.
Where each API resolves a price list
This is the table to read before designing a B2B storefront, because the three APIs do not agree:
| API | Resolves a list for | How |
|---|---|---|
| Discovery | markets only — there is no customer context | <variant>PriceFor(marketIdentifiers:), <variant>BestPriceListFor(…) |
| Catalogue | customer, customer group or market | priceVariant(identifier) { priceFor(count, customerIdentifiers, customerGroupIdentifiers, marketIdentifiers) { price identifier modifier modifierType } } |
| Shop API | the cart’s customer and its parents, plus context.price.markets and customerGroups |
hydrate prices the lines |
customerIdentifiers is a list ([String!]), not a single string.
A storefront that lists products from Discovery therefore cannot show a contract price from that query
alone: <variant>BestPriceList comes back null for a customer-targeted list, since Discovery has no idea
who is asking. Two server-side ways to show it, both cached per organisation:
- A Shop API price check.
hydratea throw-away cart with the signed-in customer (customer: { identifier, isGuest: false }) and the SKUs on screen, and read the line prices. No Catalogue access needed, and the numbers are by definition what checkout charges. - The Catalogue API
priceFor(customerIdentifiers:), orpriceList(identifier) { productVariants }for the whole list at once. It resolves any customer, so it also serves seller tools.
Apply the result where you render prices, behind a <Suspense> boundary so the rest of the page stays
cached for everyone (a short cache, a few seconds, lets a new list show quickly). The cart then agrees by
itself. Do not read price lists from Core for this: Core is not a storefront API. See [[storefront]].
Note that every price variant generates its own Discovery fields — nokPrice(count), nokPriceTiers,
nokPriceFor(marketIdentifiers, count), nokBestPriceListFor(…), plus the filter/facet/sort field
price_nok. A variant with no price for a product answers null, so filters: { price_x: { exists: true } }
is a usable “is this on that price variant” filter. Discovery is open by default, and when it is open,
everything it serves is public: anyone who knows a field name can read any price variant, and anyone who
knows a market identifier can read that market’s list with <variant>PriceFor(marketIdentifiers) and its
modifier with <variant>BestPriceListFor. Aiming an agreement at a market of its own (avtale-<org>) does
make it show in Discovery about 8 s after createPriceList, but it publishes the terms. Keep confidential
terms on customerIdentifiers and read them server-side as above.
Market prices are expensive at volume. <variant>PriceFor(marketIdentifiers) added about 1.4 s per 100
products (about 270 variants each) per market; four markets on 15,500 variants took 21 s and 13 MB. And
<variant>PriceForEveryone makes Discovery evaluate every price list per variant: 250 products took 7–8 s
per page, and under a 4,000-page build it answered “Response Error”. Ask for market prices only for the SKUs
on screen, never in candidate pools or prerender-wide listings. For a B2C sale, put the selling price on the
variant and the before-price on its own price variant, read both from priceVariants, and keep lists for
other discounts.
Working with big lists
- One
createPriceListcall can carry a whole catalogue, but not always. A list with 2,211 SKUs went in as a singleSOME_SKUScall on one tenant; about 2,200 SKUs on another answered HTTP 413 “Entity too large” as plain text, not JSON. If you see 413, split above about 500 SKUs into several disjoint lists with the same audience: Discovery and the cart resolve them all.updatePriceListreplaces the SKU selection whole, so send the complete set every time. To change part of a list, use the legacy PIM API’spriceList { upsertSelectedProductVariants(tenantId, identifier, variants) removeSelectedProductVariants(tenantId, identifier, variants: [sku]) }, or the mass operation intentspricelist/selectedProductVariants/upsertand.../remove. productVariants(skus:)on the Catalogue API takes at most 150 SKUs (TOO_MANY_SKUS_PROVIDED), andpriceForis slow — about 2 s per 150 SKUs, and 8 s for 2,211 SKUs read five at a time. Reading the list itself is much faster (3.5 s for 2,211):priceList(identifier) { productVariants(language, first) { edges { node { sku priceVariant(identifier) { priceList(identifier) { modifier modifierType } } } } } }. ItspageInfo.hasNextPagestaystruepast the last SKU, so stop on an empty page.decimalPlacesrounds the result, to 2 by default, but0is lost on most writes.createPriceList,updatePriceListand mass operations drop a0and fall back to 2:decimalPlaces: 0with −18.05 % on 698 NOK answered 572.01.decimalPlaces: 1is honoured, and the legacy PIM API keeps a0. Only the list-level entry counts, not one on a SKU. Otherwise round for display in the storefront, and set the cart’scontext.price.decimalsper currency.
Resolution Priority
There is no priority and no notion of the most specific list. Every list that matches competes, and the lowest resulting price wins. A list matches when all of these hold:
- Active period — Now is between its
startDateandendDate, where set - Product scope —
ALL_SKUS, or the SKU is among itsvariants - Price variant — It has a modifier for the price variant being read
- Audience —
EVERYONE, or at least one of its markets, customers or customer groups was passed. These are OR, not AND: a list aimed at a market and a customer group matches on either
So an EVERYONE campaign at −30 % beats a customer’s −20 % contract, and a +10 % list only applies if no other matching list is lower. The base price itself does not compete: a single matching +10 % list does raise the price.
Price lists that work
What the B2B builds settled on, on top of the rules above:
- Target organisations by
customerIdentifiers, or markets. Not customer groups (see “Contract prices”). A list on the organisation reaches its departments and people in the Catalogue and in the cart. - Base discount plus exceptions is two lists on one audience: an
ALL_SKUSlist for the base and aSOME_SKUSlist naming only the SKUs whose rule differs. Observed: −24 %SOME_SKUSover −18 %ALL_SKUSfor the named SKUs. That is the lowest price winning, so an exception can only deepen the base discount; a shallower exception needs the base list to leave those SKUs out. - A
PERCENTAGElist keeps the variant’s volume tiers; anABSOLUTElist has none. Make agreements percentages (see “Contract prices”). - Put the modifier on every price variant the cart can select. A cart that selects
campaignand falls back todefaultneeds the modifier on both, inpriceVariantsand per SKU, or campaign-priced SKUs stay at full price. - Scoped agreements (“−6 % on feed and parts”) are
SOME_SKUSlists built from Discovery. A list has no selection by folder or topic: resolve the scope to SKUs with a Discovery query (parentPaths,shape,topics) and send the full set. A rerun after the catalogue changes sends the whole set again, becauseupdatePriceListreplaces it. - Check the result in a cart for one person under the organisation and for a guest: the person gets the list, the guest the list price.
Best Practices
- Name descriptively — Include the target context in the name: “EU B2B Q1 2025” not “Price List 3”
- Limit overlap — Avoid having many price lists targeting the same market+variant combination
- Use periods — Even for “permanent” adjustments, set a far-future end date so they can be reviewed
- Bulk select products — Use the Nerdy view on a folder to quickly add many variants to a list
- Test the checkout — Always verify the resolved price in the cart to ensure the expected list wins
Anti-Patterns
- ❌ Creating a price list per product (use base variant prices instead)
- ❌ Using price lists for structural price differences (use separate price variants)
- ❌ A price variant per customer for B2B agreements (target a price list at the customer instead)
- ❌ Overlapping lists with conflicting adjustments on the same scope
- ❌ Forgetting to set an end date on campaign lists (they stay active forever)
Price Variants Reference
Price variants are global definitions that determine the types of prices available across your entire Crystallize catalogue. Each product variant can have a value for every defined price variant.
How Price Variants Work
- Defined globally in Settings → Price Variants in the Crystallize admin
- Once created, available on every product variant in the catalogue
- Each variant has: name, identifier (API key), and currency
- Editors set a price value per variant on each product variant
Variant vs Product Variant — Terminology
Don’t confuse:
- Price variant = a global pricing type (e.g. “Retail USD”) — defined in tenant settings
- Product variant = a specific SKU of a product (e.g. “Red, Size L”) — defined on the product
A product variant can have values for multiple price variants:
Product: "Classic T-Shirt" └── Product Variant: "Red, Size L" (SKU: TSHIRT-RED-L) ├── Price Variant "retail" (USD): $39.99 ← always set (reference / "was" price) ├── Price Variant "sales" (USD): $29.99 ← only set when on sale ("now" price) └── Price Variant "b2b" (USD): $18.00Creating Price Variants
In the Admin UI
- Go to Settings → Price Variants
- Click Add price variant +
- Set:
- Name — Human-readable (e.g. “US Dollar Retail”)
- Identifier — Lowercase, hyphenated (e.g.
usd-retail). Used in the API. Cannot be changed after creation. - Currency — ISO 4217 code (e.g.
USD,EUR,NOK,GBP,SEK,DKK,JPY,CHF)
- Click Create variant
Via Core API
mutation { createPriceVariant(input: { identifier: "eur-retail", name: "EUR Retail", currency: "EUR" }) { ... on PriceVariant { identifier name currency } ... on BasicError { errorName message } }}updatePriceVariant(identifier:, input:) changes name, currency and tierConfig, never the identifier. deletePriceVariant(identifier:) refuses default. The legacy PIM API equivalent is priceVariant { create(input: { tenantId, ... }) }.
Mass operations cannot create a price variant: there is no such intent. Create them first, then reference them from priceVariants in a product or price list operation.
Setting Prices on Products
Via Mass Operations (product upsert)
Prices are set inside the variants array of a product upsert operation:
{ "intent": "product/upsert", "language": "en", "name": "Classic T-Shirt", "shapeIdentifier": "product", "resourceIdentifier": "TSHIRT-001", "vatTypeId": "<vat type id>", "tree": { "parentId": "<folder id>" }, "variants": [ { "name": "Classic T-Shirt — Red L", "sku": "TSHIRT-RED-L", "isDefault": true, "priceVariants": [ { "identifier": "retail", "price": 39.99 }, { "identifier": "sales", "price": 29.99 }, { "identifier": "b2b", "price": 18.0 } ] } ]}Via Core API Mutation
mutation SetVariantPrice { modifyProductVariantPrice(sku: "TSHIRT-RED-L", priceVariantIdentifier: "retail", price: 39.99) { ... on ProductPriceVariant { identifier price } ... on BasicError { errorName message } }}It sets one price at a time and leaves the rest of the variant alone. updateProductVariant also takes priceVariants, but rewrites more of the variant: see [[mutation]] before using it for a price change.
Negative prices are legal (from −1e9 to 1e9), and zero too: useful for option deltas against a base
configuration, such as a deduction for a simpler brake. Write them with the variant (product/upsert,
updateProductVariant): product/variant/price/modify has a minimum of 1.
Querying Prices
Discovery API
priceVariants is a JSON hash keyed by identifier, not a list of objects: select it without sub-fields. Each price variant also generates its own field, <identifier>Price, with a hyphenated identifier in camelCase (usd-retail gives usdRetailPrice, and price_usdRetail to filter and sort).
query { browse { product(language: en) { hits { name defaultVariant { defaultPrice # the price variant whose identifier is `default` salesPrice # null when `sales` has no value for this SKU priceVariants # { "default": { "price": 39.99, "currency": "USD" }, ... } } } } }}Getting a Specific Price Variant
query { browse { product(language: en, path: "/shop/t-shirts/classic") { hits { name defaultVariant { retail: priceVariants(key: "default") # { "price": 39.99, "currency": "USD" } } } } }}Every Discovery price field
Each price variant generates the same set of fields on every product variant type, here for nok. The
generic fields take the identifier as an argument instead. Checked by introspection on a live tenant,
2026-11-12:
| Field | Answers |
|---|---|
nokPrice(count) |
The variant’s price, the tier price for count; null when not set |
nokPriceTierType, nokPriceTiers { threshold price } |
The volume or graduated ladder; null without one |
nokPriceFor(marketIdentifiers, count) |
The lowest price after the lists aimed at those markets |
nokPriceForEveryone(count) |
The same for EVERYONE lists. Slow at volume |
nokBestPriceList, …ForEveryone, …For(marketIdentifiers) |
The winning PriceList { identifier name modifier modifierType } |
priceVariants(key) |
The hash of every variant, { price, currency } each |
priceVariantFor(identifier, marketIdentifiers, count) |
nokPriceFor with the identifier as an argument |
priceVariantForEveryone(identifier, count) |
nokPriceForEveryone likewise |
bestPriceList(identifier), bestPriceListFor(…), …ForEveryone |
The winning list, likewise |
price_nok (in filters, sorting, facets) |
The filter, sort and facet field; exists: true means “has a nok price” |
None of them takes a customer: Discovery resolves markets only. For a customer’s price, see “Which price,
from which API, for whom” in the main pricing guide. A new price variant shows up in the priceVariants
hash without a re-ignite.
Catalogue API
Here priceVariants is a list, which is what the helpers below take.
query { productVariants(skus: ["TSHIRT-RED-L"], language: "en") { sku priceVariants { identifier name price currency } }}In your frontend, filter by identifier:
const retailPrice = variant.priceVariants.find((pv) => pv.identifier === "retail");const salesPrice = variant.priceVariants.find((pv) => pv.identifier === "sales");Volume and Graduated Tiers
A price on a product variant can carry a quantity ladder instead of a flat value. With tiers 1: 100 and 10: 90:
tierType |
15 units |
|---|---|
volume |
Every unit at the matched tier: 15 × 90 |
graduated |
Each unit at its own tier: 9 × 100 + 6 × 90, returned as an average unit price |
mutation SetTiers { modifyProductVariantPrice( sku: "TSHIRT-RED-L" priceVariantIdentifier: "retail" tierType: volume tiers: [{ threshold: 1, price: 100 }, { threshold: 10, price: 90 }, { threshold: 50, price: 80 }] ) { ... on ProductPriceVariant { identifier tierType } ... on BasicError { errorName message } }}A ladder is refused unless the first threshold is 1, thresholds strictly increase, every price is above 0, and tierType is set. A price sent with it must equal the first tier’s price.
| Read from | How |
|---|---|
| Catalogue | priceVariant(identifier) { tierType tiers { threshold price } price(count: 10) priceFor(count: 10, ...) { price } } |
| Discovery | retailPrice(count: 10), retailPriceTierType, retailPriceTiers { threshold price }, retailPriceFor(count: 10, marketIdentifiers: [...]) |
| Cart | Automatic from each line’s quantity, per SKU. price { tierType resolvedTier { threshold price } tiers { threshold price } } on the line |
tierConfig on the price variant (policy: disabled | optional | required, allowFreeform, presets) shapes the tier editor in the app. API writes to a product variant are not checked against it.
In a mass operation, tierType and tiers go on priceVariants[] of the product/* and product/variant/* intents, with a few parsing caveats listed in [[mass-operations]]. The MCP mass-operation tools refuse both keys, so a file with tiers needs the CLI or the raw API. product/variant/price/modify is flat only, with a minimum of 1.
Naming Convention Guide
Rules
- Identifiers are permanent — Choose carefully; they are used in API queries and cannot be renamed
- Use lowercase with hyphens —
usd-retail, notUSD_RetailorusdRetail. The app only accepts lowercase letters, numbers,-and_ - Encode purpose and/or currency — Make identifiers self-documenting
- Be consistent — Pick one pattern and follow it across all variants
Patterns
| Pattern | When to Use | Examples |
|---|---|---|
{currency} |
Single purpose, multi-currency | usd, eur, nok |
{purpose} |
Single currency, multi-purpose | retail, b2b, members |
{currency}-{purpose} |
Multi-currency AND multi-purpose | usd-retail, eur-b2b |
default |
Single-market, single-price | default |
Anti-Patterns
- ❌
price1,price2— Not descriptive - ❌
USD_Retail_Price— Too verbose, wrong casing - ❌
norway,sweden— Countries are markets, not price types. Use Price Lists for regional adjustments - ❌
christmas-sale— Temporary campaigns should use Promotions, not permanent variants
Common Scenarios
“Was / Now” Pricing Display
Set up two variants following the convention from the main pricing guide:
retail— The reference price, always set. Displayed as the “was” / compare-at / strikethrough price when a sale is active.sales— The marked-down selling price, only set when the product is on sale. This is the “now” price.
The storefront checks: if sales exists and is lower than retail, show strikethrough. Otherwise, show retail as the current price. In a cart, the same rule is selectedVariantIdentifier, fallbackVariantIdentifiers and compareAtVariantIdentifier: see “Pricing a Cart” in the main pricing guide.
function PriceDisplay({ priceVariants }) { const retail = priceVariants.find((p) => p.identifier === "retail"); const sales = priceVariants.find((p) => p.identifier === "sales");
const onSale = sales && retail && sales.price < retail.price;
return ( <div> {onSale && <span className="line-through text-gray-400">{retail.price}</span>} <span className={onSale ? "text-red-600 font-bold" : ""}> {onSale ? sales.price : retail.price} {retail.currency} </span> </div> );}Multi-Currency Store
Create one variant per currency, resolve which to show based on the customer’s market or preference:
function getDisplayPrice(priceVariants, customerCurrency = "USD") { return ( priceVariants.find((pv) => pv.currency === customerCurrency) || priceVariants.find((pv) => pv.identifier === "default") || priceVariants[0] );}B2B + B2C on Same Store
Use the checkout context / logged-in customer group to determine which variant to display:
function getPrice(priceVariants, isB2B = false) { const identifier = isB2B ? "b2b" : "retail"; return priceVariants.find((pv) => pv.identifier === identifier);}Promotions Reference
Promotions are the final layer in the Crystallize pricing hierarchy. They apply at the cart level — they only become visible during checkout, not on product pages. This keeps your base catalogue pricing clean while enabling flexible campaign mechanics.
How Promotions Work
Unlike price variants and price lists (which set product-level prices), promotions evaluate cart contents at checkout time and apply discounts or adjustments based on rules you define.
Customer browses → Sees base price (from variant + applicable price list)Customer adds items → Cart is hydratedCart is evaluated → Promotions engine checks triggers, targets, limitationsCheckout displays → Adjusted prices with promotion appliedPromotion Components
Every promotion is built from these parts:
1. Mechanism (required)
How the discount is calculated. The app and the API name these differently, and “Fixed” is a different mechanism in each:
| In the app | API mechanism.type |
value |
Use Case |
|---|---|---|---|
| Percentage | Percentage |
% off the line price | “20% off all shoes” |
| Cart | Fixed |
Amount off, spread across targeted lines | “$10 off when you spend $50+”, “$20 off the entire order” |
| Fixed | DynamicFixed |
New unit price, applied when lower | “All T-shirts at $15” |
| X for Y | XforY |
0, with triggers.xForY: [x, y] |
“Buy 3, pay for 2” (cheapest items are free) |
XforY refuses targets: its triggers choose the items. A cart discount is simply Fixed with no targets. The amount of Fixed and DynamicFixed has no currency of its own, so on a multi-currency tenant restrict them with triggers.currencies, or 10 comes off in every currency.
2. Period (optional)
When the promotion is active:
- Start date — When the promotion begins
- End date — When it expires
- Multiple periods — For recurring campaigns (e.g. every December). There is no recurrence rule: list each window, each with both
startandend - No period — Active immediately and indefinitely. An empty
periods: []is different: the promotion never runs
3. Trigger (optional)
What conditions must be met for the promotion to activate:
- Product-based — “3 of product X in the cart” (
skus,productIds,paths,topics) - Quantity-based — “At least 5 items total” (
minQuantity) - Value-based — “Cart total above $100” (
minValue, on gross unlessdiscountOnNetPrices) - Coupon code — “Enter SUMMER20 at checkout” (
codes, exact match againstcontext.price.voucherCodes) - Audience —
markets,currencies,customers(identifier or email),customerGroups(matched againstcontext.price.customerGroups, not the customer record) - Exclusions —
exclusionstakes the same lists, to carve out SKUs, markets, customers or groups - No trigger — Applies to every cart automatically
Different kinds of trigger combine with AND, and values inside one kind with OR. Inside the product lists it is OR too: skus: ["A", "B"] means A or B, and “A and B both in the cart” cannot be expressed. minQuantity and minValue count only the lines matching the product lists, or all lines when there are none. paths and topics match by prefix, so a folder path covers what is under it.
4. Target (optional)
Which product variants the promotion affects:
- Specific products — Only these are discounted:
skus,productIds,paths,topics, withexclusionsto carve some out - All products — Entire catalogue
- No target — Same as all products
Note: Trigger and target can be the same (“Buy 2 of X, get 1 of X free”) or different (“Buy shoes, get 50% off socks”).
5. Limitations
Control how the promotion behaves:
| Limitation | API field | Description | Example |
|---|---|---|---|
| Cumulative | cumulativeDiscount |
Can combine with other discounts? | Yes/No |
| Combine with | canBeCombinedWith |
Specific promotions it can stack with | Only with “Free Shipping” |
| Repeatable | repeatable |
Applies per qualifying set or once per cart | “Buy 3 pay 2” repeats for every set of 3 |
| Max usage | maxUsage |
Total uses across the whole tenant | The first 500 orders |
| Max per customer | maxUsagePerCustomer |
Times each customer can use it | 1 per customer lifetime |
| Quantity per trigger | quantityPerTrigger |
Items discounted per trigger match | Discount 1 item per trigger |
What these do in a cart, beyond their names:
- Not cumulative (the default):
Fixed,DynamicFixedandXforYskip a line that already has a discount, andPercentagereplaces that discount only if its own percentage is higher. A sale price counts: a line whosecompareAtVariantIdentifieris above its selected price already carries a discount. canBeCombinedWithis read when the promotion is reached, in stored order: it is dropped unless every promotion accepted so far is in its list. It is one-way: a promotion reached later, with no list of its own, still joins. Omitted means no restriction.maxUsageandmaxUsagePerCustomercount once per promotion when a cart is placed, not when it is paid, across all carts of the tenant. The app’s “per cart” tooltip is wrong. A customer is the cart’scustomer.identifier, else its email.maxUsagePerCustomerneeds a customer: an anonymous cart never gets that promotion. With both limits set, a customer still under their own limit keeps getting it aftermaxUsageis reached.quantityPerTriggerpicks the cheapest lines first forPercentageandDynamicFixed, and the most expensive first forFixed.
Common Promotion Patterns
Simple Sitewide Sale
Mechanism: Percentage — 20% offPeriod: Black Friday weekend (Nov 25–28)Trigger: None (automatic)Target: All productsLimitations: Not cumulativeCoupon Code
Mechanism: Percentage — 15% offPeriod: None (always active)Trigger: Coupon code "WELCOME15"Target: All productsLimitations: Max 1 per customerBuy X Get Y Free
Mechanism: X for Y — Buy 3, pay for 2 (type XforY, value 0, triggers.xForY: [3, 2])Period: NoneTrigger: 3 items of any product in cartTarget: None, it cannot have one (cheapest item is free)Limitations: Repeatable (every 3 items), cumulativeFree Shipping Threshold
The cart has no shipping concept of its own. Shipping is an externalItems line you add with type: shipping, which a promotion can target by SKU:
Mechanism: Percentage — 100% offPeriod: NoneTrigger: Cart total ≥ $75, with the shipping SKU in exclusions.skus so it does not countTarget: The SKU of the shipping lineLimitations: Cumulative (can combine with product discounts)A promotion without a target discounts the shipping line too. “10 % off everything” took 99 shipping
down to 89.10, and changeCartItemPricing on that line does not exempt it. Give site-wide promotions a
target, or put the shipping SKU in their exclusions.
Members-Only Discount
Mechanism: Percentage — 10% offPeriod: NoneTrigger: customerGroups: ["members"], which the storefront must send in context.price.customerGroupsTarget: All productsLimitations: Cumulative, no max usageBundle Discount
There is no “A AND B” trigger. The closest is either product plus a minimum quantity, which two of A also satisfies:
Mechanism: Cart — $15 off (type Fixed, value 15)Period: Summer campaign (Jun 1 – Aug 31)Trigger: skus: [A, B] with minQuantity: 2Target: None, so the amount spreads over the whole cartLimitations: None needed: a promotion applies once per cart unless repeatablePromotions vs Price Lists vs Price Variants
| Feature | Price Variants | Price Lists | Promotions |
|---|---|---|---|
| Scope | Global / all products | Product or market specific | Cart level |
| Visibility | Always (on product pages) | Always (resolved at query/checkout) | Only in cart/checkout |
| Time-limited | No | Yes (via period) | Yes (via period) |
| Conditions | None | Market / customer | Cart contents, coupons |
| Coupon codes | ❌ | ❌ | ✅ |
| Buy X Get Y | ❌ | ❌ | ✅ |
| Per-customer limits | ❌ | ❌ | ✅ |
| Stacking rules | N/A | Lowest price wins | Cumulative / exclusive |
Managing Promotions Through the API
Promotions live on the Shop API admin endpoint, POST https://shop-api.crystallize.com/{tenant-identifier}/cart/admin, with a token holding the cart and cart:admin scopes (see [[query]] for getting one). Mass operations cannot write them.
mutation SetPromotion { setPromotion( input: { identifier: "welcome15" name: "Welcome 15%" mechanism: { type: Percentage, value: 15 } periods: [{ start: "2026-06-01T00:00:00Z", end: "2026-08-31T23:59:59Z" }] triggers: { codes: ["WELCOME15"], markets: ["eu-retail"] } targets: { paths: ["/shop/shoes"] } limitations: { maxUsagePerCustomer: 1 } } ) { identifier }}| Operation | Effect |
|---|---|
setPromotion(input) |
Creates or replaces one promotion, by identifier |
setPromotions(input) |
Replaces the whole list: a promotion left out is deleted |
promotion(identifier) |
Reads one |
promotions |
Reads all |
promotionUsage |
count and perCustomer, both JSON hashes keyed by promotion identifier |
setPPI(url, refreshFrequency) |
Replaces the list from JSON at your URL, and again on each refresh |
A tenant holds at most 100 promotions, and each trigger or target list at most 5,000 entries.
Applying Promotions in the Cart
Promotions are resolved during cart hydration in the Shop API. The cart context determines which market, customer, and coupon codes are active. These run against POST https://shop-api.crystallize.com/{tenant-identifier}/cart, with a cart token.
Cart Hydration with a Coupon Code
mutation HydrateCartWithCoupon { hydrate( input: { context: { price: { markets: ["eu-retail"], voucherCodes: ["WELCOME15"], currency: "EUR", decimals: 2 } } items: [{ sku: "TSHIRT-RED-L", quantity: 2 }, { sku: "HOODIE-BLK-M", quantity: 1 }] } ) { id items { variant { sku name } quantity price { gross net currency discounts { amount percent } } } total { gross net currency discounts { amount percent } } appliedPromotions { identifier name mechanism { type value } } }}The response includes a discounts list on each item and on the cart total when a discount has been applied, and appliedPromotions names what fired. If the coupon code is invalid or no promotion matches, the prices are returned without discounts and without an error. To tell the shopper, query validateVoucher(voucher: "WELCOME15") { isValid promotions { identifier name } } on the same endpoint. It only says that a promotion carries the code, not that this cart qualifies, so compare with appliedPromotions after hydrating.
Read the applied promotions from the cart, not from the order. createFromCart answers appliedPromotions: null (and reference: null) even when the cart had one; the discounts survive on the lines. If the order must say which promotion fired, copy appliedPromotions into cart meta before place, since cart meta becomes order meta. Test orders count toward maxUsagePerCustomer and orders cannot be deleted, so never test a limited promotion with a real customer’s identifier.
Cart Hydration with Automatic Promotions
Promotions without triggers apply automatically — no coupon code needed:
mutation HydrateCart { hydrate( input: { context: { price: { markets: ["us-retail"], currency: "USD", decimals: 2 } } items: [{ sku: "SNEAKER-WHT-42", quantity: 3 }] } ) { id items { variant { sku } quantity price { gross net currency discounts { amount percent } } } total { gross net currency discounts { amount percent } } }}If a “Buy 3, pay for 2” promotion is limited to sneakers through its trigger, the discount is applied automatically when the quantity condition is met.
Best Practices
- Keep it simple — Start with 1–3 promotions. Complex stacking rules confuse customers and support teams.
- Always set an end date — Even for “permanent” promotions, set a far-future date for review.
- Test in cart — Always hydrate a test cart to verify the promotion resolves correctly.
- Name for humans — Use descriptive names: “Black Friday 2025 — 20% off shoes” not “Promo 7”.
- Be explicit about stacking — Decide early whether promotions combine. Most stores should default to non-cumulative.
- Use triggers wisely — Automatic promotions (no trigger) apply to every customer. Be intentional.
- Monitor usage — Set
maxUsageandmaxUsagePerCustomerto prevent abuse of coupon codes.
Anti-Patterns
- ❌ Using promotions for permanent price differences (use price variants or price lists)
- ❌ Creating dozens of overlapping promotions (causes unpredictable stacking)
- ❌ Forgetting to test in the cart (promotions are invisible until checkout)
- ❌ Setting cumulative + no max usage on percentage discounts (can result in near-free products)
- ❌ Using promotions for B2B pricing tiers (use price lists with customer groups instead)
Crystallize AI