You are currently viewing the article on an older Shopware version!

Rule Builder - Example rules

In this article we will explain different ways of using the Rule Builder using some example rules.

Shipping

Freight forwarding

If certain products are shipped by a forwarding agent and you want to use your own shipping method, you can solve this by using the tags on the product.
First create a tag for the desired products, e.g. with the title "shipping company". You can find more information about the tags on products here.
You can integrate these tags in the Rule Builder via the condition Position with tag.

In our example the rule is as shown below:

  • Name: Forwarding
  • Priority: 1 (if you wish to prioritise when using several shipping methods, please adjust the value accordingly)
  • Type (optional): shipping method (if you want to use the rule in other areas as well, you can add more types or leave the selection blank)
  • Conditions:
    • Position with tag | Is one of | Forwarding

You can now select this rule in the desired shipping method in the item availability rule.

If you want to block other existing shipping methods if there is at least one product with the tag "Forwarder" in the shopping cart, you can add the rules used for the other shipping methods.
Add an AND link and enter the following in the now additionally available condition

  • Position with tag | Is none of | Forwarder

Cash on delivery

If you want to use the cash on delivery service of DHL or another shipping service provider, it is not sufficient to have a cash on delivery shipping method. Since payment is also processed via this cash on delivery service and a payment method and a shipping method are always required for an order, it is necessary to create both a new payment method and a new shipping method.
First, you create a payment method and a shipping method for cash on delivery. These can be called, for example, both cash on delivery or DHL cash on delivery
You then create a new rule for the availability rule in the Rule Builder:

  • Name: Cash on delivery
  • Priority: 1 (If you wish to prioritize the use of several shipping methods, please adjust the value accordingly.)
  • Type (optional): Shipping type (if you want to use the rule in other areas as well, you can add more types or leave the selection empty)
  • Conditions:
    • Payment method | Is one of | Cash on delivery (Name of the Payment method)

You can now select this rule in the desired Cash on Demand shipping method in the availability rule item. 

You then add the additional charges for Cash on Demand shipping to the price matrix of the shipping method.  
 

Shipping by postal code

If you want to allow or deny shipping for certain zip codes, you can implement this with the Rule Builder.

First, you create a shipping type for the postal code shipping. This could be called, e.g., postal code
Then you create a new rule for the availability rule in the Rule Builder:
In our example, the rule looks like this:  
Name: Postal code

Priority: 1 (if you want a prioritization when using multiple shipping methods, please adjust the value accordingly)

Type (optional): Shipping type (should you wish to use the rule in other areas as well, you can add more types or leave the selection blank).

Conditions:

Shipping address: Zip code | Alphanumeric | Is one of | Postcode (The zip code of the delivery address)


You can now select this rule in the desired shipping type Postal code in the item availability rule

Payment methods

Payment method depending on customer group

If you want to release a certain payment method only for a certain customer group, you can create a rule with the condition Customer group.

In our example the rule is as shown below:

  • Name: Customer group retailers
  • Priority: 1 (if you wish to prioritise when using several shipping methods, please adjust the value accordingly)
  • Type (optional): payment method (if you want to use the rule in other areas as well, you can add more types or leave the selection blank)
  • Conditions:
    • Cumstomer group| Is one of | Retailer

You can now select the rule in the desired payment method in the item availability rule.

It is also conceivable to add a further condition to the rule above, e.g. to make the payment method additionally possible only from a certain purchase value (e.g. 250€).
In this case, add another condition using the AND link and insert the following in the second condition

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

Promotions

Discount from basket value x

If you want your customers to receive a discount from a certain shopping cart value, you can use a condition of the type Cart amount or Goods price. The difference between the two conditions is that the shopping basket value is calculated including shipping costs and less any discounts and the price of the goods in the basket is the sum of the prices of all the products in the basket.

The rule could be as shown below:

  • Name: Discount from basket value x
  • Priority: 1 (if you wish to prioritise when using several shipping methods, please adjust the value accordingly)
  • Conditions:
    • Cart amount | greater than/equal | 100

or

  • Conditions:
    • Goods price | greater than/equal | 100

You can now select the rule in the desired discount action in the tab Preconditions in the item Baskets.

Free shipping above basket amount x

If you want your customers to receive free shipping when the shoppin cart value is above a certain amount, you can set the following discount rule.
 

  • Name: free shipping above X (set your own desciption)
  • Priority: 1 (if you wish to prioritise when using several shipping methods, please adjust the value accordingly)
  • Conditions:
    • Saleschannel:  Define in wich channels the discount should be set.
    • Customer-rule: Leave free.
    • Shoppingcart-rules: Set a rule with the following definitions:
      Total > Is greater than/ equal to > shopping cart amount e.g. 50
    • Order Rules: Leave free
  • Discounts
    In the next step, you must navigate to the area Marketing > promotions in your administration. 
    • Define a new discount
    • Apply to: shipping costs
    • Type:  Percentage
    • Value: 100 (%)

If you want, you can define several discounts in response to the shopping cart value.
For example: above 25 EUR/$/£ > 50% discount and above 100 EUR/$/£ > 100% discount on shipping costs.
Important: When serveral discounts are set, set the condition "Do not combine with" regarding to the discount amount and the highest discount with the highest priority.

Was this article helpful?