The ANSI X12 hub: 9 transaction sets, 30 segments

ANSI X12 is the US EDI standard. Transaction sets are the business documents — purchase orders, advance ship notices, invoices — and segments are the reusable building blocks inside them. This hub links every X12 transaction set and segment reference SignalEDI publishes.

Transaction sets

X12 transaction sets (9)

Business documents identified by a three-digit code. Each links to its full reference page.

850

Purchase Order

The X12 850 is an electronic purchase order sent by a buyer or retailer to a supplier, carrying PO number, ship-to parties, line items, quantities, and delivery dates.

856

Advance Ship Notice (ASN)

The X12 856 advance ship notice (ASN) tells a buyer what shipped, when, and how cartons and items are packed — often before the shipment arrives.

810

Invoice

The X12 810 is an electronic invoice from supplier to buyer, carrying invoice number, dates, PO references, line items, and totals for payment processing.

997

Functional Acknowledgment

The X12 997 functional acknowledgment confirms whether a partner accepted the syntax of your outbound functional group — not whether the business document was approved.

862

Shipping Schedule

The X12 862 shipping schedule is sent by a buyer to a supplier to authorize precise ship/delivery quantities and timing, typically supplementing the 830 planning schedule in just-in-time manufacturing.

875

Grocery Products Purchase Order

The 875 grocery products purchase order is the UCS-standard order a grocery buyer sends to a supplier, carrying order identification, parties, and line items for food and grocery distribution.

880

Grocery Products Invoice

The 880 grocery products invoice is the UCS-standard invoice a supplier sends to a grocery buyer, carrying invoice identification, parties, line items, and allowance/charge detail.

945

Warehouse Shipping Advice

The X12 945 warehouse shipping advice is sent by a warehouse or 3PL to the depositor (seller) to confirm what was actually shipped against a 940 warehouse shipping order.

947

Warehouse Inventory Adjustment Advice

The X12 947 warehouse inventory adjustment advice is sent by a warehouse or 3PL to the depositor to report inventory adjustments — damage, count corrections, or status changes — with reason codes.

Segments

X12 segments (30)

Reusable building blocks identified by a two- or three-letter tag. Each links to its full reference page.

ISA

Interchange Control Header

The ISA segment opens every X12 interchange. It declares element and segment separators, identifies the sender and receiver, and assigns the interchange control number partners use for correlation.

GS

Functional Group Header

GS groups related transaction sets (for example all purchase orders in one batch). GS01 functional ID tells parsers whether the group carries PO, invoice, or acknowledgement traffic.

ST

Transaction Set Header

ST opens each transaction set inside a functional group. ST01 is the transaction set identifier; ST02 is the control number partners reference in 997 AK2 loops.

BEG

Beginning Segment for Purchase Order

BEG is the business header for EDI 850 purchase orders. It carries the PO number partners use for matching, invoicing, and ASN correlation.

PO1

Baseline Item Data

PO1 repeats for each line on an 850. It binds quantity, unit of measure, pricing, and product identifiers (UPC, SKU, vendor part number).

BSN

Beginning Segment for Ship Notice

BSN opens an 856 ASN. It identifies the shipment, purpose code, and ship date — the anchors retailers use to match trailers and invoices.

HL

Hierarchical Level

HL builds the shipment → order → pack → item tree in an 856. HL03 parent ID links each level so retailers can reconcile nested quantities.

BIG

Beginning Segment for Invoice

BIG opens an 810 invoice. It carries invoice number, invoice date, and the purchase order number used to match the original 850 and 856.

TDS

Total Monetary Value Summary

TDS states the invoice total. Partners compare TDS against summed IT1 amounts; mismatches are hard rejects or short-pay triggers.

N1

Name

N1 identifies trading parties in a transaction — ship-to, bill-to, buyer, seller, remit-to. N101 entity identifier and N104 ID codes must match partner enrollment or documents reject before line items are evaluated.

REF

Reference Identification

REF carries business references that tie documents together — purchase order numbers, release numbers, department IDs, and internal tracking keys. Partners score REF accuracy for chargeback prevention.

IT1

Baseline Item Data (Invoice)

IT1 describes each invoiced line on an 810 — quantity, unit of measure, unit price, and product identifiers. IT107 and IT113 tie lines back to the original PO and ASN for three-way match.

PID

Product Item Description

PID adds descriptive text or structured product attributes to line items. Some retailers require PID for private-label SKUs; others treat it as optional when GTIN is present.

CTT

Transaction Totals

CTT01 reports the number of line items in the transaction set. Validators compare CTT01 to actual PO1/IT1/HL counts — mismatches trigger 997 rejects.

GE

Functional Group Trailer

GE ends each GS..GE envelope. GE01 counts ST..SE transaction sets; GE02 must match GS06 group control number referenced in 997 AK1.

BAK

Beginning Segment for PO Acknowledgment

BAK opens an 855 purchase order acknowledgement. BAK02 type codes (AC=acknowledge with detail, AD=accept, RJ=reject) tell the retailer how you intend to fulfill the PO.

CLD

Load Detail

CLD describes cartons or handling units within an HL shipment loop — quantity per carton, packaging code, and weight. CLD pairs with REF and MAN (SSCC) segments for scan-based receiving.

AK1

Functional Group Response Header

AK1 in a 997 identifies the functional group (GS) being acknowledged. AK102 echoes GS06 so you can correlate responses to outbound batches.

AK2

Transaction Set Response Header

AK2 loops inside a 997 for each transaction set acknowledged. AK201 is the transaction set ID; AK202 matches your ST02.

AK5

Transaction Set Response Trailer

AK5 closes each AK2 loop with the transaction set disposition. AK501 A/E/R is the first field integrators check after sending.

AK9

Functional Group Response Trailer

AK9 summarizes the entire functional group's disposition after all AK2 loops. AK901 A/E/P/R tells integrators whether any transaction set in the group failed.

SE

Transaction Set Trailer

SE ends each ST..SE envelope. SE01 counts segments including ST and SE; SE02 must match ST02.

LIN

Item Identification

LIN appears at item-level HL loops in 856 ASNs. It binds shipped product IDs and quantities to the original PO lines for retailer receiving and three-way match.

DTM

Date/Time Reference

DTM carries qualifier-coded dates and times used throughout X12 documents — requested ship dates, delivery windows, invoice dates, and service periods. DTM01 says which date the DTM02 value represents.

N3

Address Information

N3 carries the street address lines for a party identified by the preceding N1 segment. It pairs with N4 (city/state/postal) to complete ship-to, bill-to, and remit-to addresses.

N4

Geographic Location

N4 completes the address for a party in an N1 loop by carrying city, state or province, postal code, and country code. It follows N3 street lines and is used for routing and tax determination.

PER

Administrative Communications Contact

PER attaches a contact to a party or document — buyer, seller, or shipping contact — with a function code and communication numbers such as telephone, email, and fax.

TD1

Carrier Details (Quantity and Weight)

TD1 reports packaging code, lading quantity, and gross weight for a shipment or handling unit. It supports carrier handoff and receiving reconciliation, most often on 856 ASNs.

TD5

Carrier Details (Routing Sequence/Transit Time)

TD5 conveys routing and carrier details — the SCAC carrier code, transportation method, and routing sequence — so buyers know how a shipment moves. It is common on 856 ASNs and routing requests.

SAC

Service, Promotion, Allowance, or Charge Information

SAC reports allowances (deductions) and charges (additions) such as freight, handling, or promotional discounts. SAC01 declares allowance vs charge; getting it wrong skews invoice totals and triggers deductions.

X12 questions

Map and validate X12 documents with SignalEDI

Send and receive 850, 856, 810, and more as JSON, with segment-level mapping and a free EDI validator.

© 2026 SignalEDI Inc. All rights reserved.