Pricing, inventory, and tax
Thor keeps commercial data contextual: one variant can have different prices by channel, country, customer group, and validity window, while inventory can be held across supply channels.
Prices
Create prices with productVariantPricesBulkCreate. Every entry identifies a product variant and a MoneyInput value. Add optional dimensions only when they are part of your pricing model:
channelIdfor a market or price list.countryCodefor country-specific pricing.customerGroupIdfor contract or segment pricing.validFromandvalidTofor scheduled prices.taxBehaviorto declare whether the stored amount isINCLUSIVEorEXCLUSIVEof tax.
Amounts use integer minor units. For example, 1099 with EUR represents EUR 10.99. Do not calculate with floating-point values and then persist the unrounded result.
The Storefront API selects a price using the request’s priceChannelId, priceCurrency, priceCountry, customer identity, and current time. Make these values stable for the lifetime of a cart; changing price context can cause totals to be recalculated.
Inventory
Use inventoryEntryBulkCreate to create stock entries by SKU and supply channel. The allocation strategy controls enforcement:
NONE: quantity is not tracked for allocation.TRACK: quantity is tracked without reserving allocations.TRACK_AND_ALLOCATE: quantity is tracked and checkout allocations reduce availability.
Choose the strategy intentionally per entry. With tracked inventory, storefront availability depends on stock in a supply channel used by the store. Avoid reducing quantity below already allocated stock.
Tax behavior and rounding
INCLUSIVE prices already contain tax; EXCLUSIVE prices have tax added during calculation. Configure tax rates for the applicable jurisdiction and ensure the cart has the country and address data required to select them.
Stores expose default rounding modes for prices and tax. Use Thor’s returned amounts as authoritative in checkout and order displays. If another system recomputes totals, mirror the store’s rounding configuration (TO_EVEN, AWAY_FROM_ZERO, or TO_ZERO) and operate in minor units.
Recommended synchronization order
- Create stores and channels.
- Create product and variants.
- Create prices.
- Create inventory entries.
- Publish product and variants.
- Query the Storefront API with the exact production context and verify price, availability, tax, and totals.
Bulk inputs are capped at 100 entries. Split larger imports into deterministic batches and record item-level mutation errors before advancing your source-system checkpoint.