REF
Reference Information. The catch-all X12 segment that carries any external reference — contract, tender, tax ID — as long as it has a qualifier in list 128.
Definition
REF is one of the most versatile and most-used segments in X12. It carries:
- REF01 — Reference Identification Qualifier (element 128): a 2-3 character code that says what type of reference. List 128 — over 1,500 defined values. Common:
POPurchase Order,COContract Number,VAVendor's Account Number,VNVendor Order Number,BLBill of Lading,IAInternal Vendor Number,11Account Number,EIEmployer's Identification Number,RZReturned Goods Authorization. - REF02 — Reference Identification (element 127): the reference value (up to 80 characters).
- REF03 — Description (element 352): optional free text.
- REF04 — Reference Identifier: composite C040 to stack up to 5 additional identifiers (rarely used).
Origin
REF has been defined in X12 since version 002001 (1985). Its flexibility — over 1,500 qualifiers in list 128 — makes it both the most used and most misused segment in the standard: some implementers put there what they do not know where else to place. Implementation Conventions (IC) typically restrict the list of allowed qualifiers. Maintained by ASC X12.
Example in context
Reading: in the header of an 850, two stacked REFs carry the master
contract number (CO) and the supplier account number
(VA) that the buyer wants echoed on the invoice.