Based on value of some fields in Quote Item Product Configurator should display dynamic UI. To make it simpler I will put it this way.
If the value of the field Contract Type is ‘A’ then there should be three tabs in UI of Product Configurator and if the value of the field ‘Contract Type’ is ‘B’ then there should only be 2 Tabs should be displayed in UI.
Hiding of Tab is easy but both UI had different set and type of fields on all the tabs and it is not possible to have different fields without heavy scripting and use of UI Properties which would render the product unusable and unmanageable.
A Product Configurator API came to our aid in this case and made this solution possible.
SetUIOption: is an API this is used to display desired UI in product Configurator UI. It accepts a property set that should contain a Name/Value Pair where one pair represent the product Id and other pair represents the UI Name to be displayed (This is the value that you give in UI Options Field in Product Administration View)
- Modify the workflow Configurator Load (This is the workflow that is called when you click customize button to configure the product)
- Add a step after start to call a business service which will evaluate the value of the field ‘Contract Type’ on Quote Item and then calls the SetUIOption with appropriate argument values.
Psuedo Code of business service we created is as following :
if(GetFieldValue(ContractType) = ‘A’)