Invitations
Through invitations, owners and administrators add more people to their company. B2B+ Base supports two cases: an invitation to an existing customer and an invitation to an email address without an account.
Who may invite
Only the Owner and Administrator of a company may invite. Only the roles Administrator and Member can be invited — the owner role is not granted via invitation.
Storefront flow
- Sign in as owner/admin and open Account → Company account → Members.
- In the Invite a member section, enter the email address and the desired role.
- Click Invite.
Depending on the case, the shop reports:
- Existing customer: "The invitation has been sent."
- Unknown email address: "There is no customer account for this email address yet. The invitation will be completed once an account exists."
In both cases the same invitation email is sent, containing a personal accept link.
Existing customer vs. unknown email
| Existing customer | Unknown email (no account) | |
|---|---|---|
| What is stored | An open membership (status "Invited") with a single-use token, target email and expiry. | An account-independent invitation addressed to the email, with a single-use token and expiry. |
| Acceptance | The customer opens the link (signing in if needed) — the membership is set to "Active". | The person registers with the invited address — the invitation is automatically turned into an active membership. |
Re-inviting
If the same address is invited to the same company again, the existing open invitation is refreshed with a new token and updated role/expiry — no duplicate is created. If the person is already an active member, the invitation is rejected.
Validity
7-day validity
An invitation is valid for 7 days. After it expires it can no longer be accepted and must be re-issued. The validity period is fixed and not configurable.
The accept link
The invitation link has the form:
https://<your-storefront-domain>/b2b/company/invitation/{token}Behaviour when opened:
- Not signed in: the visitor is routed through the login page; the token is preserved so the invitation is redeemed immediately after login.
- Signed in: the invitation is redeemed if it has not expired and the invitation's email matches the email of the signed-in account. Then "You have joined %company%." appears.
- Already processed: if the invitation was already redeemed during registration (see below), the token is spent. If the person is now a member of a company, they are greeted kindly ("Your invitation has already been processed …") instead of shown an error.
Redemption on registration
When someone registers with an invited address, open invitations to that email are automatically turned into active memberships during registration. Opening the accept link afterwards is then just a confirmation. Expired invitations are not turned into a membership but are cleaned up.
The invitation mail template
The invitation is sent through an editable Shopware mail template (not via the Flow Builder). You can adjust the subject and content.
- Technical name of the template:
avellon_b2b_company_invitation - Label: "Company invitation (B2B+ Base)"
- Edit under: Shopware Administration → Settings → Email templates
Variables available in the template:
| Variable | Content |
|---|---|
company | The company (e.g. company.name). |
customer | The invited customer — present only if an account already exists. Guard with {% if customer %} in the template. |
salesChannel | The sales channel (e.g. salesChannel.name). |
invitationUrl | The absolute accept link. |
inviteEmail | The invited email address. |
Merchant edits are preserved
On a plugin update only missing templates are created anew. Content you have edited is never overwritten.
Delivery never aborts the invitation
If the mail cannot be sent (e.g. a missing template or a mail server error), the invitation is still created and the error is only logged. The accept link works regardless.