How To Use Rule Builder In Shopware

The Most Popular Extension Builder for Magento 2

With a big catalog of 224+ extensions for your online store

Every eCommerce platform has options that allow you to treat consumers differently depending on their actions. Typically, you’ll develop a set of specific rules. If the required circumstances are satisfied, a consumer will be presented with a unique offer. This tutorial will show you how to use Rule Builder in Shopware. Rule Builder’s ability to support more regions and investigate why this capability is so valuable for extension builders and developers is also discussed here.

Table of Contents:

An overview of rule builder in Shopware

There’s little doubt about it: Shopware 6’s Rule Builder is a game-changer. This makes it possible to create and implement business logic on any website. When new business models and difficulties arise, the platform is well-positioned for rapid adaptation. In order for merchants to create their own distinctive and interesting shops, the Rule Builder includes development hooks that allow for future expansion. In this way, the merchants can make use of not just Shopware’s vision but also the large developer community, which has been working together for over a decade to bring innovation and creativity.

An overview of rule builder in Shopware

The Rule Builder is a great tool not simply because of what it can accomplish now but also because it can achieve in the future. In order to maintain Shopware 6’s position at the cutting edge of eCommerce innovation, its large open-source developer community has used the Rule Builder to provide a foundation for new apps and extensions. To summarize, the Rule Builder can offer the foundation for developing and delivering critical logic and functionality in a performant, updatable, and compliant manner - something that pays off, in the long run, every time.

How to use rule builder in Shopware

Basic settings

It is possible to get an overview of all previously made rules by going to the Settings > Shop > Rule Builder menu item in the main menu. The overview is separated into numerous columns, each of which displays the following information to you right away:

Basic settings

  • Name: This field contains the previously saved name for the rule. For example, this name is used in the administration to assign the rule to other modules and other modules.
  • Description: Displays a (optional) description of the rule and additional information regarding the rule’s application, if relevant.
  • Priority: The priority of a rule determines whether or not it is implemented before another rule if that rule is applicable. The greater the priority, the more quickly the task is completed.
  • Creation date: The regulation was first implemented on this date.
  • Status: Whether the rule is legitimate is shown by its status; only valid rules may be applied. Rules produced using the administrative interface are validated before being saved, and they can only be saved if all necessary fields are filled with valid values.

Create a new rule

In this part, we’ll go over how to establish rules, as well as various conditions and operators you may use to do this. At the conclusion of the document, you will also discover several examples of frequent cases that you can use as a starting point for developing your own rules. There must be at least one condition in a rule, but it may also have several criteria that are linked together by an AND / OR - connection.

It is also possible to include a sub-condition in the condition. The condition may be defined in further detail by using one of the different operators available when generating the condition, which vary based on the condition you choose. Select the Create rule option from the drop-down menu to create a new rule. Following that, the corresponding mask appears.

Create a new rule

In the general settings of the rule, you may give the rule a name and determine its priority, among other things. If many rules need to be run simultaneously, you may specify which rule should be executed first using the priority setting. These will be dealt with in the order of their priority. In addition, you may store descriptive text in the database.

For example, this may be used to describe what this regulation is intended to accomplish. This description is just shown in the administrative section and is not visible on the front-end. You may define the kind of rule to make this rule accessible only in specific program modules, such as shipping charges, by determining the type of rule in advance.

Configure basic operators

The majority of criteria are stated in further depth via the use of extra operators. The available operators vary depending on the situation, and not all choices are accessible for every condition. The following sections describe the functions of each operator:

  • Is Equal to: If the stored value is equal to or greater than the value entered, the condition is met.

Using Is Equal to operator

  • Is not Equal to: It is necessary to satisfy this condition if the stored value does not match the value entered.
  • Is one of: In this case, the condition is met if one of the stored values equals the specified value.
  • Is none of: The condition is met if none of the values in the database meet the specification provided.
  • Is greater than: If the relevant value is larger than the value stated above, the condition is satisfied. Otherwise, it is not.
  • Is greater than or equal to: If the matching value is equal to or higher than the value stated below, the condition is satisfied. else
  • Is less than: If the matching value is smaller than the value stated above, the condition is satisfied.
  • Is less than or equal to: In this case, the condition is satisfied if the corresponding value is equal to or less than the value specified above.

Set up conditions

You can use many conditions to optimize your custom rule in Shopware. This guide will also show you some of the most crucial ones. If you want to know more about other available conditions, check this link.

  • Always valid: This condition is always matched; hence, no additional setting is required.
  • Business customer: You may use this to determine whether or not the customer is a business. You have the option of selecting between the alternatives “Yes” and “No.”
  • Cart amount: Checking the number of items in your shopping cart is simple, thanks to several methods. Please remember that this condition does not have a monetary value ascribed to it. If you wish to attach this to a particular currency, you may add another condition for the currency that is linked by the AND operator.
  • Free shipping: It is possible to determine if the shopping cart presently includes any items that have been designated as free of shipping expenses by using the operators “Yes” and “No.”
  • Goods count: Using the number of items in the shopping cart, you may simply check the total number of products in the shopping cart; alternatively, you can use more detailed additional criteria to refine your search further.

