ml-connector
OdooShopify

Odoo and Shopify integration

Odoo runs your back-office accounting and inventory. Shopify runs your storefront and order fulfillment. Connecting the two keeps your financial records and stock levels aligned across both systems. Orders placed in Shopify create sales invoices in Odoo without re-keying, and inventory adjustments in Odoo flow back to Shopify so your storefront shows accurate stock. ml-connector bridges the very different authentication models and transforms the data between them on a schedule you control.

How Odoo works

Odoo is available as Odoo Online SaaS, Odoo.sh PaaS, or self-hosted. It exposes accounting moves, purchase orders, inventory, products, and partners through XML-RPC (HTTP POST to /xmlrpc/2/object) and JSON-2 REST endpoints (/json/2/<model>/<method>), both authenticated with an API key paired with a username login. Odoo has no built-in production-grade webhooks; external API access requires Odoo's Custom pricing plan, and webhooks through Automated Actions are available only in Enterprise with Studio. Integration is pull-based using high-water-mark polling with write_date filters.

How Shopify works

Shopify is a cloud e-commerce platform exposing orders, customers, transactions, payments, inventory, and products through its GraphQL and REST Admin APIs. Authentication uses OAuth2 Authorization Code Grant with offline tokens (prefix shpat_, long-lived) or online tokens (prefix shpua_, session-scoped). Shopify pushes order, customer, payment, and inventory events via webhooks to a registered endpoint, with deduplication via X-Shopify-Webhook-Id header and mandatory 401 return on bad signature. Finance topics include orders/create, orders/paid, orders/cancelled, customers/create, and inventory_levels/update.

What moves between them

Shopify order webhooks trigger the creation of sales invoices and journal entries in Odoo's general ledger, mapped to the correct accounting customer and revenue accounts. Odoo inventory moves (stock adjustments and product updates) are polled and synced to Shopify inventory levels so the storefront reflects accurate available quantities. Customer records flow from Shopify into Odoo as partners, creating new customers or updating existing ones. Payment transactions from Shopify orders are matched to Odoo sales invoices and reconciled. Odoo analytics accounts can be mapped to Shopify orders for cost allocation.

How ml-connector handles it

ml-connector stores Shopify OAuth2 tokens encrypted and validates incoming webhook signatures using the Shopify API secret before processing orders. On the Odoo side it authenticates with the API key and username, respecting that external API access requires the Custom pricing plan. Shopify webhooks are deduped via X-Shopify-Webhook-Id and trigger synchronous Odoo invoice creation with mapped GL accounts and customers. Inventory polling on Odoo runs on a schedule, reading products and stock moves with write_date filters to capture only recent changes and sync them to Shopify inventory levels. Customer syncs map Shopify customer email and phone to Odoo partner res.partner records, creating new partners if a match is not found. Shopify rate limits are handled with exponential backoff. Every record carries an audit trail and can be replayed if a downstream call fails.

A real-world example

A direct-to-consumer brand runs Shopify for e-commerce and Odoo for back-office accounting and inventory. Before the integration, orders landed in Shopify and the finance team exported order details daily, manually created sales invoices in Odoo, and re-entered line items and customer information by hand. Meanwhile, warehouse staff adjusted inventory in Odoo when goods arrived or were written off, and the accounting team manually synced those adjustments to Shopify to keep the storefront accurate. After connecting Odoo and Shopify, each order automatically creates a sales invoice in Odoo posted to the correct revenue account and customer, and inventory adjustments flow from Odoo to Shopify without manual entry. The finance team reconciles invoices against Shopify payments, and month-end reporting runs on live reconciled data rather than re-keyed estimates.

What you can do

  • Receive Shopify order and payment webhooks and create corresponding sales invoices and journal entries in Odoo's general ledger.
  • Sync Odoo inventory movements and product stock levels to Shopify to keep the storefront accurate.
  • Map Shopify customers to Odoo partners and create new customer records in Odoo on order receipt.
  • Authenticate Shopify with OAuth2 offline tokens and Odoo with API key plus username, validating webhook signatures on every inbound message.
  • Poll Odoo on a schedule using write_date filters for incremental updates, with retries and a full audit trail on every record.

Questions

Which direction does data move between Odoo and Shopify?
Shopify orders and payments flow into Odoo as sales invoices and journal entries. Odoo inventory adjustments and product updates flow into Shopify to sync stock levels on the storefront. Customer records flow from Shopify into Odoo as new partners. Odoo is the source of truth for general ledger and inventory accounts, while Shopify is the source of truth for orders and customer contact information.
Does Odoo have webhooks, or does ml-connector have to poll?
Odoo's native webhooks through Automated Actions require Enterprise + Studio and are not production-grade. ml-connector uses high-water-mark polling on Odoo with write_date filters to capture changes incrementally, reducing query load. Shopify provides production-grade webhooks that ml-connector receives and deduplicates via the X-Shopify-Webhook-Id header.
What happens if a Shopify order signature validation fails?
ml-connector returns 401 Unauthorized to Shopify, signaling that the webhook was not processed. Shopify will retry the webhook delivery with exponential backoff. This prevents processing forged or corrupted orders and keeps the audit trail clean.

Related integrations

Connect Odoo and Shopify

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

Get started