How to use conditions in a business rule

A guide to setup and configure conditions in a business rule

Why use conditions?

Conditions allow a business rule to take on multiple different kinds of behavior depending on the input. This makes it possible to make rules that are more specific and flexible depending on what is needed.

Set up

Business rule setup page

To set up a condition for a business rule click the small "Add condition" circle between the trigger and the actions. This will take you to the set up conditions page.

Condition setup page

On the page click the "+ New condition"-button to add a condition.

Select condition
Configure condition

First you need to select a condition. For this example 'Previous attribute value condition' is chosen. Next you need to configure your condition if applicable. e.g. 'Color' and 'is not empty'. When you click confirm you have added the first condition to your condition set.

A condition set with 1 condition
A condition set with 2 conditions

If you wish to add just one condition you can click "Confirm". This will add the condition to your business rule.

You can also add more conditions to your condition set. If you wish to do so, you have to choose how they relate to each other. You can choose between "And" or "Or". "Or" requires only one condition to be met for the condition set to be fulfilled. "And" requires all of the conditions to be met. You can also choose to add another condition set by clicking "Add condition set".

Conditions setup page

Condition sets relate to each other in the same way conditions within a condition set do.

Once you are satisfied with your condition, click "Confirm".

Business rule setup page

Having added a condition, there are now 2 boxes that contains actions. One will execute if the condition is met and one will execute if the condition is not met.

You can add more conditions by clicking "Add condition".

Business rule setup page

These conditions will be checked sequentially from top to bottom, and the first condition that is met will have its corresponding action run.

So in this example, if the variant is using the product structure 'Non-food', it will not check anything else, since that is the first condition to be checked.

Last updated