Label request
Version: 2.1, Date: 2024-09-20
Revision history
Date | Version | Description |
---|---|---|
2024-09-02 | 1.0 | Initial version. |
2024-09-09 | 2.0 | Added more details on the request label process. Printing by Viya (PrintNode) instead through WMS |
2024-09-20 | 2.1 | Feedback during review with WMS partner |
2024-11-26 | 2.2 | Add default servicelevelReference |
2024-12-04 | 2.3 | Add providePrinters=true |
Business process:
- WMS receives order from Navision and picks & packs the handling units.
- For each handling unit a shipping label is requested to print from Viya. Viya prints the shipping label and returns tracking number.
- The label is printed through
the WMSViya using PrintNode and attached to the handling unit. The tracking number is updated in Navision through WMS.- When shipment is completely packed, WMS sends message to Viya to finalize shipment.
- When shipment is loaded and ready for departure, WMS sends message to Viya to confirm load.
Integration touch points
Below diagram shows the interaction between WMS and Viya for the label request process.
Steps 1,3,4,6,7,9 are all same integration: Request label print
, just different moments in the process.
Steps 10 & 11 is a separate integration: Pack shipment
.
Steps 12 & 13 is a separate integration: Manifest
.
Request label print
Goal
Request a shipping label for a handling unit. The total number of handling Units for a given shipment does not have to be known at this time.
Request:
Method: POST Headers:
- Content-Type: application/json
- x-api-pat: is provided by Viya
Endpoint:
- Production: https://indetex.viya.me/api/custom/print-label-request/v1
- Test: https://indetex.viya.me/api/custom/print-label-request/v1?environment=test
Payload:
-
As a base: see request of “Shipment > Create a new shipment”.
-
Some examples: “print-label-request-samples”.
-
Specifics for this integration:
- Only submit the handlingUnit(s) that need a label
- This means:
- Requesting label for first pallet contains 1 handlingUnit.
- Requesting label for second pallet contains only handlingUnit 2, etc..
- If more than 1 handlingUnit is provided, then the labels for all handlingUnits are printed.
- Any of the handlingUnits that where not already provided, will be added to the shipment.
- This means:
- The
sscc
is passed in thehandlingUnits.references.reference
field. - The
sscc
is the unique identifier for the handlingUnit. That field determines if a handlingUnit is new or already known. If nosscc
is provided, an error is thrown. - A handlingUnit with an
sscc
that is already known is only updated if no label has been printed yet for the shipment. If a shipment is printed, the handlingUnit is NOT updated: simply a reprint is done. - The
handlingUnits.sequence
is always 1 when there is only 1 handlingUnit in the request.- WMS will never send more than 1 handlingUnits in the request.
- The printer to use is passed in an additional object
printer.printNode
in the root. See details in the Printing chapter.- If no printer is provided or cannot be found: an error is returned.
- Every POST to this endpoint until the first printed label: will determine all the shipment details. Subsequent calls will only add handlingUnits to the shipment.
- The
shipment.reference
contains theShippingBillNumber
from the WMS. For Indetex there will only be 1 order per wms ShippingBillNumber at this moment but the WMS can have multiple orders for the same ShippingBillNumber in the future. - The Indetex/Navision order number
MP/24/...
is passed in theshipment.references.sapDelivery
field.- This is Mandatory, if it is missing an error is returned.
- If multiple orders would get consolidated into one ShippingBillNumber, the multiple values can be comma separated:
- Eg:
shipment.references.sapDelivery
=MP/24/11897,MP/24/11898
- Eg:
- The
timewindows.pickup.requested
should be used for the current or future time. This is the date for when the shipment is expected to be picked up. - The “Transporteur code” is the same between Navision/WMS/Viya.
- Since Viya does not allow spaces, +, & in the
carrierReference
field that is used for the the “Transporteur code”, Viya maintains a translation table for these characters inside the integration
- Since Viya does not allow spaces, +, & in the
- WMS needs a barcode on the label that can be used to load the handlingUnit onto pallets.
-
For all carriers this is the
sscc
, but for DPD thatsscc
is not on the label.. so wms would either need to receive the barcode from DPD OR print thesscc
on the DPD label too.. -
For time being added the
sscc
to the label for DPD too, in the section for the references, if the label used is longer than 15cm it can also be printed at the bottom:View Example label:
-
- The
shipment.serviceLevelReference
is left empty by WMS, Viya will fill this in based on the carrier selected in the price request.- To facilitate testing following additions are implemented:
- If the
shipment.serviceLevelReference
is provided, it will be used. - For certain carriers a default servicelevel is set in Viya, this will be used if no servicelevel is provided and no price selection for that shipment was done. Defaults are:
- DHL:
ECONOMY
- DPD:
CLASSIC
- GEODIS:
EUROFIRST
- INTERTRANS:
EXPORT
- KEUHNE+NA:
STANDARD
- MAINFREIGH:
STANDARD
- ON-TIME:
DISTRI
- SCHENKER:
STANDARD
- TRANSUNI:
EXPORT
- UPS:
STANDARD
- UPS-KLANT:
STANDARD
- DHL:
- If the
- To facilitate testing following additions are implemented:
- The
shipment.accounts
is defaulted with asender
andtransport
account for the respective carrier as setup in Viya for address with referenceindetex-nvsas
. This means: if a carrier needs an account number: configure the account number in the Viya addressbook, the integration will pick it up.
- Only submit the handlingUnit(s) that need a label
Response:
OK response:
- Http: 200
- As a base see response of “Shipment > Order an existing shipment”.
- Specifics
- It will only return the handlingUnits that where requested in the payload.
- Specifics
Error response:
See Error Responses
Exception scenarios
- Printer is not available
- Corrective action:
- Check printer:
- Check if the printer is switched on, has paper, etc..
- Check PrintNode if the printer is online
- Check in Viya if PrintNode API key is present and correct
- After printer check: resubmit the request
- Check printer:
- Corrective action:
- Label is damaged or did not come out of printer or a copy of the label is needed
- Corrective action: Resubmit the request for labelling again
- Shipment error that prevents generating a label
- Eg, Address is not correct, Carrier unknown, servicelevel unknown, etc..
- Corrective action:
- Adjust the shipment details in WMS and resubmit the request for labelling again
- Pallet needs to be changed after label is printed but not yet manifested
- Some examples:
- Pallet/Roll is labelled but then cannot be fulfilled anymore. (eg fully damaged)
- Pallet/Roll is labelled but dimensions or weight are incorrect. (eg additional rolls added, or rolls removed)
- Corrective action:
- For carrier that supports partly Labelling
- Delete the shipment in Viya platform and relabel all handlingUnits for the given shipment
- For carrier that does not support partly Labelling
- Delete the shipment for the respective handlingUnit in Viya platform and resubmit the request for labelling again
- For carrier that supports partly Labelling
- Some examples:
Pack shipment
Goal
Inform Viya that the shipment is packed, all carrier labels are requested for the handling units, and ready for transport.
Request
Method: PUT Headers:
- x-api-pat: is provided by Viya
- Content-Type: application/json
Endpoint:
- Production: https://indetex.viya.me/api/custom/pack-shipment/v1
- Test: https://indetex.viya.me/api/custom/pack-shipment/v1?environment=test
Payload: Contains all handlingUnit references that are packed for the shipment.
Response
OK response:
http: 202
- payload: none
Error response:
See Error Responses
Exceptions
- Shipment already packed: response will still be 202
- Corrective action: No action required
- Shipment not found: 400 error response
- Corrective action: Adjust the shipment reference and resubmit the request
- HandlingUnit not found: response will still be 202
- Corrective action: No action required
Manifest
Goal
Confirm the handlingUnits loaded for departure.
- This is one message for all handlingUnits in a trailer consignment.
- HandlingUnits of multiple shipments can be included the manifest.
Request:
Method: POST
Headers:
- x-api-pat: is provided by Viya
- Content-Type: application/json
Endpoint: (to be confirmed)
- Production: https://indetex.viya.me/api/custom/manifest/v1
- Test: https://indetex.viya.me/api/custom/manifest/v1?environment=test
Payload:
Response
OK response:
Http: 200
Error response:
See Error Responses
Exceptions
Functional exceptions:
- Add or Remove handlingUnit after manifest is communicated with carrier:
- Existing shipments/manifest cannot be changed anymore: the manifest is final.
- Recovery action:
- Manually inform the carrier of shipment communicated but not loaded
- Relabel affected shipment (if manifest contains multiple shipments, only the affected shipment should be re-processed) with new shipment references and manifest again.
Technical exceptions:
- Manifest already confirmed with same hundlingUnits: response will still be 200
- Recovery action: No action required
- Manifest
reference
already used with other handlingUnits and ordered with carrier: 400 error response- Recovery action: resubmit the complete manifest with new reference
- Manifest
reference
already used with other handlingUnits and not yet ordered: 200 response- Recovery action: No action required, it will overwrite old manifest
- HandlingUnit not found: 400 error response,
- Recovery action:
- If handlingUnit should be included: do a label request for that missing handlingUnit
- Resubmit the complete manifest with correct handlingUnits
- Recovery action:
- Shipment not reported packed: 400 error response
- Recovery action: First send a pack shipment request for the shipment, then resubmit the manifest.
- Carrier integration failed: 400 error response
- This should not happen as the label generation should then already have stopped the process. This must be an incident on communication.
- Recovery action: resubmit the complete manifest with correct handlingUnits
Error responses
- Http: 4xx or 5xx
- payload:
Printing
Printing via PrintNode is done by Viya.
- The PrintNode API key is purchased by Indetex and entered in Viya.
- Question: Printers support ZPL II in 203 DPI? (TEC/Toshiba or Zebra?) or should we only print PDF?
In the request to Viya, the printer to use is passed in the printer.printNode
object in the root.
- Use the
printNode.id
to assign the specific printnode printer. Thisid
is the unique identifier for the printer in PrintNode.
- If the
printNode.id
is unknown the printerprintNode.name
can be used, Viya will use thisname
to find the printer in PrintNode. Thisname
is the printer name as assigned in your operating system and synchronized with PrintNode.
Below picture shows where to find the printer name and Id in printnode and windows.
No printer found
In the event no printer is found, an error is returned like
To see the printers available in PrintNode, add providePrinters=true
to the URL of the request. This will return a list of first 100 available printers in the explanation.
This feature is placed behind a querystring to avoid large responses in normal requests.
Example response: