You buy products from your supplier at an agreed price. You want to put a margin on top of that. This is possible with our dynamic price formula.
Suppose the purchase price is €50 and you want to sell for €75 (margin = 50%). Then the formula is: COST*1.5
In the formula, COST is a variable that is replaced by the purchase price. Using the same formula, a product you purchase for €100 would end up with a selling price of €150 (€100 × 1.5 = €150).
Do you use our product configurator in your shop? Then the price is dynamically calculated based on the configuration made by the customer. So your formula is always applied, even for dynamic products.
Setting your pricing formula
Via Settings -> Integrations -> Your supplier you will find an input field for the price formula. The formula you enter here applies to all products from that supplier.
Variants
For variants that you newly create through the catalog, the price is calculated and pre-filled in the price field. You can change the price yourself, before or after creating the variant.
Configurable products
Do you use our dynamic configurator? Then by default the price formula as set in Settings -> Integrations -> Your supplier is used. But for some products you might want to use a different formula, for example because you use a different margin or charge fixed start-up costs.
Via My Products -> Configurable Product -> Configurator you can set a product-specific formula. To do so, turn on "Custom", enter the formula, and press Save. This formula will now only be used for this specific product.
Take note! Products that have their own formula are not automatically updated when you change the margin in the general formula. This usually isn't a problem, but it is good to keep in mind when working with formulas.
Variables
Two variables are available which are replaced by the actual value during the calculation of the formula.
- COST: The purchase price excluding VAT.
- TAX_FACTOR: Equal to 1.21.
If you include VAT in your formulas, we recommend that you always work with TAX_FACTOR. Otherwise you will have to update all your formulas manually when the rate changes. If you use TAX_FACTOR we will do that for you as soon as the new rate applies.
Rounding and VAT
You can round off calculations with the functions round and ceil. Note: The outcome of the formula is always the price excluding VAT. In the examples below you can see how to calculate a consumer-friendly price.
- round(7,5) => 8
- ceil(9,25) => 10
Examples
For inspiration, a few examples.
Round up:
ceil(COST * 2)
COST €15,10 => €31
Round up to €5:
ceil(COST * 2 / 5) * 5
COST €15,50 => €35
Consumer-friendly price:
(ceil(COST * 2,5 * TAX_FACTOR) - 0,05) / TAX_FACTOR
COST €10 => €25,58 excl. VAT = €30,95 incl. VAT