Adding rules to define complex Variant logic
By default, the system exports your configurator with any Variants that you designate as Active in the Product tab and makes them all available for selection in your configurator.
If you want to show or hide certain Variants depending on selections the consumer makes in your application, you must define specific rules in the Rules tab. For example, you can add a rule that makes the configurator displays different Variants of your product depending on the country the consumer selects in the application.
You can also make it so that when a consumer makes a selection, other Variant Sets or Pack Sets are automatically selected.
To add Rules for your configurator, follow these steps.
- In the Forma interface, select the Rules tab.
- Select Add and then select Rule.
- In the Name field, enter a name for the Rule.
- In the Description field, type a meaningful description for the rule.
- Under If, use the drop-down field to select the Variant Set, Pack Set, or Context that this rule applies to. For example, to select a specific market "Market".
- In the Condition drop-down field, select the condition you want the configurator to apply to the Variant Set, Pack Set, or Context that you selected. For example, "North America".
In the Then drop-down field, select one of the following:
- Select Available if you want the the configurator to show a specific selection when your Condition is true.
- Select Not Available if you want the configurator to hide a selection when your Condition is true.
- Select *Available with Changes if you want the configurator to show a specific selection with changes when your Condition is true.
- In the Condition drop-down box under Then, select the Variant Set or Pack Set, pack set that you want the configurator to make available or unavailable when your Condition is true.
(Optional) Do one of the following:
- To show or hide another Variant Set or Pack Set when your condition is true, select the Add (+) button. Then, select Set Feature Availabilities Action to identify the action and Variant Set or Pack Set.
- To make it so that another Variant Set or Pack Set is automatically selected in the configurator when your Condition is true, select the Add (+) button and then Select Feature Action and select Variant or Pack Set.
- To show or hide another Variant Set or Pack Set when your condition is true, select the Add (+) button. Then, select Set Feature Availabilities Action to identify the action and Variant Set or Pack Set.
Add more rules as needed.