Set up Custom Dimension Lookup
Prerequisites
Price Setting Accelerator is deployed.
New custom dimension is not the 7th dimension.
You are a Configuration Engineer or have sufficient knowledge of Groovy coding, Pricefx Studio and Pricefx Sandbox.
Assumptions
This example assumes:
You already have 3 product dimensions under “Fallback” Feature Name.
You want to add a custom dimension as the 4th dimension.
If you have “per-feature” hierarchical lookups defined, these will be unaffected.
Configuration Steps
Add Custom Dimension to PriceSettingDimensions Price Parameter
Go to the Price Parameter PriceSettingDimensions and add a new row:
Dimension: “Custom”
Order: “4”
Feature Name: “Fallback”
Field Name: According to your needs. This variable will be the name of the column and will be referenced in the code.
Run Bootstrapping Again
To make this new custom dimension available in <dependency> Price Parameters, use Price Setting Accelerator Configuration Wizard to add a new dependency level.
Select Core Elements in the list and click the Configure selected module button.
Select Configure Dependency Level button.
Select Add new Dependency Level button.
Fill in necessary information and click the Apply button.
Now, you will have the CustomDimension column in <Italy> Price Parameters:
You need to add pricing data into the Price Parameters to start using the custom dimension, as shown below.
Edit Price List Logic
The previous steps prepared data and configuration and now you need to adjust lookups by updating the Price List logic. In the (In)DependentPriceListLogic, you need to get a custom dimension value for each product and pass it into CustomDimensionManager.
Create a new element called “CustomDimensionValue”. It needs to be placed below the out-of-the-box “CustomDimensionManager“. Your new element does not need to be visible, you do not need to occupy any of 100 allowed attributes.
In the new element:
Add a logic to get the custom dimension value.
Fetch manager by
out.CustomDimensionManager
.Pass PLI/PGI’s value of your custom dimension into CustomDimensionManager by using the method
addCustomDimensionValue
.