ml-connector
OdooWooCommerce

Odoo and WooCommerce integration

Odoo runs your accounting, inventory, and financials. WooCommerce runs your online store. Connecting them keeps your customer master and your sales orders aligned. New orders in WooCommerce flow into Odoo as sales invoices without re-keying, customers are added to Odoo's partner records, and the posted revenue lines up with your actual sales. ml-connector handles the different APIs on each side and moves the data on a schedule you control.

How Odoo works

Odoo is an open-source enterprise resource planning suite available as SaaS (Odoo Online), PaaS (Odoo.sh), or self-hosted. It exposes accounting records, purchase orders, partners, products, and employees via XML-RPC over HTTP POST and JSON-2 over HTTP POST (Odoo 19+). Authentication uses an API key paired with a username, either passed in a custom header for JSON-2 or included in the XML-RPC session after calling authenticate(). Odoo has no built-in webhooks suitable for production, so ml-connector polls the Odoo instance using a write_date filter to catch changes since the last sync.

How WooCommerce works

WooCommerce is an open-source e-commerce plugin for WordPress deployed on the merchant's own WordPress site at a unique domain. It exposes orders, customers, products, refunds, coupons, and taxes through a REST API at https://<customer-domain>/wp-json/wc/v3/. Authentication uses an API key pair (Consumer Key and Consumer Secret) via HTTP Basic Auth or OAuth 1.0a. WooCommerce supports webhooks for order, customer, product, and coupon events, and the webhook payload includes a HMAC-SHA256 signature that ml-connector validates to ensure the message came from the store.

What moves between them

The main flow is from WooCommerce into Odoo. Orders flow from WooCommerce into Odoo as sales invoices, each mapped to the correct Odoo sales account and customer. Customers flow from WooCommerce into Odoo's res.partner model so that all sales orders reference a known customer in the ERP. The sync happens on a schedule tuned to your sales cycle, and ml-connector can also accept WooCommerce webhook push events to trigger immediate syncs when orders or customers change. Data flows one direction; WooCommerce is read-only in this integration.

How ml-connector handles it

ml-connector stores both API key sets encrypted and presents the WooCommerce Consumer Key and Consumer Secret via HTTP Basic Auth on every REST call. On the Odoo side, it validates the base URL per customer since Odoo Online, Odoo.sh, and self-hosted deployments use different URL patterns, and uses the API key to authenticate with XML-RPC (Odoo 14 and earlier) or JSON-2 (Odoo 19+). WooCommerce webhooks are validated using HMAC-SHA256 with the webhook secret, and ml-connector registers a single endpoint per customer to receive order.created, order.updated, and customer.created/updated events. When a webhook is received, ml-connector posts the order to Odoo as an account.move with type invoice, or updates the res.partner record if the customer already exists. Because Odoo has no real-time hooks, ml-connector also polls Odoo and WooCommerce on a schedule to catch any missed events, and it handles WooCommerce's rate limits with backoff and retries. Every record carries a full audit trail so failed syncs can be replayed.

A real-world example

A small retail business runs their online store on WooCommerce and their accounting in Odoo. Before the integration, staff would export orders from WooCommerce at the end of each week and manually enter them into Odoo as sales invoices, matching each order to the customer already in the system. This was error-prone and time-consuming. With WooCommerce and Odoo connected, each order posts automatically to Odoo's general ledger as soon as it is created or updated in the store, new customers are added to the partner list, and the weekly reconciliation between the store and the books happens instantly.

What you can do

  • Post WooCommerce orders into Odoo as sales invoices, automatically mapped to the correct sales account and customer.
  • Sync WooCommerce customers into Odoo's partner records so all sales orders reference a known customer.
  • Validate WooCommerce webhook signatures using HMAC-SHA256 and accept push notifications when orders or customers change.
  • Authenticate WooCommerce with Consumer Key and Consumer Secret via HTTP Basic Auth, and Odoo with API key.
  • Poll on a schedule with retries and a full audit trail on every record, and replay failed syncs without manual intervention.

Questions

Which direction does data move between Odoo and WooCommerce?
The main flow is from WooCommerce into Odoo. Orders and customers flow from WooCommerce into Odoo's accounting module as invoices and partner records. WooCommerce is read-only in this integration; ml-connector does not write data back to the store.
How does the integration handle Odoo's different deployment types and lack of built-in webhooks?
ml-connector accepts the full Odoo base URL per customer, so it works with Odoo Online (https://<subdomain>.odoo.com), Odoo.sh (https://<subdomain>.odoo.sh), and self-hosted deployments. Because Odoo has no production-grade webhooks, ml-connector polls the instance on a schedule using a write_date filter to catch new and changed records since the last sync, and it also accepts WooCommerce webhook push events to trigger immediate syncs.
Does the integration work with both XML-RPC and JSON-2 APIs in Odoo?
Yes. ml-connector detects the Odoo version and uses XML-RPC for Odoo 14 and earlier, and JSON-2 for Odoo 19+. Both authentication methods are supported: API key in the custom header for JSON-2, and API key embedded in the XML-RPC session for older versions.

Related integrations

Connect Odoo and WooCommerce

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started