Skip to main content
B2B-specific settings (e.g. groups, permissions, pricing logic).

b2b* - Basic structure

The basic structure of the b2b node is shown below:
{
  "b2b": {
    "access": {...},
	"accountVerification": {...},
    "userInvitation": {...}
  }
}

Parameter overview

ParameterDescription
accessControls access restrictions.
accountVerificationControls the invitation email and reminder logic for account verification.
userInvitationControls the invitation email and the associated reminder logic.

b2b.access - Access restrictions

Configures the access restrictions for B2B customers, for example after registration but before manual activation by the merchant.

Example configuration b2b.access

{
  "accessBeforeVerification": {
    "allowedTemplates": [
      "account/accountManagement.htm"
    ],
    "allowedUrls": [],
    "redirectTarget": "error.htm",
    "restricted": false
  },
  "allowedActions": [],
  "allowedTemplates": [],
  "allowedUrls": [],
  "redirectTarget": "error.htm",
  "restricted": false
}

Parameter overview

ParameterTypeDescription
accessBeforeVerificationobjectControls access restrictions for users who have not yet been verified.
restrictedboolTurns the access restriction for unverified accounts on (true) or off (false).
Default: false
redirectTargetstringName of the template that the user is redirected to when accessing a page that requires sign-in (e.g. error.htm).
allowedTemplateslist (string)List of templates that may also be called without sign-in (e.g. account/accountManagement.htm).
allowedUrlslist (string)List of URLs that may also be called without sign-in.
restrictedboolEnables manual account verification.
The customer / company can register themselves but is restricted until activation by the merchant.
Default: false
redirectTargetstringName of the template the user is redirected to if access is denied (e.g. error.htm).
allowedTemplateslist (string)List of templates that may be called before verification.
allowedUrlslist (string)List of allowed paths that may be called before verification (e.g. /login, /register).
allowedActionslist (string)List of allowed actions that may be used despite the active restriction (e.g. login, logout).
If the list is empty, no actions are explicitly allowed.

b2b.userInvitation - User invitation

Configures the email used to invite a new user to a B2B company account. The email contains an activation link the invited user can use to activate the account. Optionally, a reminder email can be sent as long as the invitation has not yet been accepted. The invitation link is valid for the duration defined in invitationLinkValidityInHours. After expiration the invitation must be sent again. If reminderActive: true, a reminder email is sent at the interval defined by reminderIntervallInDays for invitations that are still open. Example configuration b2b.userInvitation
{
  "email": {
    "fromAddress": "",
    "fromName": "",
    "subject": "",
    "template": ""
  },
  "invitationLinkValidityInDays": 1,
  "reminderActive": false,
  "reminderEmail": {
    "fromAddress": "",
    "fromName": "",
    "subject": "",
    "template": ""
  },
  "reminderIntervalInDays": 7
}
Parameter overview
ParameterTypeDescription
emailobjectConfiguration of the initial invitation email.
fromAddressstringSender address used when sending the email (e.g. noreply@mein-shop.de).
fromNamestringDisplay name of the sender in the email (e.g. “Mein Onlineshop”).
subjectstringSubject line of the email as shown in the customer’s inbox.
templatestringName or path of the email template to be used.
This controls the content and layout of the email.
invitationLinkValidityInDaysintValidity period of the invitation link in days.
reminderActiveboolEnables (true) or disables (false) the automatic sending
of reminder emails for invitations that have not yet been accepted.
reminderEmailobjectConfiguration of the reminder email.
Only used if reminderActive: true.
fromAddressstringEmail address from which the reminder is sent.
fromNamestringSender address used when sending the email (e.g. noreply@mein-shop.de).
subjectstringSubject of the reminder email.
templatestringContent of the reminder email.
reminderIntervalInDaysintInterval in days at which reminders are sent as long as the invitation is open and still valid.

b2b.accountVerification - Account verification

Configures the verification process for B2B accounts. With requireEmailVerification and requireManualVerification you control which kind of verification is required, while verificationMerchantEmail defines the emails sent on activation or revocation of an account. With permissionsBeforeVerification you define the permissions a not-yet-verified account has in the shop. Example configuration b2b.accountVerification
{
  "requireEmailVerification": true,
  "requireManualVerification": false,
  "verificationMerchantEmail": {
    "fromAddress": "",
    "fromName": "",
    "subject": "",
    "template": "",
    "subjectForRevocation": "",
    "templateForRevocation": ""
  },
  "permissionsBeforeVerification": {
    "viewProducts": true,
    "viewCategories": true,
    "viewPrices": false,
    "placeOrders": false
  }
}
Parameter overview
ParameterTypeDescription
requireEmailVerificationboolDetermines whether an email verification is required for new B2B accounts.
requireManualVerificationboolDetermines whether new B2B accounts must additionally be approved manually by the merchant.
verificationMerchantEmailobjectConfiguration of the emails for account activation and revocation.
fromAddressstringSender address used when sending the email (e.g. noreply@mein-shop.de).
fromNamestringDisplay name of the sender in the email (e.g. “Mein Onlineshop”).
subjectstringSubject line of the email as shown in the customer’s inbox.
templatestringName or path of the email template to be used.
This controls the content and layout of the email.
subjectForRevocationstringSubject line of the email when the account activation is revoked.
templateForRevocationstringName or path of the email template to be used for the revocation email.
permissionsBeforeVerificationobjectDefines which actions a not-yet-verified account may perform in the shop.
viewProductsboolDetermines whether products are visible to unverified accounts.
viewCategoriesboolDetermines whether categories are visible to unverified accounts.
viewPricesboolDetermines whether prices are visible to unverified accounts.
placeOrdersboolDetermines whether unverified accounts can place orders.
If false, basket actions are also blocked.