The EDI 940 is how you tell your 3PL to ship an order. Your customer's order arrives as an EDI 850, a marketplace order, an email or a PDF. Your ERP turns it into a 940, and the warehouse picks, packs and ships from it. Everything the warehouse knows about that order (where it goes, by when, by which carrier, which items in which units) comes from the 940, so its mistakes become the warehouse's mistakes.
This guide covers what the 940 carries, where it sits in the 3PL document set, every segment you will map, three live examples (a parcel order, a refrigerated shipment to a foodservice DC and a single-item drop-ship), and the errors that make warehouses reject or misship orders.
What Is an EDI 940?
An EDI 940 is the Warehouse Shipping Order transaction set defined by the ASC X12 standards body. The depositor (the company that owns the goods) sends it to a warehouse (the custodian) to authorize a shipment from stock the warehouse holds for it. It travels in functional group OW (the GS01 value).
The goods do not change hands between depositor and warehouse. Ownership stays with you; the warehouse only holds and ships. That is why the 940 is a list of what to ship and where, with no unit prices on its item lines.
Authoritative references for 940 work:
- The X12 transaction set catalog defines the 940 and the rest of the warehouse series (940, 943, 944, 945, 947)
- The Stedi X12 004010 reference for the 940 shows the segment order, loops and usage, and links to each segment's elements
- GS1 US governs the UPC case codes and GTINs that identify items on 940 lines
- Your warehouse's own 940 implementation guide governs. It sets the required segments, the item identifiers it matches on, and the carrier and date rules
Who sends it? The depositor: a brand, manufacturer, importer or distributor, usually from its ERP or order management system.
Who receives it? The warehouse: a 3PL, a public or cold-storage warehouse, or your own warehouse if it runs a separate warehouse management system.
When is it sent? As soon as an order is released for shipment. Each warehouse has its own cut-off for same-day shipping, set in your service agreement.
Why does it matter? The 940 is the only instruction the warehouse works from. A wrong unit, item number or address on the 940 ships wrong, and the 945 will confirm the wrong shipment accurately.
The 3PL Document Set
The 940 is one of five warehouse transaction sets. Each travels in its own functional group.
| Set | Name | Direction | GS01 | What it says |
|---|---|---|---|---|
| 940 | Warehouse Shipping Order | Depositor to warehouse | OW | Ship this order |
| 945 | Warehouse Shipping Advice | Warehouse to depositor | SW | This is what we shipped |
| 943 | Warehouse Stock Transfer Shipment Advice | Depositor to warehouse | AR | Stock is on its way to you |
| 944 | Warehouse Stock Transfer Receipt Advice | Warehouse to depositor | RE | This is what we received |
| 947 | Warehouse Inventory Adjustment Advice | Warehouse to depositor | AW | Your stock changed for another reason |
The 940 and 945 close the outbound loop; the 943 and 944 close the inbound one; the 947 covers everything else. Many warehouses also send an 846 inventory report so you can check balances.
How the 940 to 945 Loop Works
- Order arrives. A customer order reaches you as an EDI 850, a marketplace order, an email or a PDF, and is entered in your ERP.
- 940 goes out. Your system sends the warehouse your order number in
W0502, the ship-to, the ship date, the carrier and oneW01per line. - Warehouse acknowledges. Its translator returns a 997 for the
OWgroup. Some warehouses also report orders they cannot accept, by EDI or by email; the guide says how. - Warehouse ships. It picks, packs, labels, books the carrier and gets tracking numbers or a bill of lading.
- 945 comes back. The
W06header echoes your order number inW0602, and eachW12line reports ordered, shipped and the difference. - You reconcile. Match the 945 to the 940 line by line, then build the customer's 856 ship notice and 810 invoice from what shipped, not from what you ordered.
Step 6 only works if the 940 and 945 identify items the same way, which is why item identification on W01 matters so much.
Interactive Example: Parcel Order to a 3PL
The brand sends order ORD-78901234 to its 3PL: twelve black tees in eaches and four cases of white tees, to Acme Customer in Austin. W05*N marks it as an original order. Three N1 segments name the ship-to (ST), the depositor (DE) and the warehouse (WH). G62*10 is the requested ship date and W66 asks for UPS parcel service, freight prepaid. Line 1 identifies the tees by vendor item and consumer UPC. Line 2 identifies the case by its 12-digit UPC case code in W0103, plus the vendor item. W76 gives a hash total of 16 units and an estimated 77 pounds.
This is the order our 945 guide answers: the warehouse ships all twelve tees and three of the four cases.
Use the Plain English tab for a readable summary, or click any segment to break it down element by element.
3PL 940 Warehouse Shipping Order
Brand-to-3PL shipping order for ORD-78901234: one line in eaches, one by UPC case code in W0103, UPS parcel service in W66 and a W76 hash total
- Document
- 940 Warehouse Shipping Order
- From / to
- BRAND123 → WAREHOUSE456
- Segments
- 21
- Ship To
- ACME CUSTOMER INC
- 123 MAIN STREET, AUSTIN, TX, 78701
- Party (DE)
- BRAND COMPANY LLC
- Party (WH)
- NORTHGATE FULFILLMENT DALLAS
- Interchange date
- May 9, 2026
Raw EDI (X12)
Human-Readable
Interchange
Functional Group
Transaction 940
Warehouse Shipping OrderSegment Detail
940 Structure at a Glance
The 940 in release 004010 has a header, a detail loop per line, and a short summary.
| Position | Segment | Name | Usage | Notes |
|---|---|---|---|---|
| Header | ST | Transaction Set Header | Mandatory | ST01 = 940 |
| Header | W05 | Shipping Order Identification | Mandatory | Order status, your order number, customer PO |
| Header loop | N1 / N2 / N3 / N4 / PER | Name, address, contact | Optional, up to 10 loops | Ship-to, depositor, warehouse, bill-to |
| Header | N9 | Reference Identification | Optional, up to 10 | Customer, department, load and other references |
| Header | G61 | Contact | Optional | A contact for the shipment |
| Header | G62 | Date/Time | Optional, up to 10 | Requested ship, delivery, cancel-after dates |
| Header | NTE | Note/Special Instruction | Optional | Warehouse or handling instructions |
| Header | W09 | Equipment and Temperature | Optional | Equipment type and temperature range |
| Header | W66 | Warehouse Carrier Information | Optional | Freight payment, mode, routing, SCAC |
| Header | W6 / R2 / BNX | Special handling, route, rail | Optional | Used by some guides |
| Detail loop | LX | Assigned Number | Mandatory per loop | Starts each line group |
| Detail loop | MAN / SDQ / N1 / G62 | Marks, store quantities, party, dates | Optional | Pre-assigned labels, line-level ship-to or dates |
| Item loop | W01 | Line Item Detail - Warehouse | Mandatory per item | Quantity, unit, item identifiers |
| Item loop | G69 | Line Item Detail - Description | Optional, up to 5 | Item description |
| Item loop | N9 / NTE / W20 / QTY / AMT / G62 | References, notes, weights, quantities, amounts, dates | Optional | Lot, serial, line notes |
| Item loop | LH2 / LHR / LH6 and others | Hazardous material detail | Optional | Hazmat lines |
| Summary | W76 | Total Shipping Order | Optional | Hash total of quantities, weight, volume |
| Summary | SE | Transaction Set Trailer | Mandatory | Segment count and control number |
Two segments people expect are not there. The 940 in 004010 has no TD5: carrier detail goes in W66. And it has no PO1 or price: items are on W01, which carries quantities and identifiers only.
Key Segments Explained
W05: Shipping Order Identification
W05*N*ORD-78901234~
| Element | Name | Example | What it means |
|---|---|---|---|
| W0501 | Order Status Code | N | N original, F cancel, R change, T resubmission. Other codes cover backorders, deletes and line replacements |
| W0502 | Depositor Order Number | ORD-78901234 | Your order number. The 945 echoes it in W0602 |
| W0503 | Purchase Order Number | Your customer's PO, which the warehouse may print on the packing list and bill of lading | |
| W0504 / W0505 | Link Sequence Number, Master Reference (Link) Number | A pair that links related orders, when the guide uses it | |
| W0506 | Transaction Type Code | A further classification, when the guide uses it | |
| W0507 | Action Code | An action code, when the guide uses it |
W0502 is the matching key for the whole loop. Keep it unique, keep its format stable (prefixes, leading zeros), and never reuse it for a different order. Which W0501 codes a warehouse accepts, and whether it handles changes and cancellations at all once an order is released for picking, is set by its guide. Many warehouses want a cancellation (F) followed by a new original rather than a change.
N1 Loop: Parties
N1*ST*ACME CUSTOMER INC~
N3*123 MAIN STREET~
N4*AUSTIN*TX*78701*US~
N1*DE*BRAND COMPANY LLC*ZZ*BRAND123~
N1*WH*NORTHGATE FULFILLMENT DALLAS*ZZ*WHSE-001~
| Code | Party | Typical use |
|---|---|---|
ST | Ship To | The delivery address. Required by almost every guide |
DE | Depositor | You, with the account code the warehouse assigned |
WH | Warehouse | The building to ship from, when you use several |
BT | Bill To | Third-party freight billing, when used |
SF | Ship From | The return address to print on labels, when it differs |
For retail orders, the ship-to usually needs the retailer's DC or store number in N103/N104, because the warehouse prints it on labels and you will need it again on the 856.
G62: Dates
G62*10*20260512~
| Code | Name |
|---|---|
10 | Requested Ship Date/Pick-up Date |
02 | Delivery Requested on This Date |
37 | Ship Not Before Date |
38 | Ship Not Later Than Date |
01 | Cancel After This Date |
Use the codes your warehouse's guide lists. A retailer's ship window from the 850 usually maps to 37 and 38; a consumer order usually only needs 10.
NTE: Instructions
NTE*WHI*FIFO BY LOT. NO MIXED LOTS ON A PALLET~
NTE01 says what kind of note it is (WHI warehouse instruction, SPH special handling, GEN general) and NTE02 carries the text. Free text is read by people, not systems, so put anything the warehouse must act on automatically, such as dates, carrier and lots, in coded segments.
W09: Equipment and Temperature
W09*RT*33*FA*38*FA~
| Element | Name | Example | What it means |
|---|---|---|---|
| W0901 | Equipment Description Code | RT | RT controlled temperature trailer (reefer). TF is a dry freight trailer |
| W0902 / W0903 | Temperature, Unit | 33, FA | Minimum temperature, FA Fahrenheit or CE Celsius |
| W0904 / W0905 | Temperature, Unit | 38, FA | Maximum temperature |
Cold-storage warehouses use W09 to book the right equipment. If your products need a temperature range, send it on every order; do not rely on item master settings alone.
W66: Warehouse Carrier Information
W66*PP*U***UPS GROUND*****UPSN~
| Element | Name | Example | What it means |
|---|---|---|---|
| W6601 | Shipment Method of Payment | PP | PP prepaid, CC collect, TP third party |
| W6602 | Transportation Method/Type Code | U | U private parcel service, M motor (common carrier), LT less than trailer load, H customer pickup |
| W6605 | Routing | UPS GROUND | Service level or routing text |
| W6606 / W6607 | F.O.B. Point Code, F.O.B. Point | Freight terms point, when used | |
| W6608 / W6609 | COD Method of Payment, Amount | Cash on delivery, sent as a pair | |
| W6610 | Standard Carrier Alpha Code | UPSN | The carrier's SCAC |
For retail orders, the carrier and service usually come from the retailer's routing guide or a 754 routing instruction, and the warehouse must use exactly what you send. For consumer orders, many warehouses pick the service from rate tables; agree which side decides. Our SCAC code glossary entry explains carrier codes.
LX and W01: Line Item Detail
LX*2~
W01*4*CA*012345678912*VN*BRAND-SKU-002~
| Element | Name | Example | What it means |
|---|---|---|---|
| W0101 | Quantity Ordered | 4 | Quantity to ship |
| W0102 | Unit or Basis for Measurement Code | CA | EA each, CA case, and other X12 unit codes |
| W0103 | U.P.C. Case Code | 012345678912 | The 12-digit case code, when the line is identified by it |
| W0104 / W0105 | Product/Service ID Qualifier, ID | VN, BRAND-SKU-002 | Your item number (VN), or another ID such as UP for a consumer UPC |
| W0106 / W0107 | Product/Service ID Qualifier, ID | A second identifier | |
| W0108 / W0109 | Freight Class Code, Rate Class Code | Freight classification for LTL | |
| W0113 | Warehouse Lot Number | A required lot, when you specify one | |
| W0115 / W0116 | Product/Service ID Qualifier, ID | A third identifier |
The standard requires either W0103 or the W0104/W0105 pair. W0103 holds the UPC case code value itself, with no qualifier: there is no "UPC" qualifier element in front of it. A line written W01*12*EA*UPC*012345678905 puts the text UPC into the case code element and the number into the qualifier element, and a validator or the warehouse will reject it. For an each identified by its consumer UPC, use a qualifier pair instead: W01*12*EA**VN*BRAND-SKU-001*UP*012345678905.
Whatever you send, it has to match the warehouse's item master and come back on the 945. On the 945, W1205 to W1208 mirror W0102 to W0105 (unit, UPC case code, then a qualifier and ID pair), so the identifiers line up.
G69: Description
G69*PERFORMANCE TEE WHITE LARGE CASE OF 12~
A free-text description for pickers and packing lists. Useful, but never a substitute for an item identifier.
N9 at Line Level: Lots and Other References
N9*LT*L2610281~
N9*LT asks for a specific lot. Line-level N9 also carries customer line numbers, serial numbers and similar references when a guide wants them. If one item must ship from two lots, send two lines.
W76: Total Shipping Order
W76*16*77*LB~
| Element | Name | Example | What it means |
|---|---|---|---|
| W7601 | Quantity Ordered | 16 | Sum of W0101 across all lines |
| W7602 / W7603 | Weight, Unit | 77, LB | Estimated total weight, sent as a pair |
| W7604 / W7605 | Volume, Unit | Estimated volume, sent as a pair |
The standard calls W7601 a hash total: it adds quantities regardless of unit, so 12 eaches plus 4 cases is 16. It is a completeness check, not a unit count.
Interactive Example: Refrigerated Order to a Foodservice DC
A food manufacturer stores product at a cold-storage warehouse and sells to a foodservice distributor. It sends the warehouse a 940 to ship three lot-controlled lines to the distributor's DC. W0503 carries the distributor's PO. G62*10 and G62*02 give the ship date and the delivery date the customer asked for. NTE*WHI asks for first-in, first-out by lot, W09 sets a reefer at 33 to 38 degrees Fahrenheit, and W66 names an LTL reefer carrier, freight prepaid. Each line has a UPC case code in W0103, a vendor item and a required lot in N9*LT. W76 totals 74 cases and 872 pounds. All names, codes and the SCAC are fictional.
Cold Storage 940 to a Foodservice DC
A food maker tells its cold-storage 3PL to ship three lot-controlled lines to a foodservice distributor's DC, with a reefer temperature range in W09, a reefer LTL carrier in W66 and lots in N9*LT
- Document
- 940 Warehouse Shipping Order
- From / to
- RIDGELINE → FROSTLINECS
- Segments
- 30
- Ship To
- COASTLINE FOODSERVICE DC 14
- 900 TERMINAL AVE, PHILADELPHIA, PA, 19148
- Party (DE)
- RIDGELINE PROVISIONS INC
- Party (WH)
- FROSTLINE COLD STORAGE ALLENTOWN
- Interchange date
- Nov 6, 2026
Raw EDI (X12)
Human-Readable
Interchange
Functional Group
Transaction 940
Warehouse Shipping OrderSegment Detail
If you sell into foodservice through a 3PL, our page on EDI for food distributors covers the customer side.
Interactive Example: Drop-Ship to a Consumer
A direct-to-consumer brand sends its fulfillment center one 940 per web order. The ship-to is a residential address, there is a single line, W66 asks for UPS Ground, and two NTE segments carry gift-wrap and a gift note. The candle is identified by vendor item and consumer UPC in the qualifier pairs, with W0103 left empty.
DTC Brand 940 Drop-Ship to Consumer
A direct-to-consumer brand sends its 3PL a single-item order for a residential ship-to, with UPS Ground in W66 and gift-wrap instructions in NTE
- Document
- 940 Warehouse Shipping Order
- From / to
- EMBERWICK → SHIPHAVEN3PL
- Segments
- 19
- Ship To
- JANE THOMPSON
- 1842 ELM STREET APT 3C, BROOKLYN, NY, 11201
- Party (DE)
- EMBER AND WICK CO
- Interchange date
- Nov 5, 2026
Raw EDI (X12)
Human-Readable
Interchange
Functional Group
Transaction 940
Warehouse Shipping OrderSegment Detail
Gift messages and other text the customer wrote are fine in NTE, but keep them short and free of special characters that clash with your delimiters. A * or ~ inside a gift note breaks the file.
EDI 940 vs 945, 850 and 856
| Document | Sent by | To | Purpose |
|---|---|---|---|
| 850 Purchase Order | Customer | You | The customer's order |
| 940 Warehouse Shipping Order | You (depositor) | Warehouse | Ship this order from my stock |
| 945 Warehouse Shipping Advice | Warehouse | You | What actually shipped against the 940 |
| 856 Ship Notice/Manifest | You | Customer | What is arriving, built from the 945 |
| 943 Stock Transfer Shipment Advice | You | Warehouse | Stock is coming in, the inbound counterpart |
The 850 and 856 face your customer; the 940 and 945 face your warehouse. Most problems in 3PL EDI come from mixing the two: building the 856 from the 940 instead of the 945, or sending the customer's item numbers to a warehouse that knows only yours.
Common 940 Errors and How to Prevent Them
| Error | What happens | Prevention |
|---|---|---|
Literal UPC sent in W0103 | 997 rejection or an unmatched line | W0103 holds the 12-digit case code only; use a qualifier pair (UP, VN) for other IDs |
| Item ID not in the warehouse's item master | Order held as "unknown item" | Send the identifier the warehouse matches on, usually your item number |
| Wrong unit of measure | 4 eaches shipped instead of 4 cases | Send the unit the warehouse stores the item in, per item |
W0502 reused or reformatted | 945 cannot be matched; duplicate shipments | Unique order numbers, stable format, echoed exactly on the 945 |
Carrier sent in TD5 | Segment rejected; the 004010 940 has no TD5 | Put carrier detail in W66, SCAC in W6610 |
| Malformed ship-to | Label fails or parcel is undeliverable | Validate addresses before the 940 goes out |
| Retail ship window missing | Shipped early or late; customer compliance issues | Map the 850's dates to G62 codes the warehouse uses |
| Change sent after picking started | Warehouse ships the old version | Agree cut-offs and how changes and cancellations (W0501) are handled |
| Delimiter characters in free text | File breaks at the bad character | Strip *, ~ and your sub-element separator from notes |
| No 945 back for a 940 | Order shows open while the customer has the goods | Alert when a 940 has no 945 by the agreed cut-off |
940 Implementation Checklist
- Get the warehouse's 940 guide and confirm release (usually 004010) and
GS01=OW - Agree your depositor code and how the warehouse identifies each building (
N1*DE,N1*WH) - Agree the item identifier per item (
W0103case code,VN,UP) and the unit the warehouse stores it in - Map
G62dates,W66carrier rules and anyW09temperature requirements - Agree which
W0501codes the warehouse accepts and its cut-offs for changes and cancellations - Send lots, serials and hazmat detail where your products need them
- Confirm the warehouse echoes
W0502on the 945, and build the 940 to 945 reconciliation - Return and monitor 997s in both directions
- Test a parcel order, an LTL or retail order, a multi-line order, a cancellation and a short shipment end to end
If you are setting up a 3PL connection from scratch, our post on 3PL EDI integration and the page on EDI for third-party logistics show which documents each side usually owns.
Where OrderSync Fits
A 940 can only be as good as the order behind it. If the customer's order was keyed with the wrong item, unit or ship-to, the warehouse ships exactly that.
OrderSync works on the order side. It reads customer orders in any format, from EDI 850s and 875s to PDFs, emails and spreadsheets, matches customers, items and units to your catalog, and outputs valid X12 or ERP data, so the order your system releases to the warehouse starts out right. Paste any 940 into the free EDI inspector to see it parsed segment by segment with a plain-English summary, or book a 15-minute walkthrough to see your own orders processed.
Frequently Asked Questions
What is an EDI 940 used for?
The EDI 940 tells a warehouse, usually a 3PL, to ship an order from stock it holds for the depositor. It carries the depositor's order number, the ship-to, dates, carrier, and the items and quantities to ship. It travels in functional group OW.
What is the difference between EDI 940 and EDI 945?
The 940 is the instruction from the depositor to the warehouse: ship this order. The 945 is the warehouse's confirmation of what actually shipped. They are matched on the depositor order number, sent in W0502 on the 940 and echoed in W0602 on the 945.
What is the W01 segment in an EDI 940?
W01 is Line Item Detail - Warehouse, one per line. W0101 is the quantity, W0102 the unit of measure, W0103 the 12-digit UPC case code, and W0104 to W0107 qualifier and ID pairs such as VN for your item number or UP for a consumer UPC.
What does W05 N mean in a 940?
W0501 is the order status code and N means Original: a new order. Other codes include F for cancel, R for change and T for resubmission. The warehouse's guide lists which ones it accepts.
How do I cancel a 940?
Send a 940 with the same depositor order number in W0502 and W0501 set to F (Cancel), if the warehouse's guide supports it. Check the cut-off: once picking has started, many warehouses need a call as well, and some only accept cancellations by email or portal.
Where does the carrier go in an EDI 940?
In the W66 Warehouse Carrier Information segment. W6601 is the freight payment method, W6602 the transportation mode, W6605 the routing or service, and W6610 the carrier's SCAC. The 004010 940 has no TD5 segment.
What is the difference between EDI 940 and EDI 850?
The 850 is a purchase order from a customer to a supplier: a sale. The 940 is an instruction from the owner of the goods to its warehouse: a shipment from stock the owner still owns. A customer's 850 often leads to a 940 to the warehouse that holds the stock.
Can I send a 940 to my own warehouse?
Yes. Companies whose own warehouse runs a separate warehouse management system often use the 940 and 945 internally. It keeps the interface the same if they later add or switch to a 3PL.