Skip to main content

Commerce Platform Patterns

Quantaprice is a specialised pricing engine, not a full commerce platform. It answers price queries and emits change events. The patterns below describe how to wire it into the systems that already exist in your stack.


Storefront (B2C and B2B self-serve)​

On product page, listing or cart render, call POST /price/query with the SKUs on the page, the customer's pricelist filter, the currency and the tax area. One query prices a whole page in a few milliseconds, so there is no need to keep copies of prices in the storefront. Query at render time: prices change on the second, for example when a scheduled campaign starts, and a copy would show the old price.

B2B self-serve storefronts follow the same pattern, but the pricelist comes from the signed-in customer's account rather than a public default. The engine resolves the customer's price, including segment discounts and negotiated prices, without any storefront-side logic.

Key calls: POST /price/query on every render.


ERP Sync​

ERP systems need prices to stay current but rarely need them within the second. Two approaches work well:

  • Push: subscribe to webhooks; on each price event, fetch the new price with POST /price/query for the entity_code (SKU) and composite_key (pricelist) in the event, and write it into the ERP.
  • Pull: poll GET /price/changelog with a cursor every few minutes and apply the changes in batch.

Both can coexist: webhooks for freshness during the day, the changelog for reliable catch-up after downtime. See Change Events.

For period-close reconciliation, use as_of on POST /price/query to retrieve the price at any past moment.

Key calls: GET /price/changelog (polling), webhooks, POST /price/query with as_of (reconciliation).


CPQ (Configure, Price, Quote)​

A CPQ system needs accurate prices when a quote is created and must be able to show that price again later. Query POST /price/query for the quote lines with the customer's pricelist. Each result carries the pricelist's quantity breaks; apply the break for the line quantity. Store the as_of you used with the quote.

To show the price a quote was based on, repeat the same query with the stored as_of. This removes the need to snapshot prices inside the CPQ database.

Key calls: POST /price/query (line pricing); the same call with as_of (audit).


Order Management and Checkout​

At cart or order creation, query POST /price/query for the order lines with the customer's pricelist and tax_area, and apply the quantity break for each line's quantity. Quantaprice is the authoritative source for the price. Your checkout applies promotions or discount codes on top of it; the engine does not manage promotions.

Store the price returned at order submission on the order line. Use as_of to look up what the price was at submission if you need to verify it later.

Key calls: POST /price/query with tax_area, per order.


Data Warehouse and Analytics​

Stream changes into your warehouse by polling GET /changelog, the one feed of every change in order, and resume from the last processed sequence number on restart. Changelog entries say what changed; fetch the entities for their values. For price history, POST /price/query with as_of returns the price at any moment you keep history for.

Key calls: GET /changelog with after_seq; POST /price/query with as_of.


Starting Simple​

You do not need rules, hierarchies or inheritance to get value from Quantaprice. Start by treating it as a fast, auditable price store: write prices through the API and query them. Price history, scheduling and multi-currency are available from day one, without any pricing logic.

When your requirements grow — customer-specific pricing, volume breaks, inheritance from a parent pricelist — add them incrementally. The query API does not change, and existing integrations keep working.


Channel-Agnostic Design​

Quantaprice does not know or care whether a query comes from a Shopify storefront, an ERP connector, a CPQ system or a mobile app. The same POST /price/query endpoint and the same change feed serve all of them at once. Adding a channel requires no change to Quantaprice, only a new consumer of the same API.