Prices and price selection
Prices and price selection
A variant can have several price records. Thor selects an eligible price for the request’s currency, price channel, country, customer groups, and time. This supports market prices and customer-specific pricing without duplicating the product.
Define the audience of a price
Every price has a money value and tax behavior.
Optional channelId, countryCode, and customerGroupId narrow its audience.
validFrom and validTo control the price’s validity window.
An omitted dimension describes a broader price; it is not the same as assigning a particular channel or group.
Keep schedules and scopes intentional. For the same variant and context, use non-overlapping validity windows when replacing a scheduled price. Do not build business rules around whichever overlapping record happened to be created last.
One variant, two buyers
A lamp may have a base EUR price and a separate EUR price for a wholesale group. An anonymous buyer cannot be treated as a wholesale customer just because a browser parameter contains that group’s ID. Use authenticated customer context and render the selected price returned by Thor.
Price selection is not currency conversion
Requesting another currency requires an eligible price in that currency. Do not relabel an EUR amount as DKK or apply a frontend exchange rate and treat the result as a checkout price. A missing price is a configuration or eligibility state, not a zero price.
From product page to cart
Use matching store, price channel, currency, and country for discovery and cart creation.
On catalog prices, value is the original amount and discountedPrice.value is the reduced amount when present.
For current-price display, use price.discountedPrice?.value ?? price.value.
A cart returns its own calculated prices and totals.
After customer or market changes, refresh commercial data and verify the cart before continuing checkout.
For input examples, follow Configure prices, inventory, and tax. Read Money and rounding for representation and Product discounts for sale prices.