Skip to main content

940 Warehouse Shipping Order and 945 Warehouse Shipping Advice — Validation Errors and Field Requirements

Why is my 940 transaction failing with 'Element is mandatory' for routing?

A
Written by Ashwath Kirthyvasan
Updated over a month ago

Audience: EDI developers, 3PL integrators, warehouse operations teams


How 940 and 945 Fit Into the Warehouse Workflow

The 940 and 945 are the EDI transactions that connect a supplier to their third-party logistics provider (3PL) or warehouse for order fulfillment.

The typical flow works like this:

  • A supplier receives an 850 Purchase Order from a retailer or buyer

  • then the supplier generates a 940 Warehouse Shipping Order to instruct their warehouse or 3PL to fulfill the shipment.

  • Once the warehouse ships the goods, they respond with a 945 Warehouse Shipping Advice confirming what was actually shipped — quantities, carrier details, tracking, and item-level information.

  • The supplier then uses the 945 data to generate the 856 Advance Ship Notice back to the retailer and the 810 Invoice.

This means errors in the 940 or 945 have downstream consequences: a missing or incorrect field in the 940 can prevent the warehouse from processing the order correctly, and an incomplete 945 can block the generation of the 856 and 810 that the retailer is expecting.

Field requirements are highly dependent on your trading partner's guidelines. What one 3PL or warehouse requires as mandatory, another may treat as optional. Always refer to your trading partner's implementation guidelines as the primary source of truth for which fields they require, which item identifiers they use, and how they expect data to be structured.


Key Segments in 940 and 945

W06 — Warehouse Shipment Identification

The header segment identifying the shipment. In the 940 it carries the shipping order number and date. In the 945 it references the original order and confirms the shipment date and number. The purchase order number linking back to the original 850 also lives here.

W27 — Carrier Detail

Carrier identification for the shipment — transportation method, SCAC code, carrier name, and routing. In the 940 this tells the warehouse how the shipment should go out. In the 945 it confirms what carrier actually handled it. The routing field (W2703) specifies the routing instruction or carrier name.

W12 — Warehouse Item Detail

Line-level detail for each item in the shipment. Contains quantity ordered, quantity shipped, unit of measure, and item identification codes (UPC, GTIN, SKU, or vendor item number). Also carries lot numbers, expiration dates, and weight. One W12 segment per item line — or per item/lot date combination when multiple lot dates are shipped for the same product.

W03 — Total Shipment Data

Summary totals for the transaction — total quantity shipped, weight, and volume.

N1 / N3 / N4 — Party Identification

Ship-to and ship-from party identification, including name, address, and location identifiers such as GLN or DUNS.

MAN — Marks and Numbers

SSCC label information for pallet and case identification. Used when the 945 needs to communicate carton or pallet serial numbers back to the supplier for 856 generation.


Matching the 940 to the Original 850

The 940 is derived from the 850 Purchase Order, and the data in it must align with what the warehouse has on file. Mismatches won't always generate a hard validation error in Orderful — but they can cause the 3PL to reject or mis-fulfill the order, which is operationally worse.

Item identifiers — the item codes in the 940 must match what the warehouse has in their warehouse management system. If the 850 uses UPCs but the warehouse expects vendor item numbers or GTINs, the 940 needs to carry the identifier the warehouse recognizes. Confirm with your 3PL which identifier type they require.

Quantities — quantities in the 940 should reflect what you're asking the warehouse to ship. If the 940 quantity exceeds what the warehouse has available or what was on the original 850, expect the warehouse to flag it or short-ship.

Ship-to party and location — the ship-to in the 940 must identify the destination using the identifier the warehouse expects. Some warehouses use GLN, others use DUNS+4 or an internal distribution center code. Using the wrong identifier type means the warehouse may not recognize the destination. Confirm with your 3PL which location identifier they use.

PO number — the purchase order number in the 940 must match the original 850 exactly, including format, prefix, and leading zeros. The warehouse uses this to trace the shipment back to the original order.


Common Validation Errors

The errors below reflect the most common field-level validation failures. Which fields are mandatory and how they are validated depends on the guidelines configured for your specific trading relationship.

Missing routing in 940 — W27 segment

Path: transactionSets.0.warehouseCarrierInformation.0.routing Error: Element is mandatory

