/
Recipe: Cost Plus Price Calculation

Recipe: Cost Plus Price Calculation

This recipe is outdated

Business Scenario

The business scenario is to calculate prices for a product depending on the product cost. The base for price calculation is the cost of the product and a given “plus” to get the List Price.

In this scenario we want to make this calculation: ListPrice = Cost * (1 + Plus%)

Accelerator Package as Solution

Accelerator

Accelerate Price Setting Package

Mandatory Data

Cost on the SKU level
Plus on the “Lookup Key” level

Deployment

Deploy the Accelerate Price Setting Package through PlatformManager. This will also deploy the standard pre-configuration making it easier to get started.

Package Configuration

To learn about the basic setup and working with the package, see the Accelerators Training.

Configure Cost Lookup

The package comes with a pre-configured lookup which allows you to use our standard Product Extensions.

If you need to change anything, modify the PP “Price Setting Config”.

The default Cost Table is ready to use in a multi-country setup. To define an element mapping your country information to your data, you have to adjust the PP “Country Mapping Config”. You need to choose the field from the PP “Country Information” that should be used to identify the country data set, typically the “Name” of the country is used.

Configure Cost+ Strategy

The package comes with pre-configured pricing strategies. If you want to use only the Cost+ Strategy, you need the following line in the PP “Strategy Definition”:

This tells the calculation logic to use the “Price Increase Engine” with the parameters PRODUCT_COST and PLUS_FOR_PRODUCT.

To apply it in a Price List to all products, you can configure it in the PP “Base Strategies” or PP “Strategy Selection”:

If you want to use only the Cost+ Calculation, you can configure it for every lookup key in the PP “Base Strategies”.

If this never changes and you do not need different pricing strategies at all, you can adjust this in the calculation logic in the following elements:

You can change Price Strategies to:

return ["Cost+"]

and change Base Strategies to:

return []

In this case, the PP Steered Strategy selection will not be applied.

In the calculation logic, it is possible to pass additional parameters to the calculation dispatcher.

You can easily add your own parameters to the calculation dispatcher. If you want to use another plus, for example fixed 5%, you simply add it in the logic to the element “Calculated Prices”:

/** * These maps should be used to pass additional parameters that will be used for 3rd party calculations. * * Each key-value pair of additionalParameters will be passed on to calculator object. The value will be passed as an argument to calculation * method if its key is defined in "StrategyDefinition" Price Parameter. * * Each key-value pair of additionalOptionalParameters will be passed on to calculator object. The value is Closure which will be * evaluated and passed as an argument method when all conditions are met: * - its key is defined in "StrategyDefinition" Price Parameter * - said strategy is used * - there is no argument passed in additionalParameters. * * Initially these maps are empty. */ Map additionalParameters = [:] Map additionalOptionalParameters = [:]

Now we add a new parameter named “FIXED_PLUS” with the value 0.05 → 5%.

Now you can use this new parameter in Strategy Definition:

This way you do not need to use the built-in “Plus” lookup if you need it in another way.

Prepare Data

If the data is not in the partition yet, upload them into the configured Product Extension. You can easily upload it with the Excel Client.

The built-in calculation uses the Price Parameter tables for the definition of the “Plus”. When you use this, you need to fill it with some values. It can be filled on the Lookup Key Level:

Create Price List

Now you can create your PL/LPG and there will be calculated Cost+ prices. You are free to configure the rest of the package. If you do not need the other parts (e.g. transaction data, other strategies, …), you can remove them from the calculation logic.

Accelerator Library as Solution

Mandatory Data

Cost, Plus have to be accessible somewhere in the calculation logic

If you use only the Library Part, you are free to handle all surrounding implementation on your own. Check the other parts of this cookbook to get an idea what else can be combined, e.g. Library functions for lookups.

You can find the Library function in the Groovy Library “PricelistManagementLibrary”, Element “AdjustmentEngine”.

There is the following public function:

At the moment, it is planned to add another parameter influencing the cost plus calculation behavior. However, this function will remain here to stay compatible. So you can just call this function to calculate the Cost+ Price.

Related content

Recipe: Price Increase (WIP)
Recipe: Price Increase (WIP)
More like this
Recipe: Competition Based Price Calculation
Recipe: Competition Based Price Calculation
More like this
Configure Cost Plus Pricing Strategy
Configure Cost Plus Pricing Strategy
More like this