Lab Info
Lesson: Product Discount Data Management (Standalone Custom Form)
Target Audience: Certified Configuration Engineer
Estimated Time to complete: TBD
Requirements & Solution Author: Petr Rys
Solution Developer: Marcin Ćuczakuczak
User Story / Requirements
Create a standalone Custom Form to help pricing managers manage discounts per Product Groups and Families.
Product Group is part of Product Master, Product Family is assigned per Product Group.
Each Product group belongs to 1 Product Family as per table Product Family Mapping.
Based on cumulative yearly revenue on the whole Product Family the customer has assigned Discount Level in Discount Level Definition Table.
Based on Product Group and Discount Level achieved by the Customer the sales agent has a "recommended discount" and a "maximum allowed discount" (Target Discount % and Max Discount %)
Anchor | ||||||
---|---|---|---|---|---|---|
|
Product Discount Data Management Custom Form allows user to perform these tasks:
Change Data - Pick a table, Change values in the table, without adding any rows
Add new Product Group - Add a group, Assign it to the product family, Assign to it all the required discounts for all the required levels
Discount for each additional level has to be >= to the previous level, otherwise validation fails
Add a product family - Re assign product groups to reflect new Product Family,
Add new discount level to existing product family - Create new discount levels. Levels must be continuous.
...
Assign new discounts for new levels. Discount for each additional level has to be >= to the previous level, otherwise validation fails
Learning Outcomes
At the end of the Lab, you should be able to:
Create Standalone Custom Form, Custom Form Type
Utilize Input Matrix as Custom Form input
Understand Custom Forms Workflow
Provided resources
Logics:
sCFO_ProductDiscountLib
...
ProductFamilyMapping, DiscountLevelDefinition, Discount
Acceptance Criteria
User can access a standalone Custom Form within the Analytics section to complete tasks listed in the Details section.
...
After the user submits the form, changes should be saved in the corresponding company parameter tables. If a workflow has been added to the form, the changes should be saved after approval.
Sample solution
...
Step-by-step solution
Develop the logic and test in Studio
Go to the Pricefx Studio and create the following logics.
...
Assign Product Family: list of unique values from
ProductFamilyMapping
lookup tableNew Discount: user can add and delete rows
...
Calculations
The results will be displayed as tables in the right panel. Only tables with changes will be shown as copies of parameter tables with updated values.
...
Task | Sample Code | |||||
---|---|---|---|---|---|---|
Create a table |
| |||||
Get data from company parameter table |
| |||||
How to edit cell style in table |
| |||||
How to add new table to the customFormProcessor. |
|
...
Saving changes to the tables.
We need to ensure that changes in the target tables are displayed accurately. Once the user approves the changes, they should be saved. The customform_WorkflowPosStep logic is responsible for this process.
...
Task | Code samples | ||
---|---|---|---|
Get user inputs from current item assign it to |
| ||
Get individual field values from user |
| ||
Get |
| ||
Create filters:
|
| ||
Update |
| ||
Use |
| ||
Get |
| ||
If output is null get an empty list |
| ||
Filter the rows in their respective tables based on the values of Map. |
|
Example of a Solution
TODO: embedd solution Zip file.
References
Custom Forms Configuration How-To(s)
Unity Documentation
Groovy API
Other
TODO: review and update articles, we have some Clover Club changes
TODO: add Model Object vs Custom Form vs Configuration Wizard into KB (now just in Product Mngt - non public)
TODO: Petr Rys
Please provide feedback for solution and Lab, partition credentials sent by teams chat