ml-connector
Microsoft Dynamics NAVSalesforce

Microsoft Dynamics NAV and Salesforce integration

Microsoft Dynamics NAV runs your finance and operations. Salesforce runs your sales team. Connecting the two keeps customer records, sales pipeline, and order status in sync across both systems. New customers created in NAV show up in Salesforce, sales orders booked in NAV feed Opportunities and Orders in Salesforce, and updates made in Salesforce flow back to NAV customer records without duplication. ml-connector bridges the very different authentication schemes and manages NAV's webhook expiry so the sync never breaks.

How Microsoft Dynamics NAV works

Microsoft Dynamics NAV exposes customers, vendors, sales orders, purchase orders, sales invoices, general ledger accounts, items, dimensions, employees, and accounts through OData v4 REST endpoints. The cloud product (Dynamics 365 Business Central online) uses OAuth 2.0 client credentials via Microsoft Entra ID; on-premises instances support OAuth or legacy Basic auth with web service access keys. NAV supports webhooks for push notifications with a 3-day subscription window (must be renewed before expiry), with roughly 30-second batching when multiple records change. If webhooks are unavailable, ml-connector polls the OData endpoints. GL accounts are read-only; GL entries cannot be modified once posted.

How Salesforce works

Salesforce exposes Accounts, Contacts, Opportunities, Orders, Invoices, Leads, and Products through a REST API over OAuth 2.0 client credentials (server-to-server). Change Data Capture (CDC) provides real-time push notifications via the Pub/Sub API for Accounts, Contacts, Opportunities, Orders, Invoices, and Leads, with a 3-day event retention window. Salesforce also supports polling via the sobjects/updated/ endpoint with a datetime range. Session tokens expire after 2 hours by default. Note: Salesforce has no Purchase Orders or Payment standard objects (Payment requires Revenue Cloud or B2B Billing); the integration focuses on sales order and customer sync.

What moves between them

The main flow is Microsoft Dynamics NAV to Salesforce. NAV customers sync to Salesforce Accounts via OData webhooks or polling; NAV sales orders and their line items sync to Salesforce Orders and Opportunities. Invoice records from NAV are available in Salesforce as reference data. A secondary flow moves Salesforce Account changes back to NAV, refreshing customer addresses, credit limits, and other customer master attributes so both systems remain aligned. Customer creation and updates in Salesforce Leads can also trigger new Accounts in NAV if the workflow requires prospect management. All syncs run on a schedule tied to your business cycle (daily, per-transaction, or per-order); real-time CDC events from Salesforce supplement scheduled polling from NAV.

How ml-connector handles it

ml-connector stores both OAuth credential sets encrypted and acquires bearer tokens on each call. For NAV, it connects via the tenant-specific OData base URL (online or on-premises) and refreshes the webhook subscriptions every 2 days to avoid the 3-day expiry; if a webhook is missed or delayed, it falls back to polling the OData endpoint for any records changed since the last sync. For Salesforce, it subscribes to CDC events (Accounts, Orders, Opportunities) and listens for real-time pushes; it also polls the sobjects/updated/ endpoint as a fallback to catch any changes in case a CDC event was lost in the 3-day retention window. NAV customer numbers map to Salesforce Account external IDs to prevent duplicates. NAV sales order line items map to Salesforce Order line items, with item codes matched against Salesforce Products. If Salesforce Opportunities are used to track deals before they become Orders, ml-connector maps the opportunity amount and stage to NAV sales order status and expected value. HTTP 429 (rate limit) and 5xx responses trigger exponential backoff retries on both sides. Every record sync is audited with the source record ID, destination record ID, timestamp, and sync direction so replays are possible if a downstream call fails.

A real-world example

A regional manufacturing and distribution company runs Microsoft Dynamics NAV for operations and accounting. Their sales team uses Salesforce to track deals and manage customer relationships. Before the integration, sales had to manually re-enter NAV customer records into Salesforce, and when NAV sales orders were booked, the sales team did not see them in their Opportunities pipeline. Reconciling what was quoted, what was ordered, and what shipped involved hunting across two systems and reconciling by hand. With Microsoft Dynamics NAV and Salesforce connected, new customers and existing customer updates in NAV flow to Salesforce Accounts automatically. Sales orders booked in NAV appear in Salesforce as Orders and Opportunities, so the sales team sees real pipeline and fulfillment status. Customer changes made in Salesforce (address updates, contact name changes) sync back to NAV, eliminating manual re-entry and keeping both systems as a single source of truth for the customer.

What you can do

  • Sync Microsoft Dynamics NAV customers to Salesforce Accounts with automatic duplicate prevention using external IDs.
  • Flow NAV sales orders and invoices to Salesforce Orders and Opportunities so sales teams see real pipeline and fulfillment status.
  • Bridge NAV OAuth (Microsoft Entra ID) and Salesforce OAuth client credentials, managing token refresh and expiry.
  • Renew NAV webhook subscriptions every 2 days before the 3-day expiry window expires, with polling fallback if webhooks are delayed.
  • Keep customer master records aligned in both directions by syncing NAV customer changes to Salesforce and Salesforce Account updates back to NAV.

Questions

Which direction does data flow between Microsoft Dynamics NAV and Salesforce?
The primary flow is NAV to Salesforce: customers, sales orders, and invoices move from NAV into Salesforce Accounts and Orders. A secondary flow syncs Salesforce Account and Opportunity updates back to NAV, so customer master records and deal status remain aligned. Purchase orders and payments do not sync because Salesforce has no standard Purchase Order or Payment objects.
How does ml-connector handle NAV's 3-day webhook expiry?
ml-connector tracks each NAV webhook subscription and renews it every 2 days (before the 3-day deadline). If a webhook is missed, ml-connector falls back to polling the OData endpoint to catch any records changed since the last sync. This prevents the sync from breaking when subscriptions expire.
What happens when Salesforce CDC events are delayed or lost?
Salesforce Change Data Capture has a 3-day retention window. ml-connector supplements CDC with polling via the sobjects/updated/ endpoint, which returns all records changed within a datetime range. If an event falls outside the CDC window, polling ensures the change is still captured on the next sync cycle.

Related integrations

Connect Microsoft Dynamics NAV and Salesforce

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

Get started