Learn how companies buy from you: how to model buyer organizations, the people who act for them, what each person may do, and how Orders get approved.
In B2B commerce, a business sells to other companies instead of individual shoppers. A company has departments and people who buy, manage, and approve on its behalf, and each of them may do different things. Business Units model these companies and their divisions. Associates are the people who act for a company, Associate Roles and Permissions define what each of them may do, and Approval Rules decide which Orders need approval. This area also covers how a company gets its own Products and Prices, and how merchants search for Business Units.
Seller account managers and administrators typically set up Business Units and Associates in the Merchant Center, and developers who build a Buyer portal use the APIs:
Key concepts
Seller and Buyer
For example, Zen Electron Trade sells electronics to companies such as Horizon Hotels. Zen Electron Trade is the Seller, and Horizon Hotels is a Buyer.
Business Unit B2B B2X
Business Units form a tree with a single Business Unit at the top. The top-level unit is a Company. Every unit below it is a Division, and each Division belongs to exactly one parent: the Company or a higher Division. A Buyer's Associate with the Permission to add child units can create Divisions themselves.
For example, Pacific Property Group is a Company with two Divisions: Residential and Commercial. The following diagram shows this hierarchy, where each Division belongs to its parent.
- In the Merchant Center: Add a Business Unit
- For developers: Entity relationships in the Business Units and Associates APIs overview
Associate
An Associate is a Customer who acts on behalf of a company. An Associate holds roles in a Business Unit, and the roles determine what the Associate may access and do, such as creating Carts or placing Orders. One Customer can be an Associate in several Business Units, with different roles in each.
For example, a purchaser at Pacific Property Group is a Customer who acts as an Associate of the Residential Division and buys on behalf of that Division.
- In the Merchant Center: Add an Associate to a Business Unit
Associate Roles and Permissions B2B B2X
An Associate Role groups Permissions. A Permission allows an Associate to take a particular action, such as managing Business Units, Associates, Approval Rules, or Approval Flows, or working with B2B resources like Carts and Orders. A role is assigned to an Associate in a Business Unit, and it controls what the Associate may do there. Roles can allow Associates to manage the Business Unit, manage other Associates, and make purchases on behalf of the Business Unit.
Sellers create and manage Associate Roles, including the Permissions of each role. A Seller also decides whether Buyers can assign a role to other Associates themselves.
The following diagram shows three example Associate Roles and what each of them allows.
- In the Merchant Center: Add an Associate Role
- For developers: Associate Roles and Permissions in the Business Units and Associates APIs overview
B2B resources
- For developers: B2B resources in the Business Units and Associates APIs overview
Inheritance
Inheritance lets a business set up access once at the top of its hierarchy and pass it down. Divisions can inherit Stores, Approval Rules, and Associates with their roles from the units above them. Associates and their roles are passed down within the hierarchy of Business Units, but only when the role assignment allows it. A Company has no parent, so it never inherits. A Division can inherit by default, and a business can turn inheritance off for a Division, or for a single Associate by turning it off for all of that Associate's roles. Changes to inherited Associates can take a short time to take effect.
For example, a Pacific Property Group administrator who is an Associate of the Company can also work in the Residential and Commercial Divisions, because the Company passes the role down.
Accumulative permissions of inherited roles
The Permissions of an Associate are the sum of the Permissions on the roles assigned directly to the Associate and on the inherited roles. The following diagram shows an Associate with two inherited roles and one role assigned directly, and the resulting Permissions.
- In the Merchant Center: Manage Associate Roles in a Business Unit
- For developers: Inheritance in the Business Units and Associates APIs overview
Approval Rule
Buyer Approval Flows provide a flexible approval process for the Orders of a Business Unit, which is useful especially for multi-tiered approval processes. An Approval Rule defines the conditions under which an Order needs approval from an approver before it can be ordered by a requester within a Business Unit. A rule has three parts:
- The conditions an Order must meet to qualify for the rule, such as the Order total being above a threshold or the Order containing specific Products.
- The requesters: the Associate Roles whose Orders the rule applies to.
- The approvers, organized in one or more tiers: each tier holds the Associate Roles that must approve the Order before it moves to the next tier.
A rule can be active or inactive, and only active rules are matched against Orders. For example, a Buyer can require that Orders above a certain total need approval first from the Project Team Lead or their substitute together with the Engineering Manager, then from the Head of Procurement, and finally from the Chief Executive Officer (CEO).
Configure Approval Rules
Approval Rules provide a flexible approach to defining approval requirements for Orders. For Approval Flows to come into effect, Buyers are required to configure Approval Rules as per their organizational requirements. Approvers are designated by Associate Roles, so a rule doesn't bind to specific individuals.
The configuration supports multiple tiers of approvers. The approvers of the next tier are required to approve an Order only after the preceding tier has approved it.
Within a tier, a Buyer can combine approvers in two ways:
- "Any one of": any one of a set of approvers can approve an Order for it to pass.
- "All of": all of the specified approvers must approve an Order for it to pass.
A tier can combine both. The following diagram shows one tier from the example above. The Order needs approval from the Project Team Lead or their substitute, and also from the Engineering Manager.
You can set Approval Rules explicitly on individual Business Units. Approval Rules can also be inherited, meaning rules set on a Business Unit can apply to other units lower in the hierarchy.
- For developers: Approval Rule in the Business Units and Associates APIs overview
Approval Flow
An Approval Flow is the approval process of one Order. It is linked to the Order and starts when the Order matches one or more Approval Rules. A single Approval Flow covers all the Approval Rules that match the Order. It holds whether the Order is approved or not, and the approval status of each approver. The platform announces when an Approval Flow is created, approved, rejected, or completed, so that a Buyer portal or another system can react to it.
Buyer portal
A Buyer portal is a frontend interface hosted and implemented by the Seller. The Associates of a Buyer company use it to manage their B2B resources, Permissions, and Approval Rules. The following diagram shows how an Associate uses the Buyer portal, which the Seller builds on the commercetools platform, to use B2B features such as Buyer Approval Flows.
- For developers: Buyer portal in the Business Units and Associates APIs overview
Business Unit Search
Business Unit Search lets merchants search across a large number of Business Units in a Project, which supports back-office use cases. In addition to the Merchant Center, Business Unit Search lets you search for Business Units in other back-office applications. It isn't intended for searching Business Units in a storefront.
- In the Merchant Center: Search for Business Units
- For developers: Business Unit Search in the Business Units and Associates APIs overview
How the concepts relate
The following diagram shows how Sellers, Associate Roles, Business Units, Associates, and approvals relate.
A Seller defines the Associate Roles, and each role groups Permissions. A Company contains Divisions, and each Business Unit has Associates who hold roles in it. A Business Unit owns B2B resources, uses Stores to decide which Products and Prices its Associates see, and sets Approval Rules. An Order that matches an Approval Rule gets an Approval Flow, which tracks its approval. Divisions can inherit Stores, Approval Rules, and Associates from the unit above them.
Lifecycle and states
Business Unit status
The following diagram shows how Seller-created and Buyer-created Business Units start as active or inactive, and how their status can change.
A Business Unit is active or inactive. A Business Unit created by a Seller is active by default, but the Seller can create it as inactive. A Business Unit created by a Buyer is inactive by default, so that a Seller can inspect it, assign the appropriate Products and Prices, and activate it only when it is ready to be used. A Project setting can change the default status for Buyer-created Business Units.
Inactive Business Units can't be associated with new Carts, Orders, Quote Requests, or Quotes. Deactivating a Business Unit doesn't affect inheritance: its child units remain active and keep inheriting the roles of Associates from the parent unit, even if the parent unit is inactive.
- In the Merchant Center: Deactivate a Business Unit
- For developers: Business Unit status in the Business Units and Associates APIs overview
Approval Flow status
The following diagram shows the statuses of an Approval Flow and what changes them.
An Approval Flow starts as pending to track the approval process. When all required approvers approve, its status changes to approved. If any rejection occurs, its status changes to rejected. When an Approval Flow is approved or rejected, the approval process is complete.
Selection and precedence rules
Which approvals an Order needs
The following diagram shows how the platform decides which approvals an Order needs after a Requester creates it.
The platform checks whether any Approval Rules match the Order. If none match, the Order bypasses the approval process. If one or more match, a single Approval Flow starts for the Order. The Order reaches full approval once all necessary approvers from the approver hierarchies of all the matching Approval Rules have approved. A single rejection rejects the entire Approval Flow.
Within a rule, approvers give their approvals in the order of the tiers. To streamline the process, a higher-level approver can also approve an Order before the Order reaches their tier. This early approval automatically approves all lower levels.
Which prices and products a company sees
Common scenarios
Company-specific products, prices, and discounts
The following table summarizes which resources you can use for which purpose in your use case.
| Resource | Use it for |
|---|---|
| Cart Discounts | Specifying the customer-specific Cart Discount on each Cart. |
| Channels | Specifying the customer-specific Price through the Channel set on each Price. |
| Stores | Specifying the customer-specific distribution Channel used for each Price, scoping the permission to the particular customer. |
| Product Selections | Specifying a customer-specific assortment of Products. B2B companies frequently have restrictions on which subset of their products they can make available to customers due to, for instance, purchase regions or legal restrictions. Not needed if all Products should be available for all customers. |
| Business Units B2B B2X | Representing the company that buys, so that its Associates act on its behalf. |
The following high-level approach to setting up company-specific products, prices, and discounts can vary depending on your Project model. A Seller creates a Channel to represent a specific set of Prices, creates a Product, and gives it a different Price inside the new Channel. The Seller then creates a Product Selection and adds the Product to it, and creates a Store and assigns the Channel and the Product Selection to it. The Seller assigns the Store to the Business Unit that represents the customer, and creates a Cart Discount in the Store. Finally, a Cart is created in the Store with the Product in it, and an Order is placed for the customer.
Depending on your use case, you may not need Stores at all. You can use Channels only. If you want to use Product Selections, you must use them together with Stores.
Several Divisions with the same prices and separate Orders
Volume-based price bands
For volume-based pricing, create a Store and a Channel per price band. Then add the appropriate Price to each Channel for each Product you want to sell. Assigning a price-band-specific Store to a Business Unit gives that Business Unit access to the correct pricing.
This approach isn't recommended for every checkout flow. In checkout flows where Buyers create their own Carts and Orders and can choose the Channel, a Buyer can select the pricing option for an Order. For those flows, create one Store for each product restriction and price combination instead.
Buyers create Carts and colleagues place the Orders
A Seller can set up Buyers who create Carts but need a colleague to place each Order. The Seller gives the Buyers a role that lets them create their own Carts, view the Carts of their colleagues, and place Orders from their colleagues' Carts, but not from their own. Because access to colleagues' resources doesn't include access to an Associate's own, Buyers in this setup can create Carts, but a colleague must place the Order.