ml-connector
Microsoft Dynamics NAVServiceNow

Microsoft Dynamics NAV and ServiceNow integration

Microsoft Dynamics NAV runs finance and procurement for small and mid-market businesses. ServiceNow covers ITSM, source-to-pay operations, and supply-chain automation. Connecting them keeps your approval workflows and AP processes flowing without manual entry. Purchase orders and vendor invoices move from Dynamics NAV into ServiceNow's Accounts Payable staging tables, where they can be validated, enriched, and posted. Cost centers and dimensions stay aligned so AP postings land on the correct GL codes in both systems.

How Microsoft Dynamics NAV works

Microsoft Dynamics NAV (Business Central online or on-premises) exposes purchase orders, purchase invoices, vendors, accounts, general ledger entries, dimensions, cost centers, and employees through OData v4 REST APIs with a tenant-specific base URL. Authentication uses OAuth 2.0 client credentials via Microsoft Entra ID (Business Central online) or an alternative web service access key (on-premises, legacy). Dynamics NAV also supports webhooks with 3-day subscription expiry for most entities including purchase invoices, vendors, and accounts; webhook notifications include a clientState field for verification. GL accounts are read-only via the API, and GL entries are immutable once posted. On-premises installations require firewall access to the OData port (7048) and may require SOAP as an alternative transport for legacy endpoints.

How ServiceNow works

ServiceNow is a cloud platform offering IT Service Management, finance, and procurement capabilities through isolated customer instances with unique subdomains. The Source-to-Pay suite provides Accounts Payable, Procurement, and Sourcing automation via REST APIs with OAuth 2.0 client credentials or Basic Auth. All API calls require authenticated user or service account credentials with module-specific roles, and the Source-to-Pay staging tables are licensed add-ons separate from the base ITSM instance. ServiceNow supports only polling; there is no native webhook registration system for outbound events. Outbound REST Messages support custom headers but no built-in HMAC signature verification. OAuth tokens have a default 30-minute lifespan, and table names must be verified against the customer instance and ServiceNow version.

What moves between them

The main flow moves from Dynamics NAV into ServiceNow. Purchase orders and vendor invoices are read from Dynamics NAV on a schedule and written into ServiceNow's Accounts Payable and Procurement staging tables, where they populate invoice headers, line items, and cost allocations. Dimensions and cost centers flow in both directions: ml-connector reads cost center hierarchies from ServiceNow and writes them into Dynamics NAV to ensure GL account coding is valid, while vendor master data is enriched from both systems. AP invoices remain read-mostly; posting logic resides in ServiceNow, not in ml-connector.

How ml-connector handles it

ml-connector handles the authentication differences by managing OAuth 2.0 client credentials for both Dynamics NAV (Entra ID) and ServiceNow, refreshing tokens as they near expiry. On the Dynamics NAV side, it renews webhook subscriptions before their 3-day expiry to maintain push notification eligibility; when webhooks are unavailable or after renewal, it polls purchase orders and invoices on your schedule. It validates that the ServiceNow service account holds the required module roles (apo_user for Accounts Payable) before attempting writes to S2P staging tables. Because GL accounts in Dynamics NAV are read-only, ml-connector aligns cost centers and dimensions by reading from ServiceNow, validating them against Dynamics NAV dimension tables, and writing the mapping metadata back to Dynamics NAV. If a ServiceNow table API call fails due to permissions or invalid dimension references, ml-connector captures the error, retries with exponential backoff, and maintains a full audit trail so the record can be replayed after correction. Purchase order headers map to invoice headers, line items to invoice lines, and vendor codes to supplier references in ServiceNow, with rate limits and network retries handled transparently.

A real-world example

A mid-market distributor runs Dynamics NAV on premises for procurement and finance across three regional warehouses. They use ServiceNow for IT operations and recently licensed the Source-to-Pay suite for centralized AP processing. Before the integration, the procurement team created purchase orders in Dynamics NAV, printed them for internal routing, then manually entered them into ServiceNow for approval and posting. Downstream, AP staff reconciled line-item costs against Dynamics NAV dimensions and cost centers by hand, often finding mismatches between warehouse codes and GL allocation. With Dynamics NAV and ServiceNow connected, each purchase order flows into ServiceNow's AP staging tables as soon as it is created, approval workflows start immediately, and cost centers are pre-validated against Dynamics NAV's dimension table. GL postings from ServiceNow reference the correct cost center on the first attempt, and the manual reconciliation step vanishes.

What you can do

  • Move purchase orders and vendor invoices from Dynamics NAV into ServiceNow Accounts Payable staging tables, with line items and cost allocations mapped in a single flow.
  • Keep cost centers and dimensions aligned between Dynamics NAV and ServiceNow so GL postings reference valid accounts.
  • Renew Dynamics NAV webhook subscriptions before they expire, and poll both systems on a schedule independent of manual intervention.
  • Validate ServiceNow service account permissions and Dynamics NAV dimension references before writing AP records.
  • Track every record through a full audit trail and replay failed records without re-keying.

Questions

How does ml-connector handle the 3-day expiry of Dynamics NAV webhooks?
ml-connector monitors the subscription expiry time and renews each webhook subscription before the 3-day window closes, ensuring continuous push notification availability. If renewal fails or is skipped, ml-connector automatically falls back to polling on your schedule, so data flow is never interrupted.
What happens if a ServiceNow module role is missing or a dimension reference is invalid?
ml-connector validates the service account's module roles (e.g., apo_user for Accounts Payable) and the purchase order's cost center references against Dynamics NAV dimension tables before attempting any write. If validation fails, it logs the error with full context and queues the record for replay after you correct the missing permission or invalid dimension.
Do purchase order and invoice data move in both directions?
No. Purchase orders and invoices move from Dynamics NAV into ServiceNow for approval and posting. Cost centers and dimensions flow in both directions so both systems stay aligned. ServiceNow is the AP approval and posting system, so ml-connector does not write AP records back into Dynamics NAV once they are posted.

Related integrations

Connect Microsoft Dynamics NAV and ServiceNow

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

Get started