Create and Set up New Price Calculation Strategy
Price Setting Accelerator was created with a “plug-in” architecture in mind. It means that you can safely add your own custom price strategy calculations and they will be treated the same way as existing out-of-the-box strategies. All the other features of Price Setting Accelerator will work the same way for them.
This article is a step-by-step guide for creating and configuring you own custom strategy.
Strategy Designer works on top of the mechanism that this article describes. Please check it out before proceeding, because it may solve your use case in a more user friendly way.
Prerequisites
This article assumes that:
Price Setting Accelerator is deployed to the partition and you have a working Live Price Grid configured with
ParentPriceListLogic
where you can test your changes. Check https://pricefx.atlassian.net/wiki/spaces/ACC/pages/5490770646 for more info.You are a Configuration Engineer or have sufficient knowledge of Groovy coding, Pricefx Studio and managing and linking libraries of code to undertake technical configuration.
Configuration Overview
Each strategy is configured at two places:
Strategy Implementation – Groovy code stored in a method in the Library type logic. This is source of truth for both out-of-the-box and custom strategies. For details see https://pricefx.atlassian.net/wiki/spaces/ACC/pages/5490771992.
Strategy Definition – Record in the Company Parameter StrategyDefinition which defines the name and parameters to be provided when the Price Setting Accelerator calls the method. For details see https://pricefx.atlassian.net/wiki/spaces/ACC/pages/5490773644.
The administrator can set up the Price Setting Accelerator to use the strategy for the price list calculations in the Company Parameter StrategySelection. For details see https://pricefx.atlassian.net/wiki/spaces/ACC/pages/5490773065.
For example, review the following definition of the out-of-the-box strategy Cost+. You can see the relation between the definition and implementation. When Price Setting Accelerator calculates the price list item, the library method is called with parameters defined in the strategy definition.
See https://pricefx.atlassian.net/wiki/spaces/ACC/pages/5490771853 for more info about the out-of-the-box Cost+ calculation engine parameters.
Steps to create a custom pricing strategy: