ml-connector
Microsoft Dynamics NAVMailchimp

Microsoft Dynamics NAV and Mailchimp integration

Microsoft Dynamics NAV holds your customer and vendor master data. Mailchimp runs your email marketing campaigns. Connecting them means your marketing team always has the current, correct customer list and can target campaigns by geography, business type, or transaction history without re-exporting spreadsheets. New customers added to NAV appear in Mailchimp automatically, and you avoid stale contact data and duplicate effort.

How Microsoft Dynamics NAV works

Microsoft Dynamics NAV (both on-premises and Business Central online) exposes customers, vendors, sales orders, purchase invoices, general ledger entries, and other business documents through OData v4 REST APIs at a tenant-specific and company-specific base URL. Authentication is OAuth 2.0 client credentials via Microsoft Entra ID, required for online and recommended for on-premises. NAV supports webhooks (which expire after 3 days and require renewal) or polling for data sync. Webhooks post to a subscriber URL with a clientState field for verification and batch multiple changes within a 30-second window. GL accounts are read-only and GL entries are immutable once posted. Webhook subscriptions are limited to 200 per online environment.

How Mailchimp works

Mailchimp is an email marketing and audience management platform that maintains contact lists, segments, and campaign history through REST API v3.0. Authentication is HTTP Basic Auth using an API key or OAuth 2 Authorization Code flow; the API key includes a data center prefix that routes requests to the correct regional endpoint. Mailchimp also supports webhooks for list and campaign events and has an e-commerce API for syncing orders, but is fundamentally a messaging system with no financial records, purchase orders, or accounting capabilities. OAuth access tokens do not expire, and there is no refresh token.

What moves between them

Customer and vendor records flow from Microsoft Dynamics NAV into Mailchimp lists and list members. Customers become contacts in one Mailchimp list, vendors become contacts in a separate list, and additional fields such as business type, location, or customer/vendor number are mapped to custom Mailchimp contact fields so marketing campaigns can segment by those attributes. The flow is one-direction (NAV to Mailchimp) because Mailchimp has no purchase order or financial capability. Sync occurs on a schedule or in response to webhook notifications from NAV, and because NAV webhooks expire every 3 days, ml-connector must renew subscriptions before expiry to maintain continuous sync.

How ml-connector handles it

ml-connector stores NAV OAuth credentials securely and exchanges them for a bearer token that it uses on every OData v4 API call. Because NAV webhooks expire after 3 days (not a standard expiry window), ml-connector checks subscription age continuously and renews subscriptions before they expire, ensuring NAV changes trigger sync without polling gaps. It also maps NAV's OData JSON structure to Mailchimp's contact and list-member schema, handles NAV's 30-second batching of webhook notifications (where many changes within 30 seconds fire as a collection instead of per-record), and validates that critical fields (email address for Mailchimp, customer/vendor number for NAV) are present before syncing. ml-connector stores the Mailchimp API key securely and extracts the data center prefix to route requests to the correct regional endpoint. It retries rate-limited requests (HTTP 429) and persists each record send so failed syncs can be replayed without duplicate imports.

A real-world example

A mid-market B2B software company uses Microsoft Dynamics NAV as its ERP for invoicing and customer master data, and Mailchimp for customer newsletters, renewal campaigns, and event invitations. Previously, the marketing team maintained a manual spreadsheet of customers exported quarterly from NAV and uploaded to Mailchimp, leading to duplicate contacts and out-of-sync email addresses. After connecting NAV to Mailchimp, new customers added to NAV flow into a Mailchimp segment automatically, and existing customer records are updated when NAV records change (address, contact name, etc). Marketing can now create campaigns targeted to new customers or a specific customer segment without waiting for a quarterly export, and the customer database in Mailchimp stays consistent with NAV.

What you can do

  • Sync customer records from Microsoft Dynamics NAV to Mailchimp lists as contacts, with email, name, and custom fields such as customer type or territory.
  • Sync vendor records to a separate Mailchimp list so procurement teams can manage vendor communications through the same platform.
  • Renew NAV webhook subscriptions automatically before they expire (every 3 days) to maintain continuous data flow without gaps.
  • Authenticate to NAV via OAuth 2.0 through Microsoft Entra ID and handle OData v4 pagination and batching.
  • Map NAV customer/vendor fields to Mailchimp contact fields and prevent duplicate imports through audit tracking and replay capability.

Questions

Which direction does data move between Microsoft Dynamics NAV and Mailchimp?
Customer and vendor records flow from NAV into Mailchimp as list contacts. This is a one-way sync because Mailchimp is a messaging platform with no financial, invoice, or purchase order capability. However, Mailchimp campaign engagement events (opens, clicks) can be read back and stored in NAV for CRM purposes if desired in a later phase.
Why do NAV webhooks need renewal every 3 days, and how does ml-connector handle it?
Microsoft Dynamics NAV webhook subscriptions expire after 3 days by design and require explicit renewal. ml-connector tracks subscription age continuously and renews each subscription before the 3-day window closes, so sync continues without interruption or manual re-subscription. This renewal is transparent to the user.
How does ml-connector map NAV customer data to Mailchimp contact fields?
ml-connector reads customer and vendor name, email, address, business type, and other key fields from NAV via OData and maps them to Mailchimp standard and custom contact fields. Custom fields are created in Mailchimp upfront to hold NAV-specific data such as customer number or territory. Duplicate detection uses the customer/vendor ID and email to prevent duplicate list members.

Related integrations

Connect Microsoft Dynamics NAV and Mailchimp

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

Get started