Pricing, discounts and margin
When you add or reprice a line, Sales resolves a suggested price per sales unit from the customer, item, ordered sales quantity, and any matching pricing schedules. Pricing schedules apply to product lines; sellable material lines use the item’s base selling price. Margin starts as an estimate and can become actual after delivery consumes real stock.
01. How a line price is chosen
Section titled “01. How a line price is chosen”Pricing evaluates the customer category, item scope, and ordered quantity:
- The item’s base selling price per effective sales unit becomes
listUnitPrice. - The pricing lookup gathers every schedule that can apply to the customer and item.
- Each candidate schedule contributes a matching quantity break when the quantity falls inside that break.
- The engine calculates each candidate unit price as
base price * (1 - discount percent / 100). - The lowest resulting unit price wins.
This means an all-customer schedule and a category-scoped schedule can both be candidates. The category-scoped schedule does not automatically beat the all-customer schedule; the lowest resulting unit price wins.
If no schedule break matches, the suggested unit price is the base selling price and the source is base_price.
Schedule-based pricing is included on Free and Pro. Quantity-break thresholds are in the sales unit: a break at 10 means 10 pallets on a Pallet line.
02. What the line stores
Section titled “02. What the line stores”| Field | Meaning |
|---|---|
pricingSourceType | schedule_break or base_price. |
pricingScheduleName | Snapshot of the winning schedule name. |
pricingBreakLabel | Snapshot of the winning break range. |
suggestedUnitPrice | What pricing resolution suggested. |
unitPrice | What the order will charge. |
isPriceOverridden | True when the user changed the suggested price. |
The discount cell tooltip shows the schedule and break, Manual price override, or Base price.
03. Discounts, totals, and tax
Section titled “03. Discounts, totals, and tax”Discount is derived from list price versus unit price. Editing the discount column reprices the unit price down from the base price.
| Amount | Formula |
|---|---|
| Line subtotal | sales quantity * price per sales unit |
| Line tax | lineSubtotal * taxRatePercent |
| Line total | lineSubtotal + lineTaxAmount |
| Order total | Line totals plus shipping fee and shipping tax. |
Tax rate name and percent are snapshotted to the line so later tax setup changes do not rewrite order history.
04. Estimated vs. actual margin
Section titled “04. Estimated vs. actual margin”The order detail data carries estimated and actual margin fields, but the visible order card currently keeps the main totals strip focused on revenue, discount, shipping fee, tax, and total.
Before delivery, line margin can use estimated unit cost. Ashicore converts the current stock-unit cost to the line’s snapshotted sales unit before comparing it with the sales price:
| Estimated field | Meaning |
|---|---|
estimatedUnitCost | Current estimated cost for one sales unit. |
estimatedCogs | Estimated cost of goods for the line. |
estimatedGrossProfit | Estimated line profit. |
estimatedMarginPercent | Estimated margin percentage. |
After delivery consumes real inventory lots, actual cost fields can be populated:
| Actual field | Meaning |
|---|---|
actualUnitCost | Actual consumed stock cost per shipped sales unit. |
actualCogs | Actual cost of goods for shipped quantity. |
actualGrossProfit | Actual line profit. |
actualMarginPercent | Actual margin percentage. |
The order-level margin summary tracks product revenue, freight recovery, product COGS, fulfillment costs, contribution margin, margin percent, and whether the cost side is estimated, actual, mixed, or unknown.
Changing an item’s sales-unit conversion can rescale its default price to keep the same underlying stock value. Existing order-line prices and unit snapshots stay unchanged. See Sales vs. stock units.