Skip to content

Simple Formula Constraint Car Example

Formula constraints play a crucial role in ensuring that customers make valid and optimized selections when configuring a product. These constraints help guide users toward compatible choices by dynamically restricting or recommending options based on previous selections.

Simple Example: Car Configuration

Consider a car manufacturer that offers four different car models:

  • Small Sedan
  • Large Sedan
  • Small SUV
  • Large SUV

And a selection of four different sizes of wheels:

  • 18” Wheels
  • 19” Wheels
  • 20” Wheels
  • 21” Wheels

After selecting a vehicle, the customer can choose from a set of wheels ranging from the smallest to the largest available size. However, not all wheel options are suitable for every vehicle. The manufacturer may impose constraints to prevent incompatible combinations — for instance, the largest wheels might not be recommended for the small sedan due to performance, safety, or aesthetic considerations.

How Formula Constraints Work

In the product configurator, formula constraints define relationships programmatically. They ensure that selections remain logical, practical, and within technical limitations. This enhances the user experience by preventing invalid configurations while also aligning with engineering and design requirements.

Configurator Structure

The configurator consists of two main groups:

1. Car Group

  • Element: Select Car
    • Option 1: Small Sedan
    • Option 2: Large Sedan
    • Option 3: Small SUV
    • Option 4: Large SUV

2. Wheels Group

  • Element: Select Wheels
    • Option 1: 18” Wheels
    • Option 2: 19” Wheels
    • Option 3: 20” Wheels
    • Option 4: 21” Wheels

All options are displayed as radio buttons, meaning only one option per group can be selected at a time.

Applying Formula Constraints

If a user selects Option 1: Small Sedan, they should only be able to choose Option 1: 18” Wheels.

This constraint can be enforced in three ways:

  1. Hiding non-relevant options

    • If Small Sedan is selected, all other wheel sizes are hidden, leaving only 18” Wheels visible.
  2. Automatic selection

    • If Small Sedan is selected, the configurator automatically assigns 18” Wheels without requiring user input.
  3. A combination of both

    • Non-relevant options are hidden, and 18” Wheels is selected automatically for a seamless experience.

These approaches ensure that users make valid selections while simplifying the configuration process.

How to Make This Formula Constraint

This is a guide on how to create 3. A combination of both.

To implement this formula constraint, follow these steps:

  1. Navigate to Form Builder under the Configurator section:

    • Open the Configurator menu and go to the Form Builder section.
  2. Click “Formula Constraints” on your form:

    • Select Formula Constraints for the specific form where you want to apply the constraint.
  3. Click “Add Formula Constraint”:

    • If you have already created formula constraints, an overview of existing constraints will be displayed for this form.
  4. Fill out the fields:

    • Name (Required): Enter a descriptive name for the constraint. In this case, use:
      “If Option: Small Sedan is selected.” This also serves as the condition for the constraint.
    • Description (Optional): Provide additional details. Example:
      “Condition: If Option: Small Sedan is selected, Effect: Hide non-relevant wheel options and select Option: 18” Wheels.”
      This breakdown of condition and effect will be referenced later in this guide.
    • Ordering (Required): Enter a number to determine the execution order of this constraint.
      • Set this to 0 for now.
      • If another constraint needs to override this one in the future, assign it a higher number (e.g., 1).
      • The constraints are executed sequentially, with the highest number processed last.
    • Formula Constraint Categories (Optional): Select a category for this constraint, if applicable. For now, leave this field blank.
  5. Save and Back:

    • Once all necessary information is entered, click Save and Back to create the new formula constraint.
  6. Click “Formula Constraint Builder”:

    • Open the newly created formula constraint and click Formula Constraint Builder.
  7. Add the condition in the “Condition” tab:

    • Click the icon in the Build Condition field.
    • Under All Values, select Option Selected.
    • A list of all options available in the form will appear.
    • Select Small Sedan.
    • This completes the condition setup for the constraint.
  8. Go to the “Effects” tab and click “Add Effect”:

    • In the Build Effect section, you will see a Function and a Target.
    • The default function is set to Hide, which we will use in Step 9.
    • Click the function field and change it from Hide to Set.
    • Click Select Target.
    • Choose Option: 18” Wheels.
    • Click Confirm.
    • Set the value type to Boolean → True.
    • Click Save.
    • Now, when selecting Option: Small Sedan, the wheels are automatically set to Option: 18” Wheels.
  9. Click “Add Effect” to add another effect:

    • This creates another Build Effect section.
    • Click Select Target.
    • Choose Option, as we want to hide specific options.
    • Select Option: 19” Wheels.
    • Now, when selecting Option: Small Sedan, the Option: 19” Wheels will no longer be visible.
    • Repeat this step to hide Option: 20” Wheels and Option: 21” Wheels.
    • Click Save.

Now, if you go into the configurator and select Option: Small Sedan, the wheels are automatically set to Option: 18” Wheels, and all other wheel options will be hidden.