ml-connector
Microsoft Dynamics NAVShipStation

Microsoft Dynamics NAV and ShipStation integration

Microsoft Dynamics NAV manages orders, inventory, and fulfillment for small to mid-size businesses. ShipStation handles the tactical side - picking, packing, printing labels, and tracking shipments across multiple carriers. Connecting the two keeps order status aligned: when ShipStation ships an order, that shipment event flows back into NAV so your finance team sees fulfillment status without manual entry, and customer service can pull tracking information from your source system.

How Microsoft Dynamics NAV works

Microsoft Dynamics NAV (also branded Dynamics 365 Business Central online) is an on-premises or cloud ERP for small and mid-size businesses. It exposes sales orders, posted shipments, customers, and related data through OData v4 REST endpoints and legacy SOAP web services. The cloud product authenticates with OAuth 2.0 client credentials via Microsoft Entra ID and uses a tenant-specific base URL. On-premises deployments support both OAuth and Basic auth with a web service access key. NAV publishes webhooks for most entities including salesOrders and generalLedgerEntries, but webhooks expire after 3 days and must be renewed before expiry. For entities like purchaseOrders that lack webhook support, polling is required.

How ShipStation works

ShipStation is a cloud shipping and order management platform that aggregates orders from multiple sales channels and provides carrier rate comparison, label generation, and shipment tracking. It exposes orders, customers, products, and shipments through two REST API versions: V1 (order management, basic auth or API key) and V2 (label generation, inventory, API key header-based). ShipStation's webhook system pushes ORDER_NOTIFY for new orders and SHIP_NOTIFY for fulfillment events, but the webhooks deliver only a resource pointer - the full order or shipment data must be fetched with an authenticated GET call. Crucially, ORDER_NOTIFY fires only once per order at creation; order edits require polling with the modifyDate filter to detect changes.

What moves between them

Shipment records flow from ShipStation into Microsoft Dynamics NAV. After an order is shipped in ShipStation, ml-connector reads the shipment event (polling for order modifications since SHIP_NOTIFY is push-only), extracts carrier, tracking number, and shipped date, and writes the shipment back into the corresponding NAV sales order. Tracking numbers and shipment status also update the posted shipment records in NAV so fulfillment is complete and current. The flow runs on a schedule tied to your shipping cycle, typically every 15 to 30 minutes.

How ml-connector handles it

ml-connector stores the ShipStation API Key encrypted and includes it on every request via the API-Key header. For Microsoft Dynamics NAV, it exchanges OAuth 2.0 client credentials for a bearer token and refreshes when a call returns 401 Unauthorized. Because ShipStation webhooks for SHIP_NOTIFY deliver only a pointer, ml-connector must follow up with an authenticated GET /orders/{orderId} call to retrieve the shipment details. Since ORDER_NOTIFY fires only on order creation and order edits require polling, ml-connector maintains a polling schedule on the modifyDate filter to catch updates that webhooks miss. NAV sales orders are identified by ShipStation's external order ID or by matching customer name and order date, and shipments are written to the matching sales order line. Both systems are eventually consistent - if ShipStation reports a shipment but NAV does not yet have the matching order, ml-connector queues the shipment for replay once the order is synced. Every record carries a full audit trail and can be replayed if a downstream call fails.

A real-world example

A small e-commerce business sells through its website and Amazon, using Microsoft Dynamics NAV for order management, invoicing, and GL accounting. Before the integration, the fulfillment team shipped orders through ShipStation, then manually entered tracking numbers back into NAV for customer service queries and printed packing slips. With ShipStation and NAV connected, each shipment event flows automatically into NAV, so tracking data is always current without re-entry. Customer service can pull tracking numbers directly from NAV, and the finance team has an accurate, current view of fulfillment status for reporting and month-end close.

What you can do

  • Read shipments from ShipStation and write tracking numbers and shipped dates back into Microsoft Dynamics NAV sales orders.
  • Authenticate ShipStation with API Key headers and Microsoft Dynamics NAV with OAuth 2.0 bearer tokens, refreshing as needed.
  • Poll ShipStation for order edits and shipment updates since webhooks alone do not capture all changes.
  • Match ShipStation orders to NAV sales orders by external ID, customer name, and date to handle both systems reliably.
  • Maintain an audit trail of every shipment record synced and replay shipments if a downstream write fails.

Questions

Does ShipStation push all order changes to ml-connector, or do you have to poll?
ShipStation webhooks fire ORDER_NOTIFY only when an order is created, and SHIP_NOTIFY when it ships. Order edits require polling. ml-connector uses modifyDate filtering to poll for changes that webhooks miss, ensuring no shipment event is lost.
How does ml-connector know which NAV sales order a ShipStation shipment belongs to?
ShipStation order IDs are stored in NAV sales orders as an external reference. ml-connector first tries to match by external ID. If that fails, it matches by customer name and order date across both systems to handle manual or legacy orders.
What happens if ShipStation reports a shipment but NAV does not yet have the corresponding sales order?
ml-connector queues the shipment record and retries periodically until the order appears in NAV. Once the order syncs, the queued shipment is replayed and written to the correct sales order line. This ensures no shipment data is lost even if order and shipment events arrive out of order.

Related integrations

Connect Microsoft Dynamics NAV and ShipStation

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

Get started