ml-connector
Microsoft Dynamics NAVWooCommerce

Microsoft Dynamics NAV and WooCommerce integration

An online store in WooCommerce generates orders from customers around the world. A manufacturing or distribution business runs Dynamics NAV to manage procurement, inventory, and finance. Connecting the two keeps your e-commerce orders flowing into your ERP as sales orders, your customers aligned across both systems, and your product inventory updated in real-time as Dynamics NAV stock levels change. ml-connector bridges the very different APIs, handles authentication on both sides, and moves the data on a schedule you control.

How Microsoft Dynamics NAV works

Microsoft Dynamics NAV exposes customers, sales orders, items, inventory levels, general ledger entries, and dimensions through OData v4 REST endpoints, authenticated with OAuth 2.0 client credentials via Microsoft Entra ID (or basic auth for legacy on-premises deployments). For cloud deployments the base URL includes the tenant ID and company ID. Dynamics NAV supports webhooks that push notifications when records change, with a 3-day subscription expiry, though polling is also available. Inventory items and general ledger accounts are read-only through the standard API, so Dynamics NAV is the source of truth for product data and financial records.

How WooCommerce works

WooCommerce is a self-hosted e-commerce platform that exposes customers, orders, refunds, and products through a REST API authenticated with API keys (Consumer Key and Consumer Secret pair). It publishes push notifications via webhooks for order created, order updated, customer created, customer updated, product updated, and refund events. Each WooCommerce deployment runs on a unique WordPress domain with no shared base URL. Webhooks disable automatically after 5 consecutive non-2xx responses and must be manually re-enabled. WooCommerce has no native accounting or procurement features, so it is strictly an order and customer source.

What moves between them

The primary flow is from WooCommerce into Dynamics NAV. On each order.created or order.updated webhook, ml-connector reads the order and customer data from WooCommerce and creates or updates a corresponding sales order and customer record in Dynamics NAV, mapped to the correct sales dimensions and price lists. A secondary flow syncs product inventory back to WooCommerce: when Dynamics NAV item quantities change (via purchase receipt or sales order fulfillment), ml-connector updates the corresponding WooCommerce product stock level so online availability stays current. Customer records flow bidirectionally so both systems show the same contact and payment details.

How ml-connector handles it

ml-connector stores WooCommerce API keys and Dynamics NAV OAuth 2.0 credentials encrypted and handles webhook events from WooCommerce in real-time. When a WooCommerce order arrives, ml-connector queries the full order and customer details, creates a sales order in Dynamics NAV with line items matched to the correct items (by SKU or product code), and assigns the order to the correct sales dimension and price list based on order source or customer segment. For inventory sync back to WooCommerce, ml-connector polls Dynamics NAV item quantities on a schedule (typically daily) and updates WooCommerce product stock levels. Webhook subscriptions in WooCommerce expire after 5 non-2xx responses, so ml-connector tracks subscription health and re-enables failed webhooks. Refunds and cancellations in WooCommerce trigger credit memo creation in Dynamics NAV if the original order already posted. Every order and inventory update carries a full encrypted audit trail and can be replayed if a downstream sync fails.

A real-world example

A small e-commerce retailer runs WooCommerce on its own WordPress site and Dynamics NAV to manage purchasing from suppliers, warehouse inventory, and finance. Before the integration, the owner manually exported orders from WooCommerce each morning, entered them into Dynamics NAV as sales orders by hand, and checked inventory manually to avoid overselling. When stock ran out in the warehouse, it took a day or two to update the website, leading to customer complaints. With WooCommerce and Dynamics NAV connected, orders appear as sales orders in Dynamics NAV within seconds of purchase, inventory is synced every few hours so the website always shows real stock levels, and the manual order entry step is eliminated.

What you can do

  • Create sales orders and customer records in Dynamics NAV automatically when WooCommerce orders are placed or updated.
  • Sync product inventory from Dynamics NAV to WooCommerce on a daily schedule so online stock levels match your warehouse.
  • Map WooCommerce customers to Dynamics NAV customer records with address, contact, and payment details.
  • Handle OAuth 2.0 authentication to Dynamics NAV and API key authentication to WooCommerce, with encrypted credential storage and automatic retry.
  • Maintain a full audit trail on every order and inventory change so failed syncs can be replayed without data loss.

Questions

Which direction does data move between Dynamics NAV and WooCommerce?
Orders and customers flow from WooCommerce into Dynamics NAV as sales orders and customer records. Product inventory flows from Dynamics NAV back to WooCommerce to keep online stock levels current. Refunds and cancellations in WooCommerce can trigger credit memos in Dynamics NAV if the original order posted.
Does the integration work with on-premises Dynamics NAV or only cloud?
The integration works with both Microsoft Dynamics 365 Business Central online and on-premises Dynamics NAV deployments. For on-premises systems, the administrator must enable OData services and open the OData port (7048) through the firewall. The base URL and authentication method differ between cloud and on-premises, and ml-connector accepts both.
How does the integration handle WooCommerce webhook failures?
WooCommerce disables webhooks automatically after 5 consecutive non-2xx responses. ml-connector monitors webhook health and re-enables failed subscriptions so order flow does not stop. Every order and inventory sync is tracked in an encrypted audit log so if a webhook fails, the records can be replayed once the connection is restored.

Related integrations

Connect Microsoft Dynamics NAV and WooCommerce

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

Get started