Prices
Prices belong to product variants. A variant can have multiple price records so Thor can resolve the appropriate amount for a market, customer, and point in time.
Price dimensions
Every price has a MoneyInput value and a taxBehavior. Optional dimensions narrow where it applies:
channelIdscopes the price to a price channel.countryCodescopes it to an ISO 3166-1 alpha-2 country.customerGroupIdscopes it to a customer group.validFromandvalidTodefine a scheduled validity window.
An omitted optional dimension makes the record broader on that dimension. Design broad fallback prices intentionally and avoid overlapping records whose business priority is unclear.
Selection order
For records in the requested currency and current validity window, Thor prefers the most specific match in this order:
- Customer group, price channel, and country.
- Customer group and price channel.
- Customer group and country.
- Customer group only.
- Price channel and country.
- Price channel only.
- Country only.
- A global price with none of those dimensions.
Within the same tier, Thor prefers the most recent validFrom, then the lowest effective amount. For example, a signed-in wholesale customer browsing Denmark through a retail price channel receives a group-and-channel-and-country price before a channel-and-country price. If the customer group has no matching record, resolution continues through the remaining tiers.
Thor rejects ambiguous overlapping validity windows for the same price context. Use adjacent, non-overlapping windows when scheduling a replacement price.
Money uses minor units
MoneyInput.centAmount is an integer in the currency’s smallest unit. For example, 1099 in EUR is EUR 10.99. Keep monetary arithmetic in integers and let Thor apply the store’s configured rounding modes.
Price resolution context
Storefront product queries accept priceChannelId, priceCurrency, and priceCountry; signed-in customer context can also affect customer-group eligibility. Cart creation preserves its currency, store, optional country, and optional price channel.
Use the same context for product listing, product detail, cart creation, and cart updates. If a market selector changes currency or price channel, explicitly decide whether to create or update the cart and then render the latest totals returned by Thor.
Tax behavior
INCLUSIVE means the stored amount includes tax. EXCLUSIVE means tax is calculated on top of the stored amount. This setting belongs to the price record; country-specific rate resolution is described in Tax.
Import and maintenance
Use the single-price mutations for interactive changes and bulk mutations for catalog synchronization. Treat each mutation according to its documented payload and transaction behavior; do not assume every bulk operation supports partial success.
When scheduling prices, use unambiguous timestamps and test the transition around validFrom and validTo in the same context the storefront will send.