X12 864 — Text Message
The 864 is the X12 vehicle for moving a human-readable text: notification, contract, explanation, one-off communication. Designed to be read, not processed by an application.
Purpose
The 864 routes free text over the EDI channel when no dedicated business transaction
exists. Typical uses: VAN or partner maintenance notifications, ad-hoc alerts tied to an
order, attachment explanations, business-policy change announcements. The text travels
in repeated MSG segments and can be classified via an N9 code.
The 864 is not a real-time chat channel: it stays asynchronous and batch like any EDI transaction. For strictly human operational communication, email or a portal remain more relevant; the 864 keeps its place when the EDI audit trail is required (compliance, legal archiving).
Envelope structure
The 864 travels in a functional group TX (Text). Didactic example in release
004010 for a maintenance notification:
ISA*00* *00* *ZZ*ACMEHQ *ZZ*ACMESUPPLIER *260514*0830*U*00401*000000864*0*P*>~
GS*TX*ACMEHQ*ACMESUPPLIER*20260514*0830*1*X*004010~
ST*864*0001~
BMG*01*01*ALERT-2026-0091~
N9*MM*EDI Service Window 2026-05-15~
MSG*Routine EDI maintenance window. No documents will be processed.~
MSG*Window 22:00 EST 2026-05-15 to 02:00 EST 2026-05-16.~
SE*6*0001~
GE*1*1~
IEA*1*000000864~
The BMG (Beginning Segment for Message) opens with: message type code (alert,
information, request…), class, and identifier. The N9 segments add
categorisation (subject, urgency). The MSG segments carry the body line by
line, free text. A transaction can concatenate several paragraphs via successive
MSG segments.
Common segments
- Header —
ST,BMG(Beginning Segment for Message),DTM(date). - Categorisation —
N9loop (Extended Reference Information) with qualifier (SU = Subject, MM = Marketing Message…). - Body —
MSG(Message Text) repeated to the desired length. - Parties — optional
N1loop to refine sender / receiver beyond ISA/GS IDs. - Summary —
SE.
Common pitfalls
- Segment terminator inside text: if the
~or*character appears in free text, escape it or pick exotic ISA separators to avoid breaking the receiver's parser. - Encoding: X12 through release 5010 stays strictly ASCII; accents and non-ASCII characters must be transliterated, or carried in a 6020+ release that accepts UTF-8 via
ISA11. - Good practice: use
BMG02to classify (alert vs information) so the recipient can route the message to the right queue.
Related transactions
Documentation
The code 864 and the name Text Message are public and listed
on x12.org/products/transaction-sets.
Full BMG01 code lists and the loop structure are in the licensed X12 TR3.