Using Shopware Rule Builder for Flexible Pricing and Promotions
Learn how Shopware’s Rule Builder lets you create declarative pricing rules without code, see a step‑by‑step example of a VIP discount, and understand the performance trade‑offs to watch for.
17 Apr 2026, 19:42 UTC

Problem: Hard‑coded promotions limit agility
Many Shopware stores need pricing logic that changes based on customer groups, cart contents, or time of day. When these rules are written directly in templates or custom plugins, every adjustment requires a developer deployment, version control, and testing. This approach slows down marketing teams and increases the risk of bugs slipping into production.
Thesis: Rule Builder provides a declarative, UI‑driven alternative
Shopware’s Rule Builder lets administrators combine conditions and actions through a visual interface. Under the hood each rule is translated into a Symfony expression that is evaluated on every frontend request. The result can adjust prices, hide payment methods, restrict shipping options, or apply free‑shipping thresholds — all without writing code.
Core concepts
Conditions
Conditions are the building blocks that determine when a rule fires. Examples include:
- Cart total amount (greater than, less than, equal to a value)
- Customer tag or group membership
- Presence of a specific product or category in the cart
- Date/time ranges (e.g., only during a holiday sale)
Each condition returns a boolean; the rule engine combines them using AND/OR logic as you define in the UI.
Actions
When all conditions evaluate to true, the associated actions are executed. Common actions are:
- Apply a percentage or fixed discount to the cart
- Grant free shipping
- Disable certain payment methods
- Show a custom message or badge
Actions can stack; a single rule may both discount the order and hide a payment method.
Evaluation and logging
On each storefront request, Shopware walks through the active rule set, evaluates the combined expression, and runs any matching actions. The system logs each evaluation under Settings > Logs > Rule Builder, showing the rule name, whether it matched, and the resulting actions. This log is the primary tool for verifying that a rule behaves as expected.
Worked example: 10% VIP discount for orders over €100
- Navigate to the Rule Builder: In the admin panel go to
Marketing > Rule Builderand clickAdd rule. - Define the condition:
- Click
Add condition. - Choose
Cart total amount. - Set the operator to
greater than or equaland the value to100. - Add a second condition:
Customer tagequalsVIP. - Leave the default AND linking (both must be true).
- Click
- Configure the action:
- Click
Add action. - Select
Discount. - Choose
Percentageand enter10. - Optionally limit the discount to specific product categories.
- Click
- Save and activate: Give the rule a name like
VIP 10% off €100+, toggle it toActive, and save. - Test in the storefront:
- Log in as a customer with the VIP tag.
- Add products totalling €120 to the cart.
- Observe the cart summary: a 10% discount (€12) should be applied, bringing the subtotal to €108.
- Log out or switch to a non‑VIP customer; the same cart should show no discount.
- Verify via logs:
- Open
Settings > Logs > Rule Builder. - Find entries for the rule name; you should see a log line indicating
matched: trueand the actiondiscount 10%when the VIP condition is satisfied. - For non‑VIP users the log will show
matched: false.
- Open
Trade‑offs and limitations
Performance impact
Every rule adds a Symfony expression evaluation to the request lifecycle. A handful of simple rules typically adds only a few milliseconds, but a large set of complex conditions (e.g., nested product‑attribute checks combined with date ranges) can increase response time noticeably. If you notice slower page loads, enable the Shopware profiler or run a quick load test with k6 or ab comparing baseline response time against the same traffic with your rule set active. Aim to keep the added latency under 150 ms for a comfortable user experience.
Learning curve for non‑technical users
While the UI removes the need for code, understanding how conditions combine (AND vs. OR) and how actions stack requires some training. Provide a short internal guide that shows a few example rules and explains the log output; this reduces accidental misconfiguration.
Dependence on core updates
Shopware occasionally refines the Rule Builder expression language or changes the UI layout in major releases. When upgrading, review the release notes for any breaking changes and test your existing rules in a staging environment before promoting to production.
Actionable closing: start small, measure, iterate
- Clone your production environment to a staging server – this lets you experiment without affecting live sales.
- Enable Rule Builder (if not already active) via
Settings > System > Pluginsand ensure theRuleBuilderplugin is installed. - Create a single, straightforward rule (like the VIP discount example) and verify it works using the storefront and the log.
- Monitor performance: use the built‑in profiler (
http://your‑shop/_profiler) or a lightweight load test to capture average response time with and without the rule. - Iterate: add more conditions or actions only after confirming that the current rule set stays within your latency budget and that the log shows the expected matches.
By treating Rule Builder as a configurable layer rather than a code‑free magic wand, you gain the agility to run targeted promotions while keeping the storefront performant and maintainable.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.