Skip to main content
Bonsai Software
All field notes
Field Note22 September 20266 min read

Automating sales price calculation in wholesale

Automating sales price calculation in wholesale is harder than the formula suggests. Purchase price plus margin plus VAT: on paper it works out in a minute. In practice, a patchwork of customer-specific discounts, fluctuating exchange rates, and disconnected systems sits between that formula and the price the customer sees. Three lessons from the field, plus an honest assessment of when a configurator is sufficient and when custom development is needed.

By Yeslin Beljaars

Lesson 1: discount tiers per customer group that are not recorded consistently anywhere

Most wholesalers work with multiple customer groups: regular buyers, project customers, large-volume accounts, occasional purchasers. Each group has its own discount agreements, and those agreements are rarely stored in the same place. One customer group lives in the ERP, another in a spreadsheet the account manager maintains, and a third in an email thread from two years ago. As soon as you want to automate sales price calculation, you run into this immediately. There is no single source of truth. The only person who knows which discount applies is the account manager. That makes automation not only technically difficult, it also makes it risky, because an error in the discount only surfaces when the customer disputes the invoice. The solution is not a smarter system, but doing the groundwork first: consolidating all discount agreements into one structured table, with customer group, product category, and volume threshold as dimensions. Only then can you build an engine that performs the calculation automatically. Anyone who skips that groundwork and jumps straight to automation is automating chaos.

Lesson 2: exchange rates that are outdated by the time the order is confirmed

Many wholesalers purchase in dollars or other currencies and sell in euros. The purchase price is converted when the item is created in the system, using the exchange rate at that moment. By the time the order actually comes in, that rate may be weeks or months old. The result: the sales price is based on a purchase price that is no longer accurate. The margin looks healthy on paper, but in reality the exchange rate has eaten into the profit. This pattern recurs among wholesalers importing from countries with volatile currencies. The technical solution is not complex: connect a currency feed to your pricing engine and recalculate the purchase price in euros at the moment an order is created, not at the moment the item was entered into the system. However, this requires an architecture in which purchase price and sales price are independent, real-time calculated values, not fixed fields on a product master record. Anyone who does not make that distinction in the data model will keep correcting exchange rates manually.

Lesson 3: the link between purchase price and sales price is not real-time

This is the most common bottleneck when automating sales price calculation in wholesale. The purchase price arrives via a supplier confirmation or a purchase order. The sales price sits in a different system, or has been manually fixed based on an old purchase price. The connection between the two is not a real-time link but a manual step: someone compares, calculates, and adjusts. That works fine when margins are wide and price changes are rare. Once margins tighten and suppliers adjust prices more frequently, sales prices structurally lag behind reality. The margin only becomes visible after the fact, at the monthly close or the quarterly report. By that point, there is nothing left to adjust on orders that have already been shipped. The solution is a pricing engine that recalculates the sales price whenever the purchase price changes, with an alert when the margin falls below a set threshold. This is not artificial intelligence; it is simply good software architecture: purchase price and margin percentage as variables, sales price as a calculated field, not a manually entered number.

When is a configurator sufficient for calculating sales prices?

Not every wholesaler needs custom development. A standard configurator or a well-configured ERP package with price list functionality can be sufficient if the discount structure is uniform (at most two or three customer groups), currency risks are limited or hedged through purchase contracts, and the purchase price is stable enough that monthly updates suffice. In that situation, it is smarter to make better use of the existing package than to build a custom system. Custom development becomes relevant when the discount structure is customer-specific and does not fit standard tiers, when currency fluctuations directly affect the margin and you want real-time visibility, or when you have multiple systems that are currently synchronized manually. In that case, you are not adding another layer on top of the problem: the smarter move is to build the pricing engine from scratch, correctly, with the right data sources as input.

How do you approach automating sales price calculation in wholesale?

Do not start with the software; start with the data model. Which variables determine the sales price? Purchase price, exchange rate, fixed margin per category, customer-specific discount, volume discount, and possibly freight costs or surcharges. Record those variables in a structured table. Verify that there is a single, unambiguous source for each of those variables. Only when that is in order does it make sense to start building. The architecture that proves most robust in practice: a central pricing engine that retrieves the purchase price in real time, applies the exchange rate, looks up the customer-specific discount, and calculates the sales price as the result. Not as a stored value, but as a calculated output at the moment of the request. This also makes it possible to display margin warnings before a quote goes out, not only at the monthly close.

Seeing this in your own operations?

Book a call

Frequently asked questions

How do you calculate a sales price as a wholesaler?

The basic formula is: purchase price divided by (1 minus the desired gross margin), corrected for exchange rate and customer-specific discounts. In practice, discount agreements per customer group and the current purchase price are the two variables most often maintained manually, making them the weakest link.

What is the biggest bottleneck in automating sales price calculation?

In most wholesalers, the link between purchase price and sales price does not run in real time. Price changes from suppliers are processed manually, meaning margins only become visible after the fact. A pricing engine that recalculates the sales price whenever the purchase price changes resolves this.

When do you need custom development for automating price calculation in wholesale?

Custom development is worthwhile when you have customer-specific discount structures that do not fit standard tiers, when currency fluctuations directly affect your margins, or when you have multiple systems that are currently synchronized manually. With uniform discounts and stable purchase prices, a well-configured ERP package is sufficient.

How do you automate discount tiers per customer group?

First consolidate all discount agreements centrally in a structured table with customer group, product category, and volume threshold as dimensions. Only then does it make sense to build a pricing engine that looks up the discount automatically. Anyone who skips this groundwork is automating chaos.