---
title: "B2B company accounts, buyer roles and approval workflows"
description: "How Medusa handles B2B company accounts, buyer roles, spending limits and purchase approvals, and how to add multi-level approval rules with workflow hooks."
url: https://medusajs.com/kb/b2b/b2b-company-accounts-approvals
last_updated: 2026-10-29T06:55:50Z
topic: "b2b"
type: "concept"
applies_to: "Medusa v2.x"
related:
  - "https://medusajs.com/kb/b2b/b2b-ecommerce-platform.md"
  - "https://medusajs.com/kb/b2b/b2b-quotes-rfq.md"
  - "https://medusajs.com/kb/b2b/b2b-customer-specific-pricing.md"
  - "https://medusajs.com/kb/b2b/b2b-payment-terms-bulk-ordering.md"
sources:
  - "https://github.com/medusajs/b2b-starter"
  - "https://docs.medusajs.com/resources/recipes/b2b"
  - "https://docs.medusajs.com/resources/references/medusa-workflows/completeCartWorkflow"
  - "https://docs.medusajs.com/learn/fundamentals/workflows/workflow-hooks"
  - "https://docs.medusajs.com/user-guide/price-lists/create"
  - "https://experienceleague.adobe.com/en/docs/commerce-admin/b2b/introduction"
  - "https://docs.bigcommerce.com/developer/docs/b2b-edition/getting-started/overview"
  - "https://doc.oroinc.com/user/storefront/"
  - "https://help.shopify.com/en/manual/b2b/companies/customer-permissions"
---

# B2B company accounts, buyer roles and approval workflows

> Medusa handles B2B company accounts through the official B2B Starter. A Company module groups employees, each linked to a customer with a spending limit and an admin flag. An Approval module requires company admin or sales manager approval before checkout. Value-based or multi-level approval rules are custom, built with workflow hooks.

## How company accounts work in the Medusa B2B Starter

