Pricing rules and resolution order
Understand the exact order in which Kabaido resolves a unit price so every line is explainable.
Kabaido prices every line through one resolution function, shared by the request pipeline, the quote builder and the API. The order is fixed so the same inputs always give the same price.
Resolution order for a product line
- Start unit price = product.price_minor.
- Apply the best special_prices match for the customer (most specific scope wins: product over category over schema; fixed price replaces, pct discounts).
- Apply pricing_rules qty break for the achieved scope (highest min_qty less than or equal to qty; pct or fixed).
- Never stack two rules of the same scope; specials and qty breaks do stack (special first, then qty break) unless the special is fixed_price (then qty breaks skip).
Why the order is fixed
Pricing that varies with who asked the question is pricing you cannot defend. The same product, for the same customer, at the same quantity, has to produce the same figure whether it was priced by the request pipeline at two in the morning, by a salesperson building a quote by hand, or by your own system calling the API. That is only true if there is one resolution function and one order, which is why there is.
It also means a surprising price is diagnosable. There is no hidden step: whatever came out, the chain that produced it is recorded alongside it.
The rules that never stack
Two rules of the same kind never both apply. Among special prices, the most specific scope wins and the rest are ignored: a special on a single product beats one on its category, which beats one on its schema. Among quantity breaks, the highest threshold your quantity actually reaches wins. What stacks is one rule of each kind, not two of one.
Configured and service lines
For configured and service lines, the engine output is the base. Special prices scoped to the configurator or service apply as a percentage only.
How priced provenance
The function returns the resolved unit price together with the list of applied steps, each with its kind, name and delta. That list is what powers the how priced popover on every quote line.
The Pricing page under Sales has a preview tool: pick a product, a customer and a quantity to see the applied chain step by step.