Improvement Proposal: Enhance Mail & Flow Logic for B2B Employee Context (Shopware Commercial)
Current Situation / Problem:
In B2B (Commercial) setups, there is a common requirement to send transactional emails (e.g. order confirmations) not only to the customer account, but contextually to the employee who actually placed the order.
At the moment, the following limitations exist:
- employee data is only available in mail templates if an employee is present in the order context.
- The Flow Builder does not provide conditions based on employee data (e.g. “employee exists”, “employee email”).
- Dynamic recipients (TO/CC/BCC) based on variables (e.g. {{ employee.email }}) are not supported.
- CC/BCC fields can only be configured statically.
- Workarounds (e.g. separate flows per customer) are not scalable.
Proposed Improvements:
1. Extend Flow Builder Conditions
Add new conditions such as:
“Order has employee”
“Employee attributes” (e.g. email, name, ID)
Provide access to employee fields similar to existing customer conditions
Support Dynamic Email Recipients
Enable variable-based configuration for:
TO
CC
BCC
Example:
TO: {{ employee.email }}
CC: {{ customer.email }}Recipient Fallback Logic
Allow conditional logic such as:
If employee exists → send to employee
Else → send to customerConsistent Template Variable Availability
Ensure employee is always available in templates (e.g. null if not set)
Avoid inconsistent behavior in the template editorOptional (Nice-to-have)
Introduce a recipient strategy setting (e.g. “Primary recipient = Employee / Customer / Both”)
UI support for typical B2B communication scenarios
Business Impact:
- Covers a core B2B commerce requirement (employees ordering on behalf of a company)
- Reduces manual effort in sales/customer service teams
- Prevents misrouted emails
- Significantly improves automation capabilities in Flow Builder
- Avoids the need for custom plugin development for standard use cases
Current Workaround:
- Display employee information in the email template
- Manual routing of emails after sending
- Alternatively: custom plugin development