B2B

Medusa for B2B
B2B platform that works
with your existing systems
Build advanced B2B commerce applications with Medusa while seamlessly integrating with ERP, PIM,
and other systems for a fully connected commerce operation. All free and open-source.

Open-Source Starter
Starter packed with pre-built B2B features
Build advanced B2B commerce applications that seamlessly integrate with ERP, PIM, and other systems for a fully connected commerce operation.
- Company and employee accounts
- Employee spending limit
- Request for quote flow
- Bulk add-to-cart
- Custom line item pricing
- Account price lists and discounts
- Custom payment methods
- Multiple sales channels
- Extend pre-built B2B workflows
- Customer groups
- Bulk product uploads
- Cart approval flows
Seamless integration
Let a PIM or ERP handle your product and pricing
Our modular architecture lets you easily interact with outside systems. For instance, retrieve product information or pricing logic to create custom line items in your cart.

Customizations ready in hours, not weeks
10x time to market with no extra fees

Our Framework tooling gives you the entire middleware layer that usually takes months to build.

Unlike traditional commerce platforms, our B2B Starter is free and open-source.
Company-employee-links
Set up employee-to-company links with controls like spend limits and cart approval flows.

B2B account pricing
Create custom price lists for B2B accounts and automated promotions. Upload via CSV and manage in our bulk-editor.

Quotation management
Enable customers to request price quotes that merchants can comment on, accept, alter, or reject.

Multiple market and channels
Set up multiple sales channels and regions with different product and pricing rules to handle DTC, B2B, and offline orders.

Cloud+
Access Draft Orders and other premium plugins through Medusa Cloud
Use our pre-configured infrastructure and get future access to premium plugins such as Draft Orders, Gift Cards, and more.

Draft order
·
Module


Gift card
·
Module

Framework for customizations
Faster time to market with our framework
Our framework tooling lets you build custom integrations and features in no time. Easily add custom data models, modules, workflows, UI extensions, and API endpoints.
store.medusajs.com
create-order-in-erp.ts
sync-order-to-erp.ts
A workflow step performs a query or action in a system. Steps can receive inputs from previous steps and return data to be used in subsequent steps. You can resolve services in your steps, allowing you to build business logic involving Medusa’s core commerce modules, third-party systems, or custom systems.
To connect multiple steps together you create a Workflow. Creating a Workflow is like writing any other function. Behind the scenes Medusa generates a representation of your workflow that enables automatic retries of steps if they fail.
If step retries don't succeed, Medusa will rollback previous steps. A rollback will call a step's compensation method, ensuring your data is kept consistent across systems.
You can trigger your workflows anywhere in Medusa. Use your workflows in Subscribers to start them in response to an event. Start them in response to requests with API Routes. Or have them run on a defined schedule with Scheduled Jobs.
src > workflows > steps > create-order-in-erp.ts
1
A workflow step performs a query or action in a system. Steps can receive inputs from previous steps and return data to be used in subsequent steps. You can resolve services in your steps, allowing you to build business logic involving Medusa’s core commerce modules, third-party systems, or custom systems.
create-order-in-erp.ts
sync-order-to-erp.ts
src > workflows > steps > create-order-in-erp.ts
123456789101112import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk"export const createOrderInERP = createStep("create-order-in-erp"async (order: StepInput, { container }) => {const erpService = container.resolve("erp")const createdOrder = await erpService.createOrder(order)return new StepResponse(createdOrder)})
To connect multiple steps together you create a Workflow. Creating a Workflow is like writing any other function. Behind the scenes Medusa generates a representation of your workflow that enables automatic retries of steps if they fail.
create-order-in-erp.ts
sync-order-to-erp.ts
src > workflows > sync-order-to-erp.ts
1234567891011121314151617181920import { createWorkflow, WorkflowResponse } from "@medusajs/framework/workflows-sdk"import { createOrderInERP, transformOrder } from "./steps"export const syncOrderToERP = createWorkflow("sync-order-to-erp",(input: WorkflowInput, { container }) => {const medusaOrder = retrieveOrder(input.order_id)const createdOrder = when({ medusaOrder }, ({ medusaOrder }) => {return medusaOrder.status === "completed"}).then(() => {const preparedOrder = transformOrder(medusaOrder)return createOrderInERP(preparedOrder)})return new WorkflowResponse(createdOrder)})
If step retries don't succeed, Medusa will rollback previous steps. A rollback will call a step's compensation method, ensuring your data is kept consistent across systems.
create-order-in-erp.ts
sync-order-to-erp.ts
src > workflows > accept-quote.ts
123456789101112131415161718import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk"export const createOrderInERP = createStep("create-order-in-erp"async (order: StepInput, { container }) => {const erpService = container.resolve("erp")const createdOrder = await erpService.createOrder(order)return new StepResponse(createdOrder, createdOrder)},// In the face of errors, we roll back and delete the orderasync (createdOrder, { container }) => {const erpService = container.resolve("erp")await erpService.deleteOrder(createdOrder)})
You can trigger your workflows anywhere in Medusa. Use your workflows in Subscribers to start them in response to an event. Start them in response to requests with API Routes. Or have them run on a defined schedule with Scheduled Jobs.
create-order-in-erp.ts
sync-order-to-erp.ts
src > subscribers > sync-order-to-erp.ts
123456789101112131415161718192021222324import {type SubscriberConfig,} from "@medusajs/framework"import syncOrderToErp from "../workflows/sync-order-to-erp"export default async function handleOrderPlaced({event: { data },container,}) {const orderService = container.resolve("order")const order = await orderService.retrieve(id)await syncOrderToErp(container).run({input: {order},})}export const config: SubscriberConfig = {event: "order.placed",}
Real-life examples
Trusted by industry leaders
Medusa is the world’s most popular open-source commerce platform. Learn why leading B2B users opted for our flexibility.

+20M product configurations
Customers query millions of product configurations in real-time.

+$4bn GMV per year
Built India’s largest B2B platform — on time and under budget.

1,500 days of work saved
Cut development time by years using Medusa as B2B foundation.

+10k daily orders
Handles large order volumes across multiple vendor ERPs.
Get in touch
Let Medusa support your B2B journey
We have supported B2B companies of all sizes on their Medusa journeys. Let us help find the right Medusa Expert or leverage our Cloud+ plan for direct support from the Medusa core team.
