Your business goal is closer with Shopware 6 Rule Builder

To meet the growing needs of your business, rapidly changing market conditions and remain flexible, you can perfectly automate customer-centric business processes without code using the Rule Builder. By defining rules based on conditions, your business can scale quickly. This allows you to customise different settings and features and focus on valuable resources.

What is Shopware Rule Builder? First steps

Our article is about the Rule Builder module. This module allows you to define rules with which you can customise various settings and functions. For example, if you want to restrict a certain shipping method for certain countries, you can use options and conditions in the Rule Builder. The module can be found under "Settings" - "Shop" in the admin area.

shopware-6-rule-builder

Here you will find an overview of the rules that have already been created by default. It is possible to display or hide the columns using the context menu directly next to them. The columns can also be sorted accordingly. You can move them up and down and add further columns to the overview as required, such as tags, product price assignments, dispatch type price assignments, etc. Rule Builder allows you to create different rules, e.g. based on data from Shopware 6 Logs.

shopware-rule-builder

On the right-hand side, you can use the filter option to filter the rules according to condition types, condition assignments or tags.

shopware-6-rule-builder-erweitern

Important components of Shopware 6 Rule Builder

The following columns are decisive for the overview of all rules:

  • "Name" is the first column of a rule. It is necessary to specify a name in order to assign the rule to other modules.
  • The second column, "Priority", determines the order in which other rules are applied. If there is more than one rule, a rule with priority 2 is applied before a rule with priority 1, but after a rule with priority 3.
  • Next comes the "Description" column, where you can add information for all users.
  • The "Last edited" column indicates the most recent changes.
  • The date of creation is displayed in the "Creation date" column.
  • The "Status" column shows whether the filled rule values are valid. They are only used if this is the case.

shopware-6-rule-builder-prioritat

Control components

Take a look at the components of rules. To do this, you must select one of the standard rules in the list. A rule consists of general information and conditions. Under the general information of Shopware 6 Rule Builder, the name, priority and description are displayed. Below this is the type, in which you can define and restrict the assignment options for your rule. You can also add tags. Next are the conditions.

rule-builder-shopware-6-deutsch

As soon as you are finished with all the necessary general information of the rule, you can start with the next part (conditions). This is important as it determines whether the condition rule is applied or not.

Creation of conditions and operator selection

Step 1

There are several fields under the condition. The parameter must be specified in the first field. The condition is selected from the list. For example, it can be "Subtotal of all discounts". An operator should also be specified. Depending on the selected condition, the following operators are available:

  • Equal: The saved value corresponds to the input.
  • Unequal: The stored value is different from the input.
  • Lis one of: The condition is fulfilled if at least one stored value matches the input.
  • Is not one of: There is no match between the saved value and the input.
  • Greater: The entered value is greater than the stored value, which means that the condition applies.
  • Greater than or equal to: The entered variable is equal to or greater than the saved variable.
  • Smaller: If the input is smaller than the saved value, the condition is fulfilled.
  • Less than or equal to: The input is equal to or less than the previously defined value, the condition is fulfilled. Select the operator "is greater than/equal to". In the next field, you should enter an input value (e.g. 40), which is usually applied. If the subtotal of all discounts is greater than/equal to 40, the rule is applied.

rule-builder

Depending on your selection, you can add a further OR link. The sub-conditions are created automatically when you switch between AND and OR links and the rule applies if all conditions with "AND link" are fulfilled. With the "Or link", at least one condition must be fulfilled for the rule to apply.

Step 2

Select the country of the billing address from the list in the "Add or condition" field. Different operators are displayed in the "Select operator" section. Select "is one of". Next, click on a country from those already registered in the system. You can select either one or more countries. When the conditions, operators and input values are specified, you can save the rule.

shopware-rule-builder-erweitern

Create new rule

To create a Shopware custom rule in the admin, you should go to "Settings" - "Rule Builder". Click on "Create rule". eine-Shopware-custom-rule

Now you have to fill in the mandatory fields. Enter a name (Test) for the rule and set the priority (3). The description type, text and tags are not mandatory fields. So you can leave them empty. At least one of the conditions must be selected. For example, select "Customer is active" from the list. The operator should be set to "Yes" or "No". If you select "Yes", for example, this rule must be saved first.

den-Shopware-6-Rule-Builder

Preview mode

The preview mode is available in commercial Shopware plans. Here you can check whether the rule works as intended. This mode checks the conditions in real time. You should activate preview mode and then select one of the orders from the list. Then you can see if the rule is true or false.  - If it is true, the conditions apply.

  • If the rule contains conditions that query a specific time, this time can be simulated using the "Time and date" field.

Rule assignment

Ihe next step is to assign the condition to one or more rules in the system. For example, you can add the shipping method availability rules. As soon as you click on it, you will see the list of shipping methods available for the rule. If only Standard is selected here, you can also add Express. To do this, tick the box next to Express, click on "Add" and then on Save to save the rule.

shopware-6

Hint: Rules cannot be deleted as long as they are assigned. Deleted rules cannot be restored.

It is also possible to add multiple rules to the Shopware 6 Rule Builder. This requires the plugin Rule Builder Extension (also for Shipping)**.

Other options for creating rules

Option 1

You can create new rules in the "Discounts & promotions" area, where you can see all promotions in the overview. When you create a promotion for new customers, click on "Create promotion", enter the name (New customers) and set a priority (1). It is necessary to activate the promotion in order to fulfil the conditions and discounts. As soon as it is activated, you can also see the conditions and discounts. Finally, the created promotion should be saved.

rule-builder-erweitern

Simply switch to the "Conditions" tab and scroll down. There are the customer rules here. Once you click on the box, you can see all the applicable rules listed. If you want to create a new rule, you can select "Create new rule".

shopware-6-rule-builder-deutch

The editor fields here look the same as in Rule Builder. For this new rule, you must select the name (new customer) again. Priority can be set to 10. The condition can be "Registered customer". Then select "Yes" and save the option.

rule-builder-shopware

For example, if the new customer places an order with a total value of more than 50, you can add another rule.  To do this, click on "Shopping basket rules" and then on "Create new rule".

  • Name: "Value greater than 50"
  • Priority: 1
  • Condition: "Total number of all products"
  • Operator: larger
  • Input value: 50

All of this should be saved.

shopware-6-rule-builder-erweitern-deutch

This rule will apply when a new customer places an order with a value of over 50.  You should save the action for this.

Option 2

Another way to create new rules for pricing is through "Catalogues"/"Products".

shopware-6-custom-rule

If you go to an item that is listed in the products, switch to the extended pricing here. You can then create a new rule for extended pricing.

shopware

After "Create new rule" has been selected, the name must be entered, e.g. for the standard group. This pricing will then only be applied to the standard customer group. Next comes the priority (5) and "Customer group" should be selected from the list as the condition parameter. The operator is set to "is one of" and Standard customer group is selected. This means that the customers in the standard customer group have extended prices for a specific product. The rule is saved.

shopware-rule

The rule can now be corrected. You can lower or raise the price.

It is also possible to add additional price rules by clicking on the advert price rule. When you are finished with all the conditions and rules, click on "Save" before exiting.

shopware-6-how-to

We have shown you the areas in which you can create new rules. Use Rule Builder to create the conditions according to your organisation. To set up the triggers for events via rules and automate the business processes, use Shopware 6 Flow Builder.

Wenn Sie immer neue Features und Verbesserungen von Rule Builder wünschen, vergessen Sie Shopware 6 Update nicht. Dank modernsten Optimierungen werden die Geschäftsprozesse noch besser gestaltet.