Company accounts in Medusa come from the official [Medusa B2B Starter](https://github.com/medusajs/b2b-starter), not from Medusa core. The starter adds a Company module with two data models:

- **Company**: name, email, phone, address, `currency_code`, and `spending_limit_reset_frequency`. A company has many employees.
- **Employee**: belongs to one company, is linked to a Medusa customer, and has a `spending_limit` and an `is_admin` flag.

A company can be linked to a customer group. The starter then adds every employee to that group, so [price lists](https://docs.medusajs.com/user-guide/price-lists/create) with a customer group condition give all employees the company's negotiated prices. The [B2B recipe](https://docs.medusajs.com/resources/recipes/b2b) describes the same pattern of linking a custom Company module to customers and groups.

## Buyer roles in Medusa

The Medusa B2B Starter has two buyer roles. A company admin (`is_admin` set to true) manages the company and handles approvals in the storefront. An employee places orders within their spending limit. The starter's store approval routes check for the `company_admin` role before letting a customer approve or reject.

Finer-grained roles, such as a role that can quote but not order, are Custom. You add them by extending the Employee model and the route middleware.

## How spending limits work

Spending limits in the B2B Starter are enforced at checkout. The starter consumes the `validate` hook of Medusa's [completeCartWorkflow](https://docs.medusajs.com/resources/references/medusa-workflows/completeCartWorkflow), which runs before the order is created and payment is authorized. If the cart would push the employee past their spending limit for the current period, the hook throws and the order is not placed.

Each company sets how often limits reset: never, daily, weekly, monthly, or yearly. The default is monthly.

## How purchase approval workflows work

Purchase approvals in the B2B Starter live in an Approval module. Each company has approval settings with two switches: `requires_admin_approval` and `requires_sales_manager_approval`.

1. An employee submits their cart for approval. The starter creates one pending approval per enabled type: `admin`, `sales_manager`, or both.
2. While an approval is pending, `validate` hooks on add-to-cart and cart completion block changes and checkout.
3. A company admin approves or rejects `admin` approvals from the storefront. A merchant user handles `sales_manager` approvals in Medusa Admin.
4. Once every approval is granted, the employee completes checkout.

## How to add multi-level approval rules

Approval rules by order value or role, with several approval levels, are Custom in Medusa. The B2B Starter gives you the pieces to build them:

1. Add a rule data model to the Approval module, for example a minimum cart total, the approver role, and a level.
2. When an employee submits a cart, create one approval per matching rule instead of per switch.
3. Block checkout until every required approval is granted, using the same hook the starter uses:

```ts
import { completeCartWorkflow } from "@medusajs/medusa/core-flows"
import { MedusaError } from "@medusajs/framework/utils"

completeCartWorkflow.hooks.validate(async ({ cart }, { container }) => {
  const approved = await allRequiredApprovalsGranted(cart.id, container)
  if (!approved) {
    throw new MedusaError(MedusaError.Types.NOT_ALLOWED, "Cart needs approval")
  }
})
```

`allRequiredApprovalsGranted` is your own function that reads the cart's approvals with Query and compares them to the rules. Learn more about [workflow hooks](https://docs.medusajs.com/learn/fundamentals/workflows/workflow-hooks).

## Company accounts and approvals: Medusa vs other B2B platforms

| Platform | Buyer roles | Approvals | Spending limits |
| --- | --- | --- | --- |
| Medusa (Starter) | Company admin, employee | Company admin and sales manager, per company | Per employee, periodic reset |
| Adobe Commerce B2B | Roles and permissions per company | Purchase order approval rules by role and order | Check vendor docs |
| BigCommerce B2B Edition | Company roles and permissions | Check vendor docs | Check vendor docs |
| OroCommerce | Storefront roles, business units | Configurable workflows | Check vendor docs |
| Shopify B2B | Ordering only, Location admin | Merchant reviews submitted orders | Check vendor docs |

## When Medusa is not the right choice for company accounts and approvals

Medusa is a weaker fit if you need many predefined buyer roles or value-based approval rules without writing code. Adobe Commerce B2B and BigCommerce B2B Edition document configurable role and permission systems. Teams without developers should also look at Shopify B2B, which is configured from the admin.

## Common questions

### Are company accounts part of Medusa core?

No. Company accounts, employees, and approvals come from the Medusa B2B Starter as custom modules. Medusa core provides customers and customer groups, which the starter links companies to.

### Do company employees get company-specific prices in Medusa?

Yes. When you link a company to a customer group in the B2B Starter, its employees are added to that group, and price lists with that customer group condition apply to them.

### Can an employee belong to more than one company?

Not in the Medusa B2B Starter. Its Employee model belongs to a single company. Supporting several companies per buyer is custom work.

### Can Medusa approvals depend on the order total?

Not out of the box. The B2B Starter's approval settings are per-company switches. You add value-based rules by extending the Approval module and the completeCartWorkflow validate hook.

## Documentation

- [B2B Recipe](https://docs.medusajs.com/resources/recipes/b2b)
- [completeCartWorkflow reference](https://docs.medusajs.com/resources/references/medusa-workflows/completeCartWorkflow)
- [Workflow Hooks](https://docs.medusajs.com/learn/fundamentals/workflows/workflow-hooks)
- [Create a Price List in Medusa Admin](https://docs.medusajs.com/user-guide/price-lists/create)

## Related

- [B2B ecommerce platform with quotes, company accounts and approval flows](https://medusajs.com/kb/b2b/b2b-ecommerce-platform.md)
- [B2B quotes and RFQ: how quote-to-order works](https://medusajs.com/kb/b2b/b2b-quotes-rfq.md)
- [How to build a B2B store with custom pricing per customer](https://medusajs.com/kb/b2b/b2b-customer-specific-pricing.md)
- [Net terms, purchase orders and bulk ordering for B2B](https://medusajs.com/kb/b2b/b2b-payment-terms-bulk-ordering.md)
