The ONe system can receive two prices from the external system: the selling price and the purchase price of the product. If a product does not have a purchase price, its value is assigned from the selling price. The final price is calculated by adding a margin to the purchase price.
The purchase price of a product can be different for each warehouse. Depending on which warehouse the shipment will be delivered from - this purchase price will be presented on the product line and the value of the margin and the final selling price will be calculated based on it. If the mode of delivery is changed, and with it the warehouse also changes, the purchase price will be updated to that of the warehouse. The selling price and margin will also be recalculated accordingly. The purchase price can also be supplied from the external system without the warehouse context. In that case, the same price for a given product is accepted for each warehouse.
If the order is split into several shipments (for example, because only some of the goods are available), with each shipment the purchase price will depend on the price of the product in the warehouse from which it will be shipped. The margins shown next to the total prices will also be presented depending on the purchase price assigned to the product in that warehouse.
The main product line will then present a weighted average of all purchase prices that the product has in the warehouses selected on the shipments. A margin will be calculated for the given purchase price, which will be presented under the selling price.
Translated with www.DeepL.com/Translator (free version)
Integration API in price-helper service
- Adding purchase prices: