# FSMA 204 Shipping CTE on an EDI 856: Segment by Segment

> Where the Traceability Lot Code and FSMA 204 shipping KDEs actually sit in an EDI 856 ASN. The hierarchical loop, the LIN and N9 segments, and what breaks in practice.

<QuickAnswer>
The FSMA 204 Shipping CTE maps onto the EDI 856 advance ship notice. GS1 US publishes guidance for this mapping. The Traceability Lot Code travels in an N9 reference segment at the item or pack level of the hierarchical loop, alongside the LIN product identifiers, with location KDEs in the N1 loops and ship date in DTM.
</QuickAnswer>

If you already send an [EDI 856 advance ship notice](/guides/edi/856-ship-notice), you
are closer to the FSMA 204 Shipping CTE than you probably think. GS1 US publishes
guidance mapping that CTE onto the 856, and the reason is structural: the 856 is the
only common X12 transaction that already describes a shipment as a hierarchy, from
shipment down to order down to pack down to item. Traceability needs exactly that shape,
because a lot code applies to some cartons on a pallet and not others.

This post walks the mapping at the segment level. It assumes you know what an 856 is. If
you do not, start with the [856 ship notice guide](/guides/edi/856-ship-notice) first.

## What the Shipping CTE asks for

When you ship a food on the Food Traceability List, you record:

- The Traceability Lot Code for each lot in the shipment
- The quantity and unit of measure of each lot
- The product description
- The location identifier for the immediate subsequent recipient
- The location identifier of where you shipped from
- The ship date
- A reference document type and number
- The location where the food was assigned its TLC, or a reference to it

Read that list against an ASN you already send and most of it is present. The lot code is
usually the one that is not.

## The hierarchical loop is the whole trick

An 856 is built out of `HL` segments that nest. The common pattern is Shipment to Order
to Pack to Item, though partners vary.

```
ST*856*0001
BSN*00*ASN10025*20280715*1430*0002
HL*1**S          Shipment level
  TD5, TD1, REF, DTM
  N1*ST  ...     Ship-to location
  N1*SF  ...     Ship-from location
HL*2*1*O         Order level
  PRF*PO4599871
  HL*3*2*P       Pack level
    MAN*GM*00012345600000000123
    HL*4*3*I     Item level
      LIN**UP*012345678905*VN*ROM-24CT
      SN1**24*CA
      N9*LO*ROM20280714-B2
      DTM*036*20280801
```

The nesting is what carries traceability. A pack level `HL` with an SSCC-18 in `MAN`
gives you a carton identity. The item `HL` underneath it carries the lot. When the FDA
asks which cartons contained lot `ROM20280714-B2`, the hierarchy answers it.

## Segment by segment

| KDE | Segment | Notes |
| --- | --- | --- |
| Traceability Lot Code | `N9*LO` at the item or pack `HL` | `LO` is the lot qualifier. Some partners use `REF*LO` instead. Confirm which in the routing guide. |
| Quantity and UOM | `SN1` at the item `HL` | Watch the UOM. A lot shipped as cases needs the case count, not eaches. |
| Product description | `LIN` plus `PID` | `LIN` carries `UP` for UPC, `VN` for vendor part, `GT` where partners use GTIN. |
| Ship-to location | `N1*ST` loop with `N4` | Use a GLN in `N1` when the partner supports it, since FSMA 204 speaks in location identifiers. |
| Ship-from location | `N1*SF` loop | Frequently omitted by suppliers who only ever shipped from one place. Add it. |
| Ship date | `DTM*011` at the shipment `HL` | Distinct from `DTM*036` expiration and `DTM*405` production date at the item level. |
| Reference document | `PRF` for the PO, `BSN02` for the ASN number | The reference document type and number KDE usually resolves to one of these. |
| Pack identity | `MAN*GM` with SSCC-18 | Not itself a KDE, but it is what makes a partial-lot shipment traceable. |

## Where this breaks in practice

**Lot at the wrong level.** Suppliers who bolt lot support on late tend to put a single
`N9*LO` at the shipment or order `HL`, which asserts the whole shipment is one lot. It
usually is not. Mixed-lot pallets are normal in produce, and a shipment-level lot code is
worse than none because it is confidently wrong during a recall.

**Qualifier drift.** `N9*LO`, `REF*LO`, and partner-specific qualifiers all appear in the
wild. Since nobody validates a lot code's meaning, a mismatched qualifier passes every
syntax check and silently lands in the wrong field downstream. Our
[free EDI Inspector](/edi-inspector) will show you which qualifiers a real file actually
uses, which is faster than reading a 200-page routing guide.

**UOM mismatch between SN1 and the lot.** If `SN1` reports cases and your traceability
system stores eaches, the lot quantity is off by the pack factor. This is the same class
of bug as ordinary [EDI unit of measure errors](/blog/grocery-edi), but during a recall
the consequence is recalling the wrong volume.

**Catch weight.** For variable-weight items the shipped quantity is a weight, not a
count, and it arrives in `CB1` or a `MEA` segment rather than cleanly in `SN1`. Lot plus
catch weight together is where most food ASN implementations get thin.

## The 810 is not a substitute

A recurring question is whether the [810 invoice](/guides/edi/810-invoice) can carry
traceability data instead. It cannot, for a structural reason: the 810 is flat at the
line level and has no pack hierarchy. You can staple a lot reference onto an invoice
line, but you cannot express that 6 cases of the 40 on this line were lot A and the rest
were lot B. The 856 can. We go into this further in
[what invoices can and cannot do for traceability](/blog/fsma-204-invoice-traceability).

## If your suppliers do not send an 856

This entire mapping assumes an ASN exists. For a meaningful share of most distributors'
supplier base, it does not and will not by 2028. That case needs a different answer,
which we cover in
[capturing FSMA 204 KDEs from non-EDI suppliers](/blog/fsma-204-kde-capture-non-edi-suppliers).
For background on the rule and the corrected 2028 deadline, see our
[FSMA 204 compliance guide](/fsma-204).

## Sources

- [FDA: FSMA Final Rule on Requirements for Additional Traceability Records for Certain Foods](https://www.fda.gov/food/food-safety-modernization-act-fsma/fsma-final-rule-requirements-additional-traceability-records-certain-foods)
- [GS1 US: standards and guidance for food traceability](https://www.gs1us.org/industries-and-insights/standards)

## FAQ

### Does GS1 US require the 856 for FSMA 204?

No. FSMA 204 is technology neutral and does not mandate EDI at all. GS1 US guidance maps
the Shipping CTE onto the 856 because that is what most food suppliers already send,
which makes it the cheapest path for partners who are already EDI-enabled.

### Should the Traceability Lot Code go at the pack level or the item level?

Item level, under the pack `HL` that contains it. That combination lets you say which
cartons held which lot. Putting it at pack level only works when a carton is single-lot,
which is common but not universal.

### What if a partner's routing guide has no lot segment at all?

Then their 856 spec predates their traceability requirement, which is extremely common.
Ask them directly which qualifier they intend to use before you guess. Sending `N9*LO`
into a spec that does not define it usually passes their translator and gets dropped
silently.
