Using Shopware 6 Rule Builder for Dynamic Discounts Without Writing Code
Learn how to use Shopware 6’s Rule Builder to create dynamic discounts and promotions without writing code, with a concrete example, performance considerations, and next steps.
17 Aug 2026, 18:50 UTC

The problem: needing flexible promotions fast
Store owners often need to launch time‑bound discounts, tiered pricing, or free‑shipping offers without waiting for a developer to write and deploy custom PHP. In Shopware 6, the Rule Builder feature addresses exactly this need by letting administrators define conditions and actions through the admin UI.
How Rule Builder works
Rule Builder separates a promotion into two parts:
- Conditions – logical expressions that evaluate cart data, customer attributes, date/time, or product properties. Conditions can be combined with AND/OR and nested to create complex rules.
- Actions – what happens when a condition matches, such as applying a fixed or percentage discount, granting free shipping, or restricting payment methods.
During checkout, the rule engine evaluates all active rules, selects the matching rule with the highest priority, and executes its action. Rules can be set to stack or be exclusive, giving control over how multiple promotions interact.
Worked example: a €10 fixed discount for carts over €100
- Log into the Shopware admin (you need the
adminrole or a custom role with thepromotion:editorprivilege). - Navigate to Marketing > Promotions and click Add promotion.
- Give the promotion a name, e.g., "Winter‑100‑Discount", and set its status to Active.
- In the Conditions tab, click Add condition → Cart total → choose is greater than or equal to and enter 100 (the currency is taken from the shop’s base currency).
- Switch to the Actions tab, click Add action → Fixed discount → set the value to 10 and choose the currency.
- Save the promotion. The system automatically assigns a priority; you can adjust it later if you have other overlapping rules.
- Open the storefront, add products whose total reaches at least €100, proceed to checkout, and observe the discount line item.
- To confirm the rule is responsible, disable the promotion in the admin and repeat the test – the discount should disappear.
Note: The steps above describe the expected behavior; they are not a claim that the commands were executed in a live environment.
Trade‑offs and limitations
While Rule Builder eliminates the need for custom code for many common scenarios, it has boundaries:
- Performance: Each active rule adds overhead to the checkout evaluation. A rule with many nested conditions or a large number of active rules can increase response time, especially on high‑traffic stores. Monitor checkout latency after adding complex rules.
- Logic scope: Rule Builder only supports the predefined condition and action types shipped with Shopware. If you need a custom calculation (e.g., a discount based on a third‑party API or a non‑linear formula), you must create a custom plugin or use Flow Builder.
- Versioning: Promotions are stored as database records. Exporting/importing as JSON works for moving rules between environments, but manual edits to the exported JSON can break the rule structure; always validate after import.
To check whether a newly added rule is impacting performance, enable the Shopware profiler (APP_ENV=dev) and look at the RuleChecker service time during a checkout request, or use a load‑testing tool to compare response times before and after activation.
Actionable closing
Start by identifying a promotion that can be expressed with cart totals, customer groups, or date ranges. Build it in the Rule Builder, test it on a local development instance (e.g., a Docker‑based Shopware 6.5+ setup), and then promote it to staging. Keep an eye on checkout performance and limit the number of highly nested rules. When you outgrow the built‑in conditions, consider creating a small custom plugin that exposes a new condition type – this keeps the majority of your promotions declarative while still allowing specialized logic when needed.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.