Design your customer structure

Contacts and roles

Who may see prices, place orders, and approve them.

A contact is one person at one company. Their role decides what they may do; the company they point at decides what they see.

Before you start: the organization has to exist first. A contact created without one is a standalone consumer record with no company prices and no company terms. See The B2B customer model.

Create a contact

  1. Go to CRM › Contacts.
  2. Select New contact.
  3. Enter the Email. This is the identity: it is unique per tenant and it is what the person signs in with.
  4. Enter First name, Last name, Phone and Job title. Job title is free text ("Werkstattleiter", "Leiter Einkauf") and grants nothing.
  5. Pick the Organization. This is the field that gives the person their company's prices, terms and order history.
  6. Pick the Role. See the ladder below. New contacts default to buyer unless another role is flagged as the default.
  7. Set the Order approval limit if the role approves. Empty means no ceiling.
  8. Set the Locale. It drives the shop language and the language of transactional mail. Only the store's supported locales are accepted.
  9. Tick Primary contact if this is the person you address by default.
  10. Save.

The role ladder

Five roles, least to most privileged. Each is a bundle of permission keys.

RoleTypicallyMay place an order?
viewerAn apprentice, a technician checking availabilityNo
requesterAnyone who needs a signature before spendingSubmits for approval
buyerThe person who orders consumables day to dayYes
approverA department head, a site managerYes, and signs others'
adminThe customer's own shop administratorYes, plus manages people

The permissions behind them are visible on CRM › Roles:

Permission keyWhat it allows
catalog.readSee products and prices
carts.manageCreate and edit own carts and order lists
orders.createPlace an order directly
orders.requestSubmit an order for approval instead of placing it
orders.approveApprove submitted orders, up to order_approval_limit
orders.readSee the organization's orders
addresses.manageMaintain the organization's addresses
contacts.read / contacts.manageSee / manage the organization's people
organization.manageEdit the organization's master data

Permissions are derived from the role every time they are read and never stored on the person, so changing a role's permission set cannot leave a stale grant behind on somebody.

Do not put job titles in role. The role is a closed list of five values and it is what authorization reads. A role column full of "Einkauf" and "Werkstatt" grants nobody anything the moment permissions are enforced. Job titles belong in job_title.

Change what a role grants

You can re-map the built-in roles to different permission keys, for example if buyer at your customers should not see the whole order history:

  1. Go to CRM › Roles.
  2. If the list is empty, select Load the built-in roles. Until a tenant has its own rows, every buyer is answered from the five built-ins and there is nothing to edit. Loading them writes the same permissions down, so nobody's access changes.
  3. On a role's row, select Permissions.
  4. Tick the keys the role should grant and save.

The permission editor replaces the whole set. Anything left unticked is revoked. Check the role's own page for its current grants before you edit.

Two limits to know about:

  • You cannot create a sixth role. contacts.role is constrained to the five keys, so a new role would be one nobody could hold.
  • A store setting can lock the ledger. With custom roles switched off, the built-in five are enforced whatever is stored.

Approval limits

order_approval_limit is an amount. The right to approve comes from the role; the limit says how far it reaches. It is denominated in the market's currency and is not converted. Empty means no ceiling.

Set it on the people who approve, and leave it empty on people who do not. A limit on a viewer has nothing to act on.

Who is the primary contact

is_primary marks the one person you address by default. Promoting somebody always demotes the previous primary; two people cannot both hold the flag. A store setting can additionally prevent the last primary contact of a company from being demoted or deleted, so checkout never meets a company with nobody to address.

What to check

  • Open the contact. The rail shows the role, the approval limit and whether they are the primary contact.
  • The Role & permissions section shows the grants this person holds right now, and whether they may act on them. A contact who is blocked or whose registration is still pending keeps the role but cannot act on it.
  • The Organization & status section links to the company. If it is empty, this person has no company prices.
  • The Contacts list has queues for Awaiting approval, Active, Invited, Blocked and Rejected. Use them instead of filtering by hand.

Next