Upgrade Notes - Price Setting Accelerator 2.4.0
Return value of custom strategies has a different format. Previously it was either Map or BigDecimal. Now it can be only Map and we recommend usage of "result" key instead of "price" inside this Map. (PFPCS-7298)
New Advanced Configuration entry configuring behavior of Strategy Designer needs to be added. The name of entry is “strategyDesigner”. Its value:
{ "groovyLibraryName": "CustomPricingStrategiesLib", "customBlocksGroovyLibraryName": "StrategyDesignerCustomBlocks", "excludedParameters": [], "deploymentLogicName": "StrategyDesignerDeployment", "livePreviewDependencyLevel": "Global", "dependencyConfigurationTable": "DependencyConfiguration", "priceListLogicName": "IndependentPriceListLogic", "additionalParameters": { "SECONDARY_KEY": { "label": "Secondary Key", "tooltip": "Secondary Key", "type": "string" } } }
StrategyDefinition has been split into 2 different PP tables:
PSP_EngineCalculationConfig of JSON type
Type: JSON
Columns:
name (key)
attributeExtension___calculationEnginePath (path to calculating function)
attributeExtension___engineCalculationParameters (input parameters to engine passed from PSP)
Standard configuration:
name,attributeExtension___calculationEnginePath,attributeExtension___engineCalculationParameters AnchorEngine,libs.CalculationEnginesLib.AttributeBasedEngine.calculatePrice,"CONSTANT_STRING(PP),CONSTANT_STRING(AnchorData),CONSTANT_STRING(Anchor),CONSTANT_STRING(SKU),CONSTANT_STRING(FactorToAnchor),SKU,FINAL_LIST_PRICE_ELEMENT_NAME,FINAL_PRICE_ELEMENT_NAME" AttributeBasedEngine,libs.CalculationEnginesLib.AttributeBasedEngine.calculatePrice,"CONSTANT_STRING(PP),CONSTANT_STRING(AnchorData),CONSTANT_STRING(Anchor),CONSTANT_STRING(SKU),CONSTANT_STRING(FactorToAnchor),SKU,FINAL_LIST_PRICE_ELEMENT_NAME,FINAL_PRICE_ELEMENT_NAME,DEPENDENCY_PROPERTIES,STRATEGY_NAME" AvgCompetitionEngine,libs.CalculationEnginesLib.CompetitionEngine.calculatePrice,"CONSTANT_STRING(),CONSTANT_STRING(),CONSTANT_BIG_DECIMAL(),CONSTANT_STRING(No),CONSTANT_STRING(50%),COMPETITOR_PRICES,MINIMUM_MARGIN_PRICE" CompetitionEngine,libs.CalculationEnginesLib.CompetitionEngine.calculatePrice,"CONSTANT_STRING(min),CONSTANT_STRING(),CONSTANT_BIG_DECIMAL(),CONSTANT_STRING(No),CONSTANT_STRING(),COMPETITOR_PRICES,MINIMUM_MARGIN_PRICE" CostPlusEngine,libs.CalculationEnginesLib.AdjustmentEngine.calculatePrice,"CONSTANT_STRING(Percentage),PRODUCT_COST,PLUS_FOR_PRODUCT_PERCENTAGE, PLUS_FOR_PRODUCT_ABSOLUTE" KitEngine,libs.CalculationEnginesLib.KitEngine.calculatePrice,"SKU,BOM_LIST,FINAL_LIST_PRICE_ELEMENT_NAME,FINAL_PRICE_ELEMENT_NAME" MaxCompetitionEngine,libs.CalculationEnginesLib.CompetitionEngine.calculatePrice,"CONSTANT_STRING(max),CONSTANT_STRING(),CONSTANT_BIG_DECIMAL(),CONSTANT_STRING(No),CONSTANT_STRING(),COMPETITOR_PRICES,MINIMUM_MARGIN_PRICE" MinCompetitionEngine,libs.CalculationEnginesLib.CompetitionEngine.calculatePrice,"CONSTANT_STRING(min),CONSTANT_STRING(),CONSTANT_BIG_DECIMAL(),CONSTANT_STRING(No),CONSTANT_STRING(),COMPETITOR_PRICES,MINIMUM_MARGIN_PRICE" NetEngine,libs.CalculationEnginesLib.NetEngine.calculatePrice,"CONSTANT_STRING(PX),CONSTANT_STRING(RecommendedRetailPrices),CONSTANT_STRING(rrp),CONSTANT_STRING(),CONSTANT_STRING(),CONSTANT_STRING(DependencyLevelName),SKU,TARGET_DATE,DISCOUNTS,DEPENDENCY_INFORMATION_VALUES" PriceIncreaseEngine,libs.CalculationEnginesLib.AdjustmentEngine.calculatePrice,"CONSTANT_STRING(Absolute),BASE_PRICE,PRICE_INCREASE_PERCENTAGE,PRICE_INCREASE_ABSOLUTE" PromotionLookupEngine,libs.CalculationEnginesLib.LookupEngine.calculatePrice,"CONSTANT_STRING(PX),CONSTANT_STRING(PromotionPrices),CONSTANT_STRING(promotionPrice),CONSTANT_STRING(validFrom),CONSTANT_STRING(validTo),CONSTANT_STRING(DependencyLevelName),SKU,TARGET_DATE,DEPENDENCY_INFORMATION_VALUES" RRPLookupEngine,libs.CalculationEnginesLib.LookupEngine.calculatePrice,"CONSTANT_STRING(PX),CONSTANT_STRING(RecommendedRetailPrices),CONSTANT_STRING(rrp),CONSTANT_STRING(),CONSTANT_STRING(),CONSTANT_STRING(DependencyLevelName),SKU,TARGET_DATE,DEPENDENCY_INFORMATION_VALUES"
StrategyDefinition
Type: Matrix2
Columns:
key1 (StrategyName)
key2 (Level – Independent/Dependent)
attribute1 (CalculationEngine – name of the record from PSP_EngineCalculationConfig)
attribute2 (ParentLevelOnly)
attribute3 (ParentLevelPriority)
attribute4 (Overridable)
attribute5 (MandatoryStrategy)
attribute6 and attribute7 are no longer used
Standard configuration:
key1,key2,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,attribute11,attribute12,attribute13,attribute14,attribute15,attribute16,attribute17,attribute18,attribute19,attribute20,attribute21,attribute22,attribute23,attribute24,attribute25,attribute26,attribute27,attribute28,attribute29,attribute30 Anchor,Dependent,AnchorEngine,,,,,,,,,,,,,,,,,,,,,,,,,,,,, Anchor,Independent,AnchorEngine,,,,,,,,,,,,,,,,,,,,,,,,,,,,, AvgCompetition,Dependent,AvgCompetitionEngine,,,,,,,,,,,,,,,,,,,,,,,,,,,,, AvgCompetition,Independent,AvgCompetitionEngine,,,,,,,,,,,,,,,,,,,,,,,,,,,,, Cost+,Dependent,CostPlusEngine,,,,,,,,,,,,,,,,,,,,,,,,,,,,, Cost+,Independent,CostPlusEngine,,,,,,,,,,,,,,,,,,,,,,,,,,,,, Kit,Dependent,KitEngine,,,,,,,,,,,,,,,,,,,,,,,,,,,,, Kit,Independent,KitEngine,,,,,,,,,,,,,,,,,,,,,,,,,,,,, MaxCompetition,Dependent,MaxCompetitionEngine,,,,,,,,,,,,,,,,,,,,,,,,,,,,, MaxCompetition,Independent,MaxCompetitionEngine,,,,,,,,,,,,,,,,,,,,,,,,,,,,, MinCompetition,Dependent,MinCompetitionEngine,,,,,,,,,,,,,,,,,,,,,,,,,,,,, MinCompetition,Independent,MinCompetitionEngine,,,,,,,,,,,,,,,,,,,,,,,,,,,,, PriceIncrease,Dependent,PriceIncreaseEngine,,,,,,,,,,,,,,,,,,,,,,,,,,,,, PriceIncrease,Independent,PriceIncreaseEngine,,,,,,,,,,,,,,,,,,,,,,,,,,,,, PromotionBased,Dependent,PromotionLookupEngine,,,,,,,,,,,,,,,,,,,,,,,,,,,,, PromotionBased,Independent,PromotionLookupEngine,,,,,,,,,,,,,,,,,,,,,,,,,,,,, RRP,Dependent,RRPLookupEngine,,,,,,,,,,,,,,,,,,,,,,,,,,,,, RRP,Independent,RRPLookupEngine,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
As you can see above, AdditionalEngineConfiguration inputs are no longer used in PSP engines. These have been replaced by inline engineCalculationParameters. PPs like
AnchorAdditionalConfig
,AvgCompetitionAdditionalConfig
,CostPlusAdditionalConfig
,MaxCompetitionAdditionalConfig
,MinCompetitionAdditionalConfig
,PriceIncreaseAdditionalConfig
,PromotionLookupEngineConfig
,RRPLookupEngineConfig
have been removed from StandardConfiguration and are no longer used in PSP.WarningConfig changes:
Below error codes are no longer used:
UNSUPPORTED_PARENT_SOURCE_TYPE
INVALID_PARENT_SOURCE_ID
Below entry has been added to StandardConfig:
ERROR_GETTING_PARENT_ITEM_CONFIG,*,Couldn't read config of parent PL/PG.,Verify if parent PL/PG exist.,Data,Red,Yes,Yes,,,,,,,,,,,,,,,,,,,,,,,,
DependencyConfiguration changes:
PP now has only 2 keys; key3 and key4 responsible for selecting parent PG/PL have been removed.
Selection of parent PG/PL will happen independently for each PG/PL now
Each of old PL/PG needs to be configured before recalculation:
There is a new input in the configurator, for selecting parent PG/PL.
Input for DependencyLevel has been renamed, the value needs to be re-entered.
Entry “Price Calculator” has been renamed to “Engine Calculator” in PriceSettingConfig PP.