Microsoft Dynamics NAV and SFTP / Flat Files integration
Microsoft Dynamics NAV is a small-to-mid-market ERP for finance, procurement, and inventory. Legacy systems and trading partners often exchange data via SFTP as flat files rather than APIs. ml-connector moves data between NAV and file-based partners automatically: invoices, purchase orders, vendors, GL entries, and employee records flow in both directions, parsed from CSV, EDI X12, or fixed-width formats. Reconciliation and manual re-keying are replaced by a scheduled sync that validates, maps, and posts records into NAV.
What moves between them
Inbound files on SFTP are polled on schedule, parsed, and posted into NAV: invoices become NAV purchase or sales invoices (via OData), vendors and employees are created or updated, GL entries are journaled, and purchase orders are recorded. Outbound data from NAV (vendor lists, invoice exports, GL summaries) is serialized to CSV or EDI format and deposited in the SFTP outbound folder for trading partners to retrieve. Acknowledgment files from trading partners are monitored and logged. The integration is bidirectional but not simultaneous: inbound and outbound flows run on separate schedules.
How ml-connector handles it
ml-connector runs on a schedule to poll SFTP for new files in the inbound folder. Each file is validated against a per-partner format spec (column layout for CSV, segment rules for X12 EDI), then parsed into NAV entity records. Vendor records are mapped to NAV's dimension tables to ensure cost center and department alignment. Invoice lines are matched against NAV items and GL accounts; unmatched items trigger an error record and are held for manual review rather than posted incomplete. The connector authenticates to NAV using Entra ID OAuth2 credentials and posts validated records via OData. Host key verification is required on the SFTP connection to prevent man-in-the-middle attacks. Files are moved to processed/ after successful posting, or error/ if validation fails. Outbound flows serialize NAV records to the same format and deposit them in outbound/ for partners to pick up, and ml-connector produces the required X12 997 or EDIFACT CONTRL acknowledgments after each inbound cycle.
A real-world example
A mid-sized distributor runs Microsoft Dynamics NAV for inventory, procurement, and accounts payable. One major supplier ships data daily via SFTP as X12 EDI files (invoices and purchase order status updates), and a legacy payables service expects vendor master and GL account files via SFTP every week. Before the integration, the AP team imported SFTP files into Excel, manually reconciled vendor names and GL accounts, and re-entered the invoices into NAV by hand. With NAV and SFTP / Flat Files connected, daily supplier invoices land in NAV automatically, matched to the correct GL account and cost center; vendor updates sync in both directions so NAV's vendor master stays current. The legacy payables service receives weekly GL snapshots without manual export. Month-end close starts with AP fully synchronized across three systems.
What you can do
- Parse X12 EDI invoices and purchase orders from SFTP and post them into NAV as purchase or sales invoices, matched to GL accounts and cost centers.
- Sync vendor master records, employees, and dimension tables bidirectionally between NAV and SFTP trading partners.
- Authenticate to NAV via Microsoft Entra ID OAuth2 and connect to SFTP servers with SSH key-based or password authentication.
- Generate and deposit X12 997 or EDIFACT CONTRL acknowledgments on SFTP after processing inbound EDI files.
- Poll SFTP on a configurable schedule, validate records against per-partner format specs, and hold unmatched items for manual review rather than posting incomplete data.
Questions
- How does the integration handle NAV's 3-day webhook subscription expiry?
- ml-connector relies on polling rather than NAV webhooks for this pair. Since SFTP has no native push mechanism, polling is the only feasible transport; the integration checks the inbound folder on a regular schedule (typically 5 to 60 minutes depending on your volume) regardless of NAV webhook state. If you also use NAV webhooks for other integrations, ml-connector renews them automatically before they expire.
- What happens if an invoice file has a vendor or GL account that does not exist in NAV?
- ml-connector validates all references against NAV before posting. Unmatched vendors or GL accounts trigger an error record that is logged and held in a separate error folder on SFTP for manual review. The invalid invoice is not posted. Once the missing vendor or account is created in NAV, the invoice can be reprocessed in the next cycle.
- Does the integration work with on-premises NAV, and what setup is required?
- Yes. On-premises NAV requires the NAV Server Administrator to enable OData and API services, and the firewall must allow inbound traffic on the OData port (typically 7048). ml-connector then connects using the same OAuth2 credentials as online; if your on-premises instance uses Basic auth instead, contact support to enable Entra ID integration first.
Related integrations
More Microsoft Dynamics NAV integrations
Other systems that connect to SFTP / Flat Files
Connect Microsoft Dynamics NAV and SFTP / Flat Files
Free to use. Add your credentials, ping your real systems, and see if we fit.
Get started