Appearance
Price calculation β
OCP calculates item prices on demand for a specific customer, currency, and unit of measure (UOM). The item pricing flow determines where the calculation runs.
Post-processing with hooks β
After the base price is calculated, a PostPricingCalculation hook is executed. This allows for custom logic (e.g. discounts, rounding) defined by the customer to adjust the final price before it is returned. This is done for both the current data and prices calculated from connectors.
Current data β
The rules below apply when OCP calculates prices from current data, which is the default when no flow is configured.
Multiple pricing sources are evaluated in a specific order, and the first available price is returned (not necessarily the lowest). Promotional prices based on quantity tiers may override fixed prices.
Pricing sources β
In order of priority.
- Customer-specific pricing on items (tiers only): Prices directly assigned to an item for a specific customer (including quantity tiers).
- Customer-specific price lists: Prices from a price list assigned to a specific customer.
- Default price lists: Platform-wide price lists used when no customer-specific list is set.
INFO
If the requested unit of measure doesnβt have a price set, the system attempts to use the base UOM and applies a conversion factor to calculate the price. This only applies to non-tiered prices.
Calculation summary β
Below a high overview of how we get to a result.
| Step | Description |
|---|---|
| 1 | Get item, customer, and currency |
| 2 | Validate unit of measure |
| 3 | Look for prices: customer price list β default price list |
| 4 | Apply UOM conversion if needed |
| 5 | Look for discount in tiers: item customer tier β customer price list tier β default price list tier |
| 6 | Run post-pricing hook |
| 7 | Return calculated price |
VAT Handling β
The VAT rate is determined by:
- The country code in the request.
- The VAT tariff of the item.
If no VAT rate is configured for this combination, an error is returned.