Skip to main content
Alforse resolves the unit price for each or line. It starts with a base price, selects an applicable , applies matching , and stores a trace of the calculation on the line. Overrides define negotiated prices and quantity breaks; rules define company-wide discounts and markups.

Pricing rules

A pricing rule is a company-scoped rule that adjusts a price up or down. Each rule is a Discount or a Markup, expressed as either a Percentage or a Fixed amount, or a Configuration rule that prices a configured part’s options (below). A rule only fires when the line matches its conditions. A rule matches a line only when every set condition holds: the quantity is within min/max, the date is inside the valid window, and the item and customer fall inside the item/customer restrictions (empty restriction means no restriction). Only matching, active rules go into the calculation.

Configuration rules

A Configuration rule has no amount or item scope of its own. Instead you pick one configured part (only parts that require configuration are listed), and the form shows a Configuration Prices section listing that part’s configuration parameters. Each amount is a per-unit surcharge added to the line’s unit price when the line’s configuration matches:
  • List parameters take an amount per option (Color = Red → 10).
  • Boolean parameters take an amount for when the value is true.
  • Numeric parameters take an amount per unit of the value (0.50 × Length).
Text, date and material parameters can’t be priced. Amounts are signed, so a negative amount gives a credit. The surcharges from every matching Configuration rule stack. They are added before the discount and markup rules, so a discount also applies to the surcharges. Each one appears in the price trace as a Configuration step labelled with the parameter’s name. The customer scope, dates, quantity range and priority work as on any other rule. A price override that doesn’t apply rules on top still takes the configuration prices, because they price the chosen options rather than the part. Configuration prices apply wherever the line has a configuration: quote lines, which reprice when a line is configured or reconfigured, and sales order lines, which have their own Configure button.

Price overrides

A price override pins a negotiated price for a specific item, optionally with quantity breaks. Unlike a rule, an override replaces the base price outright rather than adjusting it. Overrides are scoped one of three ways, and a single override targets exactly one scope:
  • Customer — this item, this customer.
  • Customer type — this item, everyone of this customer type.
  • All customers — this item, every customer (both customer and customer type left blank).
An override can’t set both a customer and a customer type; the database enforces the exclusive scope. Each override carries a list of quantity breaks — rungs of quantity → override price. For a given line quantity Alforse picks the highest break whose quantity is at or below the ordered quantity. Order eight when the rungs are 1, 5, and 10, and you get the price on the 5-rung. You can seed one customer’s or type’s price list from another with Duplicate price list, choosing a skip or overwrite strategy for items the target already prices.

How the engine picks a price

Resolution runs top to bottom. The result, plus every step, is stored on the line as a price trace, and the line records which pricing rule (if any) drove the final number. So the precedence is: customer override > customer-type override > all-customers override > base price, and then rules run on top of whichever starting price won.

What wins when rules collide

Discounts and markups combine differently, and this is the part that surprises people:
  • Discounts don’t stack — the single highest-priority discount wins. When several discount rules match, Alforse ranks them by priority (ties broken by the larger effective amount) and applies only the top one. The rest are discarded. You never get two discounts on the same line.
  • Markups stack and compound. Every matching markup rule applies, in priority order, each computed against the already-adjusted running price. A 10% markup after a 20% markup compounds, it doesn’t simply add.
Configuration prices are added first, then the discount, then the markup stack, then the zero floor.

Where it applies

The same engine prices both surfaces. On a quote line it runs during cost rollup and re-price. On a sales order line the line form calls the same resolution as you pick an item or change the quantity, filling the unit price and storing the trace. Both line types carry the resolved price and its provenance, so a price traces back to the exact override and rule that produced it. Alforse has no separate price-list document. A price list is the set of overrides scoped to a customer or customer type. The application resolves prices; the database does not.