# EDI 417 Rail Carrier Waybill Interchange Guide

> EDI 417 explained: the rail waybill railroads exchange on interline moves and send customers, its BX, N7, N8, F9, D9 and R2 segments, a sample and checks.

<QuickAnswer>
The EDI 417 Rail Carrier Waybill Interchange is the X12 transaction railroads use to pass a shipment's waybill to other railroads in the route and, on request, to customers. It carries the waybill number and date, the car, origin and destination stations, the parties, every railroad in the route, and the commodity and weight the move is billed on.
</QuickAnswer>

**The EDI 417 is the waybill that travels with a rail car from one railroad to the next.** A shipper tenders a car with a [404 Rail Carrier Shipment Information](/guides/edi/404-rail-carrier-shipment-information). The origin railroad turns that bill of lading into its own waybill, gives it a number, and sends a 417 to every other railroad that will handle the car, so the connecting road knows what it is receiving at the junction before the car arrives. Some railroads also send the 417 to shippers, consignees and logistics providers, which is how most non-railroad readers meet it.

This guide covers what the 417 carries, how waybills move between railroads, every segment you will map, a live sample that continues the carload from our 404 guide, how the 417 compares with the 404 and the [410 freight invoice](/guides/edi/410-rail-carrier-freight-details-and-invoice), and what to check when you receive one.

<EDIGuideCTA
  transactionType="417"
  headline="Rail waybills start as customer orders"
  body="OrderSync reads inbound purchase orders in any format, from EDI 850s to PDFs, emails and spreadsheets, matches customers, items and units to your catalog, and sends clean orders to your ERP. The PO a railroad copies onto its waybill starts there."
/>

## What Is an EDI 417?