Goods count condition

  • Payment method: This condition may be used to determine whether or not a particular payment type is being utilized. This may be accomplished by selecting between the operators “Is one of” and “Is none of.” From a drop-down menu, choose one or more of the payment options that are currently available. This may be used, for example, to prevent particular payment methods from being offered in conjunction with specific delivery options.
  • Sales channel: Choose one or more of the currently available sales channels from the drop-down menu. Moreover, you have the option of choosing between the operators “is one of” and “is none of.”

You may connect numerous criteria together under a single rule, enabling you to easily map even the most complicated circumstances. All requirements must be met in order for a rule to be deemed legitimate in the case of an AND connection. You should avoid accessing the same resource in both conditions of an AND operation since this might cause issues with the condition’s assessment.

For an OR connection to be legitimate, just one of the requirements must be satisfied. It is also possible to include sub-conditions in your logic. As a result, the system begins by examining the parent condition, and if that condition is fulfilled, the system then proceeds to explore the sub-conditions(s).

Remove rules

Rules may only be removed from the system if they are no longer required. To ensure that you do not draw a rule that is still in use by the system, you will get a notification informing you of where precisely the chosen rule can be found. Products, shipping expenses, or promotion are all examples of where this might be seen. For example:

Remove rules

According to this problem notice, two shipping kinds and one discount offer continue to employ the rule. You may choose to click on the link, which will take you straight to the location where the regulation is still in effect.

Crucial examples of using rule builder in Shopware

For Shipping

Freight forwarding

Create rules for shipping

If you have items that a forwarding operator transports and you wish to utilize your own shipping method, you may use the tags attached to the products themselves. Create a tag for the desired items, such as “shipping company,” and then add the tag to the chosen products. Using the condition Position with tag in the Rule Builder, you may include these tags into your rules. The following is an illustration of the rule in our example:

  • Name: Forwarding
  • Priority: 1 (If you desire to prioritize your orders while utilizing several delivery options, please change the amount of your order to reflect this) Type (optional): shipping method (If you wish to utilize the rule in other sections as well, you can either add different kinds or leave the option blank to make it more flexible.)
  • Conditions:
    • **Position with tag Is one of Forwarding**

You can now include this rule in the item availability rule by selecting the preferred delivery method from the drop-down menu. In order to prevent other shipping methods from being used, if there is at least one product in the shopping cart with the tag “Forwarder,” you may include the rules used for the other shipping methods in the shopping cart. Create an AND connection and type the following in the condition that is now accessible in addition to the previous one.

  • **Position with tag Is none of Forwarder**

Cash on delivery

Suppose you wish to utilize a cash-on-delivery service like DHL or another shipping service provider. In that case, it is not enough to have a shipping method that supports Cash on delivery. Keep in mind that that payment is also performed via this cash-on-delivery service. Because a payment method and a shipping method are always needed for each order, it is essential to establish both a new payment method and a new shipping method for each transaction. For Cash on delivery, you must first set up a payment method and a shipping method that are both secure. Depending on the provider, these might be referred to as Cash on delivery or DHL cash on delivery. You then build a new rule in the Rule Builder for the availability rule, as follows:

  • Name: Cash on delivery
  • Priority: 1 (If you want to prioritize the usage of different delivery options, please modify the amount of the order appropriately)
  • Type (optional): Shipping type (When using the rule in other places, you may either add additional kinds or leave the selection blank if you wish to use it in other areas as well)
  • Conditions:
    • **Payment method Is one of Cash on delivery** (Name of the Payment method)

You may now pick this rule in the chosen Cash on Demand shipment method in the availability rule item by selecting it from the availability rule drop-down menu. The extra costs for Cash on Demand shipment are then added to the price matrix of the shipping method, and the total cost of the shipping method is calculated.

For Payment methods

Payment method depending on customer group

For payment methods

If you want to restrict the availability of a particular payment method to a specific customer group, you may construct a rule with the condition Customer group in it. The following is an illustration of the rule in our example:

  • Name: Customer group retailers
  • Priority: 1 (If you desire to prioritize while utilizing several delivery options, please modify the value to reflect your preference)
  • Type (optional): payment method (If you wish to utilize the rule in other sections as well, you can either add additional kinds or leave the option blank to accommodate your needs)
  • Conditions:
    • **Customer group Is one of Retailer**

