Skip to content

Sales Shipments Realtime-enabled — SmartConnect can trigger on changesRealtime-enabled

GETTable: Sales Shipment Header

eOne/core/v1.0/salesShipments

Read-only posted sales shipments, and, unlike the query, a webhook source: subscribe to be pushed the “order shipped” event the moment a shipment posts.

Page vs. query: when to use which

This salesShipments page is change-tracked, so it can be a webhook target and supports OData navigation ($expand=salesShipmentLines). The separate salesShipmentsQuery is a flat report with richer joins (shipping-agent name, tracking-URL template, full ship-to block) but cannot drive webhooks. Use the page to be notified and navigate; use the query to pull and reconcile.

Subscribing to fulfillment

Register a subscription against the entity set; Business Central notifies your endpoint when a shipment is inserted (posted). The notification carries the record id. GET it (optionally $expand=salesShipmentLines) to read the detail.

POST /subscriptions
{
  "resource": "/salesShipments",
  "notificationUrl": "https://your-endpoint",
  "clientState": "<secret>"
}
integrationId is the originating order's eOne integration key (stamped at post time), and packageTrackingNumber is the carrier number, so the notification alone tells you which order shipped and how to track it.

Where tracking lives

The posted sales shipment is the convergence point for shipping writeback in every flow. See Shipping & dispatch. The header's packageTrackingNumber, written by updateTracking here or by markShipped on the order, is the shipment's tracking number, and the label file goes on the shipment via documentAttachments. One tracking number per shipment: a shipment split into several individually tracked boxes is not supported in the initial release, so send the consignment-level number the carrier gives you for the shipment as a whole.

The work description

workDescription returns the free-text note the document was posted with. It is read-only here: the note belongs to the open document, and posting carries it across.

Bound actions

Invoke with POST /salesShipments(<id>)/Microsoft.NAV.<action>:

  • updateTracking: writes the carrier tracking number back onto a posted shipment. This is the return leg of a DPD/DHL-style carrier integration: the tracking number is issued after the goods ship, so it cannot be set on the open order. Business Central permits editing these fields on a posted shipment (the "Posted Sales Shpt. - Update" feature) and this action mirrors that.
POST /salesShipments(<id>)/Microsoft.NAV.updateTracking
{
  "packageTrackingNumber": "1Z999AA10123456784",
  "shippingAgentCode": "DHL",
  "shippingAgentServiceCode": "EXPRESS"
}

Only packageTrackingNumber is typically needed; shippingAgentCode and shippingAgentServiceCode are optional and only written when supplied, so a tracking-only callback does not overwrite an agent already stamped from the order. The response redirects back to the updated shipment. Supplying none of the three is an error.