Define New Pricing Strategy

The Company Parameter StrategyDefinition contains a list of pricing strategies that are available in the price setting package, along with details about the strategic hierarchy, calculation engine and strategy calculation information.

Let’s explain some of fields:

 

To define the new strategy:

  1. Find the Company Parameter StrategyDefinition and add a new record to define a new strategy:

    • Set Strategy Name as TrainingCost+ (mandatory field).

    • Set Level to Parent (mandatory field).

    • Set Calculation Engine to a path to locate your method, i.e. set it to "libs.TrainingCalculationEngineLib.TrainingEngine.calculatePrice". This is the same pattern which is used in Groovy logic when you call a library method.
      Note that this is different from definitions of the out-of-the-box strategies.

ảnh-20240329-070931.png
  1. Find the Company Parameter PSP_EngineCalculationConfig and add a new record to define a new strategy implementation in Groovy library. For more details, see .

    • Set Engine Name as TrainingCost+ (mandatory field).

    • Set Calculation Engine Path to a path to locate your method, i.e. set it to "libs.TrainingCalculationEngineLib.TrainingEngine.calculatePrice". This is the same pattern which is used in Groovy logic when you call a library method.

    • Set Engine Calculation Parameters to parameters needed to calculate prices in your method.

ảnh-20240329-071648.png

Â