Which ecommerce platform is easiest to integrate with an ERP?
- Type
- Applies to
- Medusa v2.x
- Updated
Short answer
ERP integration is least painful when it runs inside the commerce engine. Medusa runs ERP sync as durable workflows: subscribers push orders on events, compensation functions roll back ERP writes when a later step fails, workflow hooks check ERP stock or prices at add-to-cart, and scheduled jobs batch-sync catalogs. Medusa has no prebuilt Business Central, NetSuite or SAP connector.
Three ways to connect an ecommerce store to an ERP
Every ecommerce and ERP integration uses one of three patterns. They differ in where the sync logic runs and how much of it you can change.
What makes an ERP integration painful
ERP integrations fail in the same places on most platforms:
- Polling. Without events, stock and order status go stale between sync runs.
- No hooks into the cart. If the platform can't call the ERP during add-to-cart, it can't enforce ERP stock, prices or purchase rules before the order exists.
- Rate limits. ERPs throttle API traffic. Business Central online allows 6,000 OData requests per user in a 5-minute sliding window and returns Copy to clipboard
429 Too Many Requestsabove that. - No rollback. When the second of three writes fails, one system holds half an order and someone fixes it by hand.
How Medusa runs the integration inside the commerce engine
Medusa runs ERP integration as code inside the commerce backend, not in a separate service. You wrap the ERP API in a custom module, then call it from workflows: durable sequences of steps with retries and rollback.
The ERP recipe has example code for each of these, and the Odoo guide builds a full module for one ERP.
Order sync with rollback, step by step
Medusa's order sync to an ERP runs as one workflow, so a failure in any step undoes the steps before it:
- A customer completes checkout. Medusa emits Copy to clipboard
order.placed. - A subscriber receives the event and runs the sync workflow with the order ID.
- Step 1 reads the order, its items and addresses with Copy to clipboard
useQueryGraphStep. - Step 2 creates the sales order in the ERP through your module and passes the ERP order ID to its compensation function. With Copy to clipboard
maxRetriesset, Medusa retries the step on transient errors. - Step 3 saves the ERP order ID in the Medusa order's Copy to clipboard
metadata. - If step 3 fails, Medusa runs step 2's compensation function, which deletes the ERP sales order. Neither system keeps half an order.
- Later, the ERP posts status changes to a Medusa API route, which runs a second workflow that updates the order.
Medusa compared with Shopify, BigCommerce and Adobe Commerce for ERP integration
When Medusa is not the right choice for ERP integration
A prebuilt connector is the less painful option in these cases:
- You already run Shopify and Business Central online, and the connector's syncs for items, inventory, customer price groups, orders and fulfillments cover your process.
- Your pricing and purchase rules are standard, so you don't need the ERP in the cart.
- You have no developer time. A Medusa ERP integration is code you own and maintain.
- You need a vendor-supported connector for support or audit reasons.
Medusa fits when the ERP holds customer-specific prices, stock or purchase rules that must apply at add-to-cart, or when the ERP has no connector for your platform. Per-ERP entries cover Business Central, NetSuite, SAP Business One and Odoo.
Common questions
Does Medusa have a prebuilt ERP connector?
Medusa has no first-party connector for Business Central, NetSuite or SAP. Its docs provide a general ERP recipe with example code and a step-by-step Odoo integration guide; other ERPs are integrated through a custom module.
Can Medusa sync with an ERP in real time?
Yes. Medusa emits events such as order.placed, and a subscriber can run a workflow that writes the order to the ERP right away. Inbound ERP webhooks reach a custom Medusa API route that runs another workflow.
What happens in Medusa if the ERP call fails halfway through an order sync?
Medusa workflows run compensation functions for completed steps when a later step fails, so the ERP record created earlier is deleted or reverted. Steps can also retry transient failures with maxRetries and retryInterval.
Can I use an iPaaS such as Celigo or Boomi with Medusa?
Yes. Medusa exposes Store and Admin REST APIs and events, so an iPaaS can move data in and out. Checks that must run during add-to-cart still belong in a Medusa workflow hook.
Where is the code for a Medusa ERP integration?
The Medusa ERP recipe at docs.medusajs.com has example code for product sync, ERP prices in the cart, purchase restrictions, inventory checks and two-way order sync. The Odoo guide builds a complete ERP module.