**An EDI 417 is the Rail Carrier Waybill Interchange transaction set defined by [ASC X12](https://x12.org/products/transaction-sets), used to provide a rail carrier with detailed movement instructions for a shipment.** The X12 description notes that Class I railroads in the United States and Canada use it, and CN's current guide describes it as used by all Class I rail carriers in the US, Canada and Mexico. It travels in functional group `WB` (the `GS01` value).

Authoritative references for 417 work:

- [Stedi's X12 004010 reference for the 417](https://www.stedi.com/edi/x12-004010/417) lists the segments, loops and elements in release 004010
- [CN's 417 implementation guide](https://cn.ca/-/media/files/customer-centre/customer-centre-documents/417-implementation-guide-8050-en.pdf) shows a railroad's outbound 417, with a complete sample, in release 008050
- [Railinc's Interline Settlement System](https://public.railinc.com/products-services/interline-settlement-system) is the industry process for dividing revenue when two or more railroads handle a shipment, and the AAR's Railway Accounting Rules cover the electronic exchange of waybill information
- The [Surface Transportation Board's waybill reference guide](https://www.stb.gov/wp-content/uploads/2022-STB-Waybill-Reference-Guide.pdf) documents the waybill data railroads report to the regulator, a useful glossary for fields such as STCC, SPLC and car type
- [Railinc's STCC resource](https://go.railinc.com/resources/standard-transportation-commodity-code) describes the seven-digit commodity codes in `L5`

**Who sends it?** A railroad: usually the origin railroad that created the waybill, and in some cases a railroad that corrects or reissues it.

**Who receives it?** The other railroads in the route, and customers such as shippers, consignees, 3PLs and freight payment providers who ask for waybill copies.

**When is it sent?** When the waybill is created, after the car is released, and again when the waybill is corrected or the shipment is diverted.

**Why does it matter?** Every later step depends on the waybill. The connecting railroad plans its trains from it, the destination railroad delivers to the consignee in it, and the freight bill is rated from the commodity, weight and route on it. If you receive 417s, they are your earliest confirmation that the railroad billed the car the way you tendered it.

## How Waybills Move Between Railroads

North American rail freight often moves over more than one railroad. A car might start on a regional railroad, be handed to a Class I at a junction, and be delivered by a short line at the far end. Each of those railroads needs the same shipment data, and the 417 is the standard way to share it.

1. **Shipper releases the car.** The shipper sends a [404](/guides/edi/404-rail-carrier-shipment-information), or enters the bill of lading on the railroad's portal.
2. **Origin railroad creates the waybill.** It assigns a waybill number and date, adds the station codes and the route, and confirms the weight basis and the price authority.
3. **Origin railroad sends a 417.** Each connecting railroad gets the waybill before the car reaches the junction. Customers who subscribe get a copy.
4. **Car moves and is interchanged.** At each junction the receiving railroad matches the physical car (by reporting mark and number) to the waybill it already holds.
5. **Revenue is settled.** On a through rate, the railroads divide the revenue among themselves through the industry's interline settlement process. On a Rule 11 shipment (`BX03` = `11`), separate rates apply to different parts of the route, and the railroads' guides explain how each part is billed.
6. **The payer is billed.** The billing railroad sends a [410](/guides/edi/410-rail-carrier-freight-details-and-invoice) to the party that pays the freight.

The waybill number in `N8` and the car's reporting mark and number in `N7` are the keys that tie the 404, the 417, the car's movement and the 410 together.

## Interactive Example: Origin Railroad to Connecting Railroad

This continues the shipment from our [404 guide](/guides/edi/404-rail-carrier-shipment-information). The origin railroad (`QPRR`) has created waybill 318204 for the loaded wallboard car `QPLX 450127` and sends the 417 to the connecting railroad (`QSWR`), which will take the car at Des Moines and deliver it to Joliet.

`BX` repeats the shipment terms, now with the bill of lading number as the shipment ID. `BNX` keeps the shipper's scale weight and single shipment billing. `DTM` (qualifier `168`) gives the release date and time. `N7` adds the car's tare weight to the lading weight from the 404. `N8` carries the waybill number and date. `F9` and `D9` now include each station's Freight Station Accounting Code. The parties, the two `R2` route segments (with rail mode in `R206`) and the lading follow. All names, SCACs, reporting marks, codes and numbers are fictional.

Use the **Plain English** tab for a readable summary, or click any segment to break it down element by element.

<EDISample id="417-rail-waybill-interline" />

## 417 Structure at a Glance

The table follows X12 release 004010 and lists the segments most 417s carry. Like the 404, the full set also has vehicle, intermodal, empty car disposition, transit, export, customs and hazardous materials segments.

| Area | Segment | Name | Usage in the standard | Notes |
|---|---|---|---|---|
| Heading | **ST** | Transaction Set Header | Mandatory | `ST01` = `417` |
| Heading | **ZC1** | Beginning Segment for Data Correction or Change | Optional | Marks a corrected waybill |
| Heading | **BX** | General Shipment Information | Optional | Purpose, mode, payment, shipment ID, SCAC, weight unit |
| Heading | **BNX** | Rail Shipment Information | Optional | Weight basis and billing type |
| Heading | **N9** | Reference Identification | Optional, up to 30 | Bill of lading, PO and other references |
| Heading | **DTM** | Date/Time Reference | Optional, up to 5 | Release and other dates |
| Heading loop | **N7** | Equipment Details | Mandatory, up to 500 | One per car or container |
| N7 loop | **M7** | Seal Numbers | Optional | Seals |
| N7 loop | **IMA** | Interchange Move Authority | Optional | Authority for an interchange movement |
| Heading | **N8** | Waybill Reference | Optional, up to 499 | Waybill number and date |
| Heading | **N8A** | Additional Reference Information | Optional | More waybill references |
| Heading | **V9** | Event Detail | Optional | An event tied to the waybill |
| Heading | **F9** | Origin Station | Mandatory | Station, FSAC, SPLC, postal code |
| Heading | **D9** | Destination Station | Mandatory | Station, FSAC, SPLC, postal code |
| Heading loop | **N1 / N2 / N3 / N4 / REF / PER / BL** | Name, address and billing | Mandatory, up to 10 | Shipper, consignee, payer and others |
| Heading loop | **S1 / S2 / S9** | Stop-off details | Optional | Stop-offs |
| Heading | **R2** | Route Information | Mandatory, up to 13 | One per railroad |
| Heading | **R9** | Route Code | Optional | A published route code |
| Heading | **H3 / PS** | Special handling, protective service | Optional | Handling and temperature |
| Detail loop | **LX** | Assigned Number | Mandatory, up to 25 | One per lading line |
| LX loop | **L5** | Description, Marks and Numbers | Mandatory | Description and STCC |
| LX loop | **L0 / MEA / PI** | Quantity, weight, measurements, price authority | Optional | Weight, packages, price authority |
| Summary | **SE** | Transaction Set Trailer | Mandatory | Segment count and control number |

Two structural differences from the 404: `R2` is mandatory in the 417, and the 417 carries the railroad's waybill reference in `N8`. The 417 has no `M3` release segment; the release is already done, and CN's guide reports it in `DTM` instead.

## Key Segments Explained

### BX and BNX: Shipment Information

```
BX*00*R*PP*NGP-BL-60418*QPRR*L*B*N~
BNX*S**S~
```

The elements match the 404. `BX01` is the purpose code, `BX02` the mode (`R` rail), `BX03` the payment terms, `BX04` the shipment ID, `BX05` the SCAC of the railroad issuing the waybill, `BX06` the weight unit and `BX07` the shipment qualifier. In CN's sample, `BX04` carries the shipper's bill of lading number. `BNX01` is the weight basis and `BNX03` the billing type: here, shipper certified scale weight and single shipment billing.

If you receive 417s as a shipper, compare `BX03` and `BNX01` with what you sent on the 404. A change in payment terms or weight basis means the railroad billed the car differently from your instructions.

### DTM: Release Date

```
DTM*168*20261106*1430*CT~
```

| Element | Name | Example | What it means |
|---|---|---|---|
| **DTM01** | Date/Time Qualifier | `168` | `168` release |
| **DTM02** | Date | `20261106` | Release date |
| **DTM03** | Time | `1430` | Release time |
| **DTM04** | Time Code | `CT` | Time zone, here central time |

### N7: Equipment Details

```
N7*QPLX*450127*168000*N*67200******RR~
```

| Element | Name | Example | What it means |
|---|---|---|---|
| **N701** | Equipment Initial | `QPLX` | The car's reporting mark |
| **N702** | Equipment Number | `450127` | The car number |
| **N703** | Weight | `168000` | Lading weight |
| **N704** | Weight Qualifier | `N` | `N` actual net weight |
| **N705** | Tare Weight | `67200` | Weight of the empty car |
| **N711** | Equipment Description Code | `RR` | `RR` rail car |

CN's 417 also sends the car length (`N715`), the tare qualifier (`N716`, `M` marked), height and width (`N720`, `N721`) and the AAR car type code (`N724`). Those come from the railroad's equipment records, not from the shipper, which is why the 417 is often more complete than the 404 it was built from.

### N8: Waybill Reference

```
N8*318204*20261106~
```

| Element | Name | Example | What it means |
|---|---|---|---|
| **N801** | Waybill Number | `318204` | The railroad's waybill number, up to six digits |
| **N802** | Date | `20261106` | The waybill date |
| **N803 to N805** | Cross Reference Type, Equipment Initial, Equipment Number | | A cross reference to another car or waybill |
| **N806 / N807** | Waybill Number, Date | | A related waybill, such as the original of a rebill |
| **N810 / N811** | Standard Carrier Alpha Code, Freight Station Accounting Code | | The destination railroad and its station code |

Waybill numbers are short and repeat over time, so a waybill is identified by its number, date and issuing railroad together, never the number alone. Store all three.

### F9 and D9: Stations With FSAC Codes

```
F9*41720*FORT DODGE*IA~
D9*63115*JOLIET*IL~
```

| Element | Name | Example | What it means |
|---|---|---|---|
| **F901 / D901** | Freight Station Accounting Code | `41720` | The railroad's code for the station |
| **F902 / D902** | City Name | `FORT DODGE` | Station name |
| **F903 / D903** | State or Province Code | `IA` | State or province |
| **F908 / D908** | Standard Point Location Code | | The SPLC, when sent |
| **F909 / D909** | Postal Code | | Station postal code, when sent |

A shipper's 404 often has only the station name. The railroad's 417 adds the codes. If you load rail data into a transportation or freight audit system, use the FSAC and SPLC from the 417 as the station key rather than the spelling.

### R2: Route Information

```
R2*QPRR*S*DES MOINES***R~
R2*QSWR*1****R~
```

| Element | Name | Example | What it means |
|---|---|---|---|
| **R201** | Standard Carrier Alpha Code | `QPRR` | The railroad |
| **R202** | Routing Sequence Code | `S` | `S` origin carrier on the shipper's routing, `R` origin carrier on a Rule 11 shipment, `1` first carrier after origin |
| **R203** | City Name | `DES MOINES` | The interchange junction |
| **R206** | Transportation Method/Type Code | `R` | `R` rail |

Check the route on every 417 you receive. If the railroads or junctions differ from your 404, the car is moving on a route you did not ask for, and the rate may differ too.

### N1, LX, L5 and L0

The party and lading segments work as they do in the 404: `N1` with `SH`, `CN` and `PF`, then `L5` with the description and STCC (`L504` = `T`) and `L0` with the weight, weight qualifier and package count. CN's 417 adds a customer identification code in `N103`/`N104` for each party, so the receiving railroad knows which of its customer accounts the party is.

## 417 vs 404, 410, 214 and 315

| Document | Mode | Sent by | Sent to | Purpose |
|---|---|---|---|---|
| **[404 Rail Carrier Shipment Information](/guides/edi/404-rail-carrier-shipment-information)** | Rail | Shipper | Origin railroad | Bill of lading and release |
| **417 Rail Carrier Waybill Interchange** | Rail | Railroad | Other railroads, customers | The waybill built from the bill of lading |
| **[410 Rail Carrier Freight Details and Invoice](/guides/edi/410-rail-carrier-freight-details-and-invoice)** | Rail | Railroad | Freight payer | Freight bill for the move |
| **[214 Shipment Status Message](/guides/edi/214-transportation-carrier-shipment-status)** | Truck and other modes | Carrier | Shipper or payer | Status events |
| **[315 Status Details (Ocean)](/guides/edi/315-status-details-ocean)** | Ocean | Ocean carrier | Shipper, consignee | Container events, including rail legs of an ocean move |
| **[858 Shipment Information](/guides/edi/858-shipment-information)** | Any | Shipper | Carrier | General bill of lading data |

The 417 is not a status message. It tells you how the car was billed and routed, not where it is now. For car location, ask the railroad which status feed or tracing tool it offers. On an import container that moves inland by rail under the ocean carrier's bill, the ocean carrier's [315](/guides/edi/315-status-details-ocean) reports rail events such as loaded on rail and rail departure.

## What to Check When You Receive a 417

| Check | Why | How |
|---|---|---|
| **Car matches your 404** | A different car means a bill applied to the wrong equipment | Compare `N701`/`N702` with your 404 and loading records |
| **Weight and weight basis** | The freight bill will be rated on them | Compare `N703`, `L004` and `BNX01` with what you declared |
| **STCC** | The price authority depends on it | Compare `L503` with the STCC in your rail contract |
| **Route and junctions** | A different route can mean a different rate and transit time | Compare every `R2` with your 404 |
| **Payment terms** | Prepaid and collect decide who gets the 410 | Compare `BX03` with your 404 and your sales terms |
| **Consignee and destination** | A wrong consignee is a misdelivery | Compare `D9` and `N1*CN` with the customer's order |
| **Corrected waybills** | A correction replaces earlier data | Version 417s by waybill number, date and SCAC, and flag changes |

## 417 Implementation Checklist

Before you start receiving 417s from a railroad:

- Ask the railroad whether it sends 417s to customers, and which shipments it includes (outbound, inbound, both)
- Confirm the X12 version in `GS08`; CN, for example, sends release 008050
- Key waybills on number, date and issuing SCAC, and link them to your bill of lading and car
- Map the station codes (`F901`, `D901`, `F908`, `D908`) into your location master
- Decide how corrected waybills update stored data, and who reviews the changes
- Feed the weight, STCC and route into your freight audit so the [410](/guides/edi/410-rail-carrier-freight-details-and-invoice) can be checked against them
- Confirm the 997 you will return for each 417
- Test a single-line route, an interline route, a correction and a multi-car shipment

For how rail sets sit next to the order, ship notice and invoice, see our [EDI document types reference](/edi-document-types).

## Where OrderSync Fits

The PO number a railroad copies onto its waybill, and the consignee and quantity behind it, all come from a customer order. That order might have arrived as an EDI 850, a PDF, an email or a spreadsheet.

OrderSync reads inbound orders in any format, matches customers, items and units to your catalog, and outputs clean ERP data or valid X12. Paste any 417 into the [free EDI inspector](/edi-inspector) to see it parsed segment by segment with a plain-English summary and any structural errors explained, or [book a 15-minute walkthrough](/book-call) to see your own orders processed.

## Frequently Asked Questions

<div className="not-prose">

### What is an EDI 417?

The EDI 417 Rail Carrier Waybill Interchange is the X12 transaction railroads use to share a shipment's waybill with other railroads in the route and with customers. It carries the waybill number and date, the car, stations, parties, route and lading.

### What is the difference between EDI 404 and EDI 417?

The shipper sends the 404 to the origin railroad as its bill of lading. The railroad creates a waybill from it and sends the 417 to other railroads and to customers. The 417 adds railroad data such as the waybill number, station codes and car details.

### Who sends the EDI 417?

A railroad. The origin railroad usually issues it when it creates the waybill. CN's guide describes the 417 as used by all Class I rail carriers in the US, Canada and Mexico.

### Can a shipper receive an EDI 417?

Yes, if the railroad offers it. CN's guide says the 417 can provide a rail carrier or a customer with movement instructions. Ask each railroad whether it sends 417s to customers and on which shipments.

### Where is the waybill number in a 417?

In the N8 segment. N801 is the waybill number and N802 the waybill date. Identify a waybill by its number, date and issuing railroad together.

### What is an FSAC in the F9 and D9 segments?

The Freight Station Accounting Code is a railroad's code for a station. It goes in F901 for the origin and D901 for the destination, next to the station name, state and, when sent, the Standard Point Location Code.

### Does the 417 tell me where my rail car is?

No. The 417 is the waybill: how the car was billed and routed. For location, use the railroad's car tracing or status service. For containers moving inland on an ocean bill, the ocean carrier's 315 reports rail events.

### What functional group does the 417 use?

The 417 travels in functional group WB, the value in GS01. The version is in GS08 and varies by railroad.

</div>
