Modify Calculation or User Experience of Existing Columns in Price List/Grid
It may happen that you need to change the behavior of an existing price list column/element. For example, you may want to change:
Implementation:
How prices are calculated
How data are retrieved – e.g. how you load Competition Data
Adjust parameters of some operations – e.g. change the code of Actual Price Lookup
Make column values overridable
User experience:
Highlight the whole column with a color – this is appreciated by customers because they can easily differentiate between the prices in large pricelists
Color only specific values in a column – to easily spot problematic values
Add an icon to the label of the column – e.g. add a “writing hand” icon (it is a letter in UTF-8) to the labels of columns whose values can be overridden
Add an icon to the suffix of the specific value – e.g. to add an up-arrow to the suffix of rising values
Steps
Make a copy of the out-of-the-box Price Setting Accelerator logic which you plan to change. (In future releases, you will also be able to use “logic inheritance” in Studio, instead of copying the logic.)
Give it a different name.
Set up the Valid After date.
Change the code of the ActualPriceLookup element to reflect the new name of the logic.
Modify/replace the element’s implementation code inside the “tryToExecuteElement” block.
Ensure that your code returns the same type of data as was returned in the original implementation. For example, if it was a Map, it must be a Map again with the same keys and the same types of values.
When the element output is a simple value, such as number, which is displayed to users in the price list, you can modify its presentation by using api.attributedResult().
Modify the element’s properties.
You can change the colors of the element.
When modifying the suffix, ensure that it has the same meaning. For example, if it was displaying a currency, then it should still contain a currency, but potentially with some additional information (like the “up-arrow” and similar).
Test the changes in your price list/grid.