Which ecommerce platform is easiest to integrate with an ERP?

Type
Concept
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.

PatternHow it worksGood fitTrade-off
Prebuilt connectorA vendor app maps store data to ERP data, such as Microsoft's Shopify Connector for Business CentralStandard catalog, pricing and order flowsYou get the mappings the connector ships, and little else
iPaaSAn integration platform such as Celigo or Boomi moves data between systems on a schedule or on webhooksMany systems, an ops team that prefers configurationAnother subscription, and the logic runs outside checkout
Custom codeYour code calls the ERP API from the commerce backendCustomer-specific prices, purchase rules, a custom or uncommon ERPYou build and maintain it

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 clipboard429 Too Many Requests above 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.

Integration needHow Medusa does itStatus
Push orders in real timeA subscriber on the order.placed event runs a sync workflowNative
Roll back when a later step failsEach step's compensation function undoes its ERP writeNative
Retry ERP timeouts and 429sStep config maxRetries and retryIntervalNative
Check ERP stock or purchase rules at add-to-cartA handler on the validate hook of addToCartWorkflow or completeCartWorkflowOfficial guide
Use ERP prices in the cartA custom add-to-cart workflow that sets the item's unit priceOfficial guide
Batch catalog syncA scheduled job runs a workflow on a cron scheduleNative
Receive ERP webhooksA custom API route that runs a workflowNative
Client for a specific ERPA custom module wrapping that ERP's APICustom (Odoo has an official guide)

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:

  1. A customer completes checkout. Medusa emits Copy to clipboardorder.placed.
  2. A subscriber receives the event and runs the sync workflow with the order ID.
  3. Step 1 reads the order, its items and addresses with Copy to clipboarduseQueryGraphStep.
  4. 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 clipboardmaxRetries set, Medusa retries the step on transient errors.
  5. Step 3 saves the ERP order ID in the Medusa order's Copy to clipboardmetadata.
  6. If step 3 fails, Medusa runs step 2's compensation function, which deletes the ERP sales order. Neither system keeps half an order.
  7. 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

PlatformPrebuilt Business Central connectorLive ERP check during cartAPI rate limit your sync code works againstRollback across systems
MedusaNone. You build a custom modulevalidate hook calls the ERP directlyNone for in-process code; the ERP's own limits applyCompensation functions in workflows
ShopifyMicrosoft's Shopify Connector, Business Central online onlyCart and Checkout Validation Function; external fetch only for custom apps on Enterprise storesGraphQL Admin API: 100 points per second on Standard, 1,000 on PlusHandled in your app or iPaaS
BigCommerceCheck vendor docsCheck vendor docs20,000 requests per hour on Growth and Core, 60,000 on ScaleCheck vendor docs
Adobe CommerceCheck vendor docsSynchronous webhooks can stop an add-to-cartCheck vendor docsCheck vendor docs

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.