Overview
When a waybill in Shipping Manager is ready to send, the nShift Shipping Connector creates a shipment in nShift (formerly Consignor) through the nShift ShipServer REST API. If you choose to submit the shipment, nShift returns a package number per parcel, which Business Central stores as tracking numbers, and prints labels on your nShift printer.
The connector has two parts:
- Business Central app: nShift Shipping Connector (version 28.0). It depends on Shipping Manager, Abakion Manager Foundation and Abakion App Manager Core.
- Power Automate solution: nShift Shipping Connector (SMnShift, version 1.1.0.9). It contains two flows: nShift Send Waybill API V2, which you call from Business Central, and Get nShift Token, a child flow that gets an access token from nShift. There is one send flow for all nShift environments; you pick Production or Test on the connector card.
The connector does not support freight quotes.
Prerequisites
- Shipping Manager is installed and set up, including shipping agents, services and packing stations.
- An nShift account with an Actor ID and API credentials (Client ID and Client Secret) for the ShipServer REST API.
- An app registration in Microsoft Entra ID with access to the Business Central API (BC Client ID and BC Client Secret).
- A Power Automate environment where you can import a solution and use the premium HTTP trigger.
Setup
Set up the connector in this order. Each step builds on the one before.
- Activate the app. After installation, run the assisted setup Activate nShift Shipping Connector and start the trial or enter your license.
- Enable the connector. Open Shipping Manager Setup and turn on nShift in the Connectors section.
- Get nShift credentials. From nShift, get your Actor ID and the Client ID and Client Secret for the ShipServer REST API. See NShift Connector.
- Get Business Central API credentials. Create or reuse an Entra ID app registration with access to the Business Central API. Note its Client ID and Client Secret. See How to get BC Client ID and BC Client Secret for Connector.
- Import the Power Automate solution. Get it with the Power Automate app action on the connector card. Import it, turn on Get nShift Token first, then nShift Send Waybill API V2. Copy the HTTP POST URL from the trigger of nShift Send Waybill API V2. See How to Get Powerautomate Link for Send waybill.
- Create the connector. Open Connectors, create a new card and fill in the fields below.
| Field | What to enter |
|---|---|
| ID, Description | A code and name for the connector. Use one card per nShift Actor ID. |
| Type | nShift Connector. Shipping Manager is set as manager type automatically. |
| Email for Errormessages | Who gets an email when a waybill fails. Leave blank for no email. |
| SyncWaybill | Turn on. Without it, waybills are not sent to nShift. |
| URL SendWaybill | The HTTP POST URL from step 5. |
| BC Client Id | Client ID of the Entra ID app registration. Required. |
| BC Client Secret | Client secret of the Entra ID app registration. Required. |
| nShift Actor Id | Your Actor ID in nShift. Required by the flow. |
| nShift Client-ID | Your nShift API Client ID. Required. |
| nShift Client Secret | Your nShift API Client Secret. Required. |
| nShift Environment | Production (restapi.shipmentserver.com), Production 2 (api.shipmentserver.com) or Test (demo.shipmentserver.com:8080). |
| nShift Place | Where nShift places the shipment: Inbox or Draft. |
| nShift Labels | Label format nShift prints: ZPL, ZPLGK, EPL, PNG, PDF, DATAMAXLP2, DATAMAXDPL or None. |
| Print Waybill | Turn on to submit the shipment in nShift. Only submitted shipments return tracking numbers and print labels. |
- Map shipping agents. On the connector, open the shipping agent mapping and add a line per shipping agent and service.
| Field | What to enter |
|---|---|
| Shipping Agent Code, Shipping Agent Service Code | The Business Central shipping agent and service. |
| External Shipping Agent ID | The nShift product concept ID (ProdConceptID). |
| External Shipping Agent Service Code | nShift service IDs, separated by commas. Leave blank for no services. |
Map package types to nShift goods types in Package Type Mapping: set External Key to the nShift goods type key.
- Set up packing stations (optional). If nShift should print at a specific workstation, fill in the fields below on each Packing Station. They are used when the waybill has a packing station.
| Field | What to enter |
|---|---|
| WorkStation Id | The nShift workstation ID. |
| Ticket UserName | The printer installed at the workstation. |
| Drop Zone Printer Label Key | The nShift Drop Zone printer key. |
- Test. Set nShift Environment to Test and nShift Place to Draft. Send a waybill and check that it appears in the nShift test portal. The Test BC Connection action is not available for this connector type.
Validation before sending
When a waybill becomes ready to send, the app checks the setup before it calls the flow. If a check fails, the status change is stopped with one of these errors:
- Shipping Manager Setup is missing.
- nShift Connector is not activated on Shipping Manager Setup.
- Field must have a value in Connector ID, it cannot be blank. This applies to BC Client Id, BC Client Secret (shown as "BC Password"), nShift Client-ID and nShift Client Secret.
The app does not check nShift Actor Id, nShift Environment or the flow URL. If they are wrong, the flow fails or is never reached.
Environment pitfalls
- The access token is always requested from www.consignorportal.com, also when nShift Environment is Test. Use credentials that work there.
- The flow trigger accepts any caller that has the URL. Treat URL SendWaybill as a secret.
How a waybill is sent
A waybill is sent automatically when its status changes to Packing Finished. The full run usually ends with status Shipping Agent Ordered.
- The waybill status changes to Packing Finished, and the integration status becomes Ready to send.
- If the waybill's shipping connector is an nShift connector with SyncWaybill on, the app runs the validation above and calls the flow URL with the waybill number, connector settings and credentials.
- The flow gets an access token from nShift.
- The flow reads the waybill, its lines and its customs lines from Business Central. If the waybill has a packing station, it also reads the station's nShift printer fields.
- The flow writes an entry to the waybill's Activity Log ("Waybill send to nShift") with the waybill data it read.
- The flow builds the nShift shipment and saves it in nShift. If the waybill has customs lines, customs information is included.
- If Print Waybill is on, the flow submits the shipment. nShift returns a package number for each parcel, and the flow writes it to the matching waybill line as tracking number.
- The flow updates the waybill header with Pickup No. (the nShift shipment ID) and Waybill Tracking No.
- The flow marks the waybill as successfully sent. The status changes to Shipping Agent Ordered.
If any step from 4 to 7 fails, the flow still writes the nShift shipment ID (if one was created) to the header. It then sets the integration status to Error, writes the error text and details to the waybill, and emails the recipients in Email for Errormessages.
| Step that failed | Error text in Business Central |
|---|---|
| Reading the waybill or packing station | The error message returned by the Business Central API. |
| Saving the shipment in nShift | The Message returned by nShift, for example a missing or invalid field. |
| Submitting the shipment in nShift | The Message returned by nShift. |
| Writing tracking numbers to lines | The error message returned by the Business Central API. |
The error email has the subject "Waybill No. failed to send (environment)". It lists each failed action and links to the flow run and the waybill.
Field mapping
The tables show which Business Central field fills each field in the nShift Saveshipment request. Fields that are not listed are not sent to nShift.
Shipment
| nShift field | BC source | Notes |
|---|---|---|
| ProdConceptID | External Shipping Agent ID (shipping agent mapping) | Found by the waybill's connector, shipping agent and service. |
| OrderNo | Waybill No. | |
| Services | External Shipping Agent Service Code (shipping agent mapping) | Split at commas into a list. Not sent when blank. |
| References, Kind 63 | External Document No. | |
| References, Kind 64 | Warehouse shipment no. and posted warehouse shipment no. | The two values are joined. Normally only one has a value. |
Receiver (address Kind 1)
| nShift field | BC source | Notes |
|---|---|---|
| Name1 | Name | Name 2 is not sent. |
| Street1 | Address | |
| Street2 | Address 2 | |
| PostCode | Post Code | |
| City | City | |
| State | County | |
| CountryCode | Country/Region Code | |
| Phone, Mobile | Phone No. | The same value is sent in both fields. |
| Attention | Contact | |
| CustNo | Customer No. |
Sender (address Kind 2)
| nShift field | BC source | Notes |
|---|---|---|
| Name1 | Sender Name | Sender Name 2 is not sent. |
| Street1 | Sender Address | |
| Street2 | Sender Address 2 | |
| PostCode | Sender Post Code | |
| City | Sender City | |
| State | Sender County | |
| CountryCode | Sender Country/Region Code | |
| Phone, Mobile | Sender Phone No. | The same value is sent in both fields. |
| Sender e-mail | ||
| Attention | Sender Contact |
Pickup point (address Kind 10)
| nShift field | BC source | Notes |
|---|---|---|
| CustNo | Pickup Point | Always sent, also when blank. |
Parcels
Each waybill line is sent as one nShift line with one parcel.
| nShift field | BC source | Notes / conversion |
|---|---|---|
| Number | Fixed value 1 | One parcel per waybill line. |
| PkgWeight | Gross Weight (waybill line) | Weight unit KG: multiplied by 1,000 (grams). Any other unit: sent unchanged. |
| Length, Width, Height | Length, Width, Height (waybill line) | Converted to millimetres: MM × 1, CM × 10, M × 1,000. Any other unit: sent unchanged. |
| PkgVol, LineVol | Fixed value 10000000000 | Volume from BC is not sent. |
| GoodsTypeKey1 | External Key (Package Type Mapping) | Found by shipping agent, connector and the line's Package Type. |
| References, Kind 23 | Type of Goods (waybill header) | |
| References, Kind 159 | Package No. (waybill line) | Used to match tracking numbers back to the line. |
Customs
Customs information is sent only when the waybill has customs lines. Only lines of type Line are used.
Article Info (detail group 1), one row per customs line
| nShift detail (KindID) | BC source | Notes / conversion |
|---|---|---|
| 1 (article no.) | Item No. | |
| 2 (unit price) | Ship Amount ÷ Ship Quantity | 1 when Ship Amount is 0. |
| 3 and 18 (tariff) | Tariff No. | Sent in both details. Tariff Description is not sent. |
| 4 (country of origin) | Country of Origin | |
| 5 (quantity) | Ship Quantity | |
| 7 (description) | Description | |
| 8 (unit) | Fixed value EA | Unit of Measure is not sent. |
| 36 (net weight) | Ship Net Weight | Sent unchanged, no unit conversion. Ship Gross Weight is not sent. |
Customs Info (detail group 2)
| nShift detail (KindID) | BC source | Notes |
|---|---|---|
| 19 (Invoice Number) | Warehouse shipment no., or posted warehouse shipment no. if blank | Not the sales invoice number. |
| 24 (Invoice Date) | Shipment Date of the warehouse shipment | Today's date when blank. Format yyyy-MM-dd. |
| 21 (currency) | Currency Code of the first customs line | |
| 20 (Reason for Export) | Reason for Export | |
| 12 (VAT No Receiver) | VAT Registration No. | |
| 11 (VAT No Sender) | Sender VAT Registration No. |
Printing (options)
| nShift option | BC source | Notes |
|---|---|---|
| Labels | nShift Labels (connector) | |
| Place | nShift Place (connector) | |
| WorkstationID | WorkStation Id (packing station) | Only when the waybill has a packing station. |
| TicketUserName | Ticket UserName (packing station) | Only when the waybill has a packing station. |
| DropZonePrinterLabelKey | Drop Zone Printer Label Key (packing station) | Only when the waybill has a packing station. |
The same options are sent when the shipment is submitted.
Data returned and troubleshooting
nShift returns a shipment ID when the shipment is saved, and a package number per parcel when it is submitted.
| nShift response field | Waybill field | Notes |
|---|---|---|
| ShpCSID (Saveshipment) | Pickup No. (header) | Written on success and on error, if the shipment was created. |
| Lines › Pkgs › PkgNo (Shipments) | Tracking No. (waybill line) | Matched to the line by Package No. Only when Print Waybill is on. |
| Lines › Pkgs › PkgNo (Shipments) | Waybill Tracking No. (header) | The package number of the last parcel. Only when Print Waybill is on. |
When Waybill Tracking No. changes, Shipping Manager copies it to Package Tracking No. on the posted sales shipments linked to the waybill. Labels are printed by nShift and are not stored in Business Central.
When Print Waybill is off, the shipment stays in nShift in the chosen Place. No tracking numbers are returned, but the waybill still gets status Shipping Agent Ordered.
| Symptom | Check |
|---|---|
| Error when setting Packing Finished | Read the error. nShift must be on in Shipping Manager Setup, and the four credentials must be filled on the connector. |
| Status stays Packing Finished, no error, nothing in the Activity Log | SyncWaybill is off, URL SendWaybill is wrong, or the flow is turned off. Check the flow run history. See How to Get Powerautomate Link for Send waybill. |
| Integration status Error with an nShift message | Read the message on the waybill. Check product concept ID, services, addresses and weights against the nShift product. |
| "Unauthorized" from nShift | Check nShift Client-ID, nShift Client Secret and nShift Actor Id. The token always comes from consignorportal.com. |
| "Unauthorized" from Business Central | Check BC Client Id, BC Client Secret and the app registration's permissions in Business Central. See How to get BC Client ID and BC Client Secret for Connector. |
| Shipment in nShift but no tracking number | Print Waybill is off, or the submit step failed. Check the integration status and Activity Log. |
| Wrong weight or dimensions in nShift | Check Weight Unit of Measure (KG is converted to grams) and Dimension Unit of Measure (MM, CM or M). |
| Customs info missing | The waybill has no customs lines of type Line. |
| Label not printed at the workstation | Check WorkStation Id, Ticket UserName and Drop Zone Printer Label Key on the packing station, and that the waybill has a packing station. |