Configuration Wizards Admin

Configuration Wizards Admin

In this section, you can set up a configuration wizard, which assists users with handling complex data configuration tasks. The UI part is the same as any Configurator where users provide input for several parameters with cascading dependencies. The advantage of a Configuration Wizard is that it can take the user inputs and further work with the data, for example, write to Company Parameters or Product tables.

The Configurator Wizard can also be a convenient way to allow users to modify data tables without giving them the required user privileges. Users will not be able to modify data directly but could do so in a controlled way using the wizard – no permissions are required but users can only modify what the wizard allows them.

Configuration Wizards can be accessed from the Module > Company Processes menu or can be embedded as a tab in standalone Custom Forms or Actions.

Create Configuration Wizard

A Configuration Wizard combines two things: a logic that defines the user-facing inputs, and an Execution logic that retrieves those inputs and performs the actions (e.g., writing to Company Parameters or Product Master).

There are two ways to define the input UI:

Recommended: Form Logic (Forms 2.0)

  1. Define a Form logic that builds the wizard's inputs. See Forms 2.0 for how to define inputs, value options, and dynamic (onChange) behavior.

  2. Define an Execution logic (a generic logic) that retrieves the inputs and executes the programmed actions. Assign the Form logic to it in the Form Logic field.

  3. Go to Administration > Configuration > Configuration Wizards Admin and add a new wizard.

  4. Select the Execution Logic (logic) but leave the Wizard Logic (Configurator) (Legacy) field empty (as the inputs are defined by the associated Form logic).

  5. You can limit the availability of the wizard to specific user groups.

When a Form logic is assigned this way, it is used for input generation instead of a wizard logic.

Legacy: Configurator logic (still supported)

Existing wizards built this way continue to work unchanged, and it remains a supported option for new wizards:

  1. Define two generic calculation logics:

    • Configuration Wizard logic – defines the configurator UI with user inputs. See Interactive Forms - Configurators for details.

    • Execution logic – retrieves the inputs from the configurator and executes the programmed actions.

  2. Go to Administration > Configuration > Configuration Wizards Admin and add a new wizard.

  3. Select the previously created logics.

  4. You can limit the availability of the wizard to specific user groups.

Note: If you define both a Form logic and a configurator logic, Pricefx uses the Form logic and ignores the configurator logic.

Note: If you define neither a Form logic nor a configurator logic, the wizard reports an error.

The new Configuration Wizard will appear under the Company Processes menu, regardless of which approach you use.

Example:

For building the wizard's inputs, see the worked examples on the Forms 2.0 page (or Interactive Forms - Configurators if using the legacy Configurator approach).

The execution logic works the same way regardless of which approach was used to build the inputs — it retrieves the user-entered values by name and acts on them. For example, retrieving a selected product and label, and writing the label to the Products table:

def sku = input.Product def label = input.Label api.logInfo("Configurator Wizard Runner: sku", sku) api.logInfo("Configurator Wizard Runner: label", label) if( !sku ){ api.logInfo("Configurator Wizard Runner: SKU is missing!", "") return false } if( !label ){ api.logInfo("Configurator Wizard Runner: Label is missing!", "") return false } api.update("P", ["sku" : sku,"label" : label])

Further settings:

  • You can also add custom buttons to the wizard to allow users to perform various actions.

    The possible actions include:

    • recalculate configurator

    • open a document (Manual Price List, Quote, etc.)

    • execute the execution logic

    • clear and reset

    • close the configurator

    • open a web link in a new tab

    • launch a configuration wizard

    def ce = api.createConfiguratorEntry(InputType.BUTTON,"Next Step") //Create a button ce.setHiddenActions(InputButtonAction.ALL) //Hide all default action buttons. You can also hide only selected buttons: (InputButtonAction.CLEAR, InputButtonAction.RESET) ce.getFirstInput().setLabel("*Next Step") ce.getFirstInput().setLabelTranslations('{"en":"EN", "de":"DE"}') //Allows to select the language version ce.getFirstInput().setValueOptions(["3", "2", "1"]) //You can assign one of the default actions to a custom button: ce.createParameter(InputType.BUTTON, "Cancel") ce.inputs[idx].setLabel("Cancel") ce.inputs[idx].setValue(InputButtonAction.CANCEL) //Button to open a web link. The target page is opened in a new browser tab. ce.createParameter(InputType.BUTTON, "Pricefx") ce.inputs[idx].setLabel("Pricefx") ce.inputs[idx].setURL("http://www.pricefx.com") //you can also point to a page in the Pricefx app: ce.inputs[idx].setURL("priceFxWeb.html?targetPage=rebateAgreementsPage&targetPageState=${ra-"R-"}.RBA") //Button to open a previously selected Rebate Agreement: def ra = input."Rebate Agreement" ce.createParameter(InputType.BUTTON, "RA") api.logInfo("ra", ra) ce.inputs[idx].setLabel("Open ${ra}") ce.inputs[idx].addParameterConfigEntry("targetPage" ,"rebateAgreementsPage") ce.inputs[idx].addParameterConfigEntry("targetPageState" ,"${ra-"R-"}.RBA")
  • Results of the execution logic can be displayed directly in the wizard dialog (they are rendered as read only):

    def matrix = input."Configuration Attributes" //the inputs are passed from wizard logic def clusterName = input.ClusterName api.logInfo("matrix", matrix) def ce = api.createConfiguratorEntry() ce.setMessage("Cluster ${clusterName} was crated") return ce;

Found an issue in documentation? Write to us.

 
Pricefx version 17.1