Pricing Engine
Why pricing is its own system
Section titled “Why pricing is its own system”Embedding a single price field on each product seems simple until your business needs sale pricing, wholesale discounts, volume tiers, and multi-currency support — all at the same time. When pricing lives inside the catalog, every new pricing rule requires catalog changes, and price conflicts become impossible to diagnose.
Optimizely Commerce separates pricing from the catalog into a dedicated pricing engine. The catalog describes what you sell. The pricing engine determines what it costs, for whom, and under what conditions. This separation means a product manager can update marketing copy without touching prices, and a pricing analyst can adjust margins without editing the catalog.
How price resolution works
Section titled “How price resolution works”When a customer views a product or adds an item to the cart, Commerce resolves the price through a pipeline that evaluates multiple price entries and selects the best match.
The resolution pipeline considers these dimensions in order:
| Dimension | What it controls | Example |
|---|---|---|
| Variant | Which SKU the price applies to | ”X200 Blue 18V” |
| Currency | Which currency the price is denominated in | USD, EUR, GBP |
| Customer group | Which pricing tier the buyer belongs to | Wholesale, VIP, Employee |
| Quantity | Minimum quantity to unlock this price | 1+, 10+, 100+ |
| Date range | When this price is active | March 1 - March 31 |
| Market | Which market or region applies | North America, EMEA |
A single variant can have dozens of price entries spanning these dimensions. The engine evaluates all matching entries and returns the most specific applicable price. Specificity follows a deterministic order: a customer-group price beats a default price, and a quantity-tier price beats a flat customer-group price.
Base prices and overrides
Section titled “Base prices and overrides”Every variant needs at least one base price — the default price that applies when no more specific entry matches. Base prices are typically set per currency and market.
Override prices layer on top. You create overrides by adding price entries with additional qualifiers:
- A customer group override gives wholesale buyers a lower price than retail buyers for the same variant
- A quantity tier reduces the unit price when the buyer orders 50 or more units
- A date-ranged override activates a promotional price for Black Friday without deleting the base price
When the promotion ends, the date-ranged override expires and the base price takes effect again automatically. No manual cleanup required.
Multi-currency pricing
Section titled “Multi-currency pricing”Commerce supports multiple currencies natively. You can set explicit prices per currency or let the system calculate converted prices from a base currency using exchange rates.
Explicit per-currency prices are more accurate for established markets where rounding and local pricing psychology matter. Calculated prices work well for secondary markets where maintaining separate price lists is not worth the effort.
Customer group pricing
Section titled “Customer group pricing”Customer groups let you segment buyers into pricing tiers without creating separate catalogs. Common groups include:
- Retail — Default pricing for anonymous and standard customers
- Wholesale — Reduced prices for registered resellers
- Employee — Staff discount pricing
- VIP / Loyalty — Reward pricing for high-value customers
Groups are assigned to customer accounts. When a logged-in customer views a product, the pricing engine automatically resolves their group-specific price. Anonymous visitors always see the retail price.
Quantity-based pricing
Section titled “Quantity-based pricing”Quantity tiers encourage larger orders by reducing the per-unit price at defined thresholds.
| Quantity | Unit Price |
|---|---|
| 1 - 9 | $25.00 |
| 10 - 49 | $22.50 |
| 50 - 99 | $19.00 |
| 100+ | $16.00 |
The pricing engine evaluates the cart line item quantity, not the total cart. If a customer orders 60 units of one variant and 5 of another, each line resolves independently against its own tier structure.
Quantity tiers can combine with customer group pricing. A wholesale customer ordering 100 units might receive both the wholesale group discount and the 100+ quantity tier, depending on how your price entries are configured.
Pricing vs promotions
Section titled “Pricing vs promotions”Pricing and promotions are related but distinct systems. Pricing sets the resolved unit price before any cart-level discounts. Promotions apply rules to the cart as a whole — buy-one-get-one, percentage off cart total, free shipping thresholds.
The order of operations matters: pricing resolves first, then promotions evaluate the priced cart. This prevents circular dependencies where a promotion changes a price that changes the promotion eligibility.
Extending the pricing engine
Section titled “Extending the pricing engine”Commerce Customized allows you to register custom price resolvers that participate in the pricing pipeline. Use cases include:
- Contract-based pricing — Prices pulled from a signed agreement stored in your ERP
- Dynamic pricing — Prices adjusted based on demand, inventory levels, or competitor data
- Bundle pricing — Prices that depend on what else is in the cart
Custom resolvers plug into the pipeline alongside the built-in resolver. You control the priority order so your custom logic runs before or after the default resolution.
1. A wholesale customer orders 75 units of a product that has both customer group pricing and quantity tiers. How does Commerce resolve the price?
The pricing engine evaluates all matching dimensions together. A price entry that matches both the wholesale group and the 50-99 quantity tier is more specific than one matching only the group.
The pricing engine evaluates all matching dimensions together. A price entry that matches both the wholesale group and the 50-99 quantity tier is more specific than one matching only the group.
Review this topic →2. A marketing team sets a promotional price for a product but the cart total still seems wrong. Where should the developer investigate first?
Pricing resolves before promotions. Verify the unit price from the pricing engine is correct first, then check if the promotion rules are applying as expected.
Pricing resolves before promotions. Verify the unit price from the pricing engine is correct first, then check if the promotion rules are applying as expected.
Review this topic →