You may now pick the rule in the chosen payment method from the drop-down menu in the item availability rule. It is also possible to include an extra condition to the rule above, such as limiting the availability of the payment method to purchases above a specific amount (for example, 250€). This is where you would add another condition by utilizing the AND link. Then you would put the following in the second condition.

  • **Price shopping basket goods greater than/equal 250**

For Promotions

For Promotions

Discount from basket value x

A condition of the type Cart amount or Goods price may be used to provide your customers with a discount on their shopping cart totals that exceed a specified threshold. The difference between the two criteria is that the shopping basket value is calculated, including shipping charges but excluding any discounts. In contrast, the price of the items in the basket is computed as the total costs of all of the products in the cart. Following is an example of a rule:

  • Name: Discount from basket value x
  • Priority: 1 (Please modify the amount if you want to prioritize while utilizing several delivery options)
  • Conditions:
    • Cart amount | greater than/equal | 100 or
  • Conditions:
    • **Goods price greater than/equal 100**

Now, in the item Baskets, under the tab Preconditions, you may choose which rule should be applied to the desired discount action.

3 best plugins to enhance your rule builder management in Shopware

Rule Builder Extension for Shipping

The fundamental rules of the Rule Builder can be enhanced with additional conditions using the Rule Builder Extension for Shipping plugin. It is now able to include package dimensions in the description of delivery methods. This plugin will be especially useful if sections of your items are too large to ship through parcel service. Packaging sizes may be specified in the admin area’s regular product processing, with a rule for each delivery method, such as determining if the package can still be delivered by parcel service or whether a freight forwarder is necessary.

Rule Builder Extension for Shipping

Outstanding features:

  • The Rule Builder plugin allows you to design significant shipping cost rules in a straightforward manner.
  • Objects can only be measured up to a specific size (maximum value of length or width, or height).
  • All of the items that have the tag or characteristic XYZ: (required for mixed goods buckets of post products and expedition products at the same time in the shopping cart).
  • The discount is applied if all of the goods in the basket include the provided tags; the discount is not applied if none of the products in the basket contain the specified tags.
  • In the shopping cart, you can also do a search by manufacturer or category.

Price: €49 for an annual subscription.

Flow Builder Professional

You can use the Flow Builder Professional plugin to simplify and automate complicated business operations - all in one location and without writing a single line of code. Implementing efficient procedures saves time and resources. Take advantage of speedier response times and have more control over your company operations. Triggering webhooks is a Flow Builder feature that enables you to transmit data to API-based third-party applications. This streamlines the methods you connect to third-party systems, allowing you to optimize internal and external company activities.

Flow Builder Professional

Outstanding features:

  • Instant messaging technologies allow you to send messages to a variety of recipients.
  • Order information may be sent to linked systems for additional processing - for example, the webhook feature can be used to keep your excel spreadsheets up to date.
  • Data transfer to other systems, such as MailChimp, allows new subscribers to get previously delivered communications through email. Allow your customer relationship management software to automatically notify new customers (advanced knowledge required).
  • Adapt the Flow Builder even further to your business model and the capabilities of webhooks, whether it’s a B2C, B2B, or D2C transaction.

Price: This plugin is 100% free.

Badge Manager - Automatically activate badges according to your own rules

Do you wish to convey vital information to your consumers immediately in the listing, such as a discount, a delivery time, or stock availability? With the Badge Manager - Automatically activate badges according to your own rules plugin from UVALASoft, this is no longer a concern. Determine when you want to display which badge for which product in your own way and according to your own set of criteria. You have the ability to change the design and wording of the badge; in addition, it is possible, for example, to include a placeholder for the stock in the text.

Badge Manager - Automatically activate badges according to your own rules

Outstanding features:

  • You may configure a badge to react only to items with variations and offer the appropriate products in the listing with a lovely badge using the option “Check for variant presence” under the configuration item “Initial value.”
  • The “Discount” option in the “Initial value” configuration item enables you to provide a unique badge to all goods with a discount.
  • There is a placeholder provided to include the product’s current discount in the individual badge text.
  • You have two placeholders at your disposal, which you may utilize independently using the text modules.
  • The badges will then be applied to all goods in your business without the need for you to make any adjustments to the product.

Price: €69 for an annual subscription.

Final Words

Hopefully, this tutorial will help you understand how to use Rule Builder in Shopware. While many major eCommerce systems provide various excellent promotional options, Shopware is a step or two ahead of the competition in terms of capability and customization. Shopware Rule Builder is currently in its early stages of development but already has the ability to transform how eCommerce firms provide value to their consumers and automate internal operations for their employees.

Increase sales,
not your workload

Simple, powerful tools to grow your business. Easy to use, quick to master and all at an affordable price.

Get Started
avada marketing automation

Explore Our Products:

Subscribe

Stay in the know

Get special offers on the latest news from Mageplaza.

Earn $10 in reward now!

Earn $10 in reward now!

comment
iphone
go up