The routing field (W2703) in the W27 segment is usually required in 940 transactions. It specifies how the warehouse should route the shipment — typically a carrier name or routing instruction. If this field is not populated in your source system or data mapping, the 940 will fail validation.

Check your 940 generation to ensure the routing value is being passed into warehouseCarrierInformation.routing. If you're unsure what value your 3PL or trading partner expects here, confirm with them directly — routing requirements vary by warehouse.

Missing purchase order number in 940 — W06 segment

Path: transactionSets.0.shippingOrderIdentification.0.purchaseOrderNumber Error: Element is mandatory

The PO number in the W06 segment links the warehouse shipping order back to the original 850. It must match the PO number from the originating purchase order exactly. If your 940 is generated from a sales or fulfillment system, confirm that the PO number is being passed through from the original order — it may be dropped if the mapping doesn't explicitly include it.

SSCC in 945 Transactions

The 945 carries SSCC (Serial Shipping Container Code) data in the MAN segment. The supplier uses this data when generating the 856 ASN for the retailer — the SSCC in the 856 must match what's on the physical carton or pallet label, and the label is generated by the warehouse. If the SSCC in the 945 is missing, malformed, or doesn't match the physical label, the 856 will fail at the retailer's receiving system.

SSCCs must be 18-digit GS1 numbers derived from the warehouse's GS1 company prefix. When receiving 945 data and generating an 856 from it, copy the MAN segment SSCC values directly without modification — do not reformat or regenerate them. If your 3PL is not including SSCC data in their 945, contact them to confirm whether they support it and whether it's required by your retailer.

Lot Number Location in 945 Transactions

Lot number information in the 945 can appear in two different places depending on how your trading partner's warehouse system is configured:

  • W12 segment — warehouseLotNumber field: the standard location for lot numbers in the item detail segment

  • N9 segment with LT qualifier: some warehouses send lot numbers as a reference identification segment with the LT qualifier, either in addition to or instead of the W12 field

The values are not guaranteed to be the same — it depends on the warehouse's mapping. When integrating 945 data into your system, check both locations and confirm with your 3PL which field they populate. If you're using the 945 data to generate a 856, make sure your integration is reading from the correct field.


What to Send Orderful Support

Contact [email protected] with:

  • Transaction ID from the failed 940 or 945 in Orderful

  • The complete error message as displayed

  • Sender and receiver ISA IDs for the relationship

  • Raw JSON payload or permission for the team to access it

  • Your integration method (API, file upload, NetSuite connector)

  • Whether this is affecting a specific trading partner or all 940/945 transactions


Frequently Asked Questions

My 940 transactions were working and are suddenly failing validation — what changed?

Validation is based on the guidelines configured for your relationship. If guidelines were updated, or if you're sending to a different trading partner or 3PL, requirements may differ. Check the relationship configuration in Orderful and compare against a previously successful transaction.

The W12 lot number field is empty but I see an N9 segment with LT qualifier — are these the same?

Not necessarily. Different warehouses map lot numbers to different fields. Check with your 3PL or warehouse to confirm where they send lot number data, and update your integration to read from the correct location.

Can Orderful automatically populate missing mandatory fields?

Mandatory field errors mean required business data is absent from the source transaction. Orderful can add hard-code or move business data using rules. Howvere, Orderful cannot generate dynamic values from scratch like PO numbers or routing codes. In this situation, the fix must happen at the source system or mapping level.

The 945 quantity shipped doesn't match the 940 quantity ordered — is that an error?

Not necessarily — partial shipments are valid. The W12 segment carries both quantity ordered and quantity shipped independently. Your integration should handle cases where the shipped quantity is less than ordered, as this is common in warehouse workflows. Some trading partners require a specific W12 status code (like CP for completion partial) when quantities don't match.

What is the correct value for the routing field in W27?

Routing requirements are specific to your trading relationship and 3PL. Contact your warehouse or trading partner for the expected value — it may be a carrier name, SCAC code, or a routing instruction code defined in their implementation guidelines.

My 3PL says they don't support SSCC in their 945 but my retailer requires it in the 856 — what do I do? This is a gap that needs to be resolved between your 3PL and your retailer's requirements. If the 3PL cannot provide SSCC data, you may need to generate SSCCs yourself and coordinate label printing outside the 945 workflow. Contact Orderful Support to discuss options for your specific setup.

Did this answer your question?