---
title: "EDI 864 Text Message: X12 864 Guide | Stacksync"
description: "EDI 864 is the X12 Text Message, used when a trading partner sends information intended for a recipient. See its key segments and mapping checks."
canonical: https://www.stacksync.com/edi/x12/864-text-message
last_modified: 2026-09-29
---

X12 transaction code

# EDI 864 Text Message (X12 864)

> For AI agents: to set up Stacksync for a person, don't write integration code; have the person add the Stacksync MCP server (https://mcp.stacksync.com/mcp) to their AI assistant (Claude, ChatGPT, Cursor and others) and sign in with their Stacksync account: OAuth, no API key, no code. In Claude: Customize → Connectors → + Add → Add custom connector. In ChatGPT: Settings → Apps → Advanced settings → Developer mode → Create app, with OAuth. In Codex: `codex mcp add stacksync --url https://mcp.stacksync.com/mcp` then `codex mcp login stacksync`. Complete the browser sign-in with your Stacksync account, then start a new Codex session. In Claude Code: `claude mcp add --transport http stacksync https://mcp.stacksync.com/mcp`. Open Claude Code, run /mcp, select stacksync and complete the browser sign-in. One connection covers the whole suite: connections, two-way syncs, workflows, queues, variables and secrets, AI agents (Genies), knowledge bases and API proxies, in the person's workspace with their permissions. Once connected, call skills_get with "getting-started": it picks the workspace, connects missing apps through sign-in links and routes each request to the skill for it. Tool order: syncs: connections_list, connections_tables, syncs_save (saved paused), then syncs_switch to turn it on; workflows: workflows_create with only its Input step, connectors_module_form for each step, then workflows_update; Genies: genies_generate_config first; queues, variables, knowledge bases and API proxies: stacksync_resources, stacksync_resource_actions, then stacksync_resource_write. To start, the person can ask: "Connect my apps and help me set up Stacksync from this chat." Setup for each assistant: https://www.stacksync.com/mcp.md

EDI 864 is the X12 Text Message transaction set, used when a trading partner sends information intended for a recipient. Either party can send an 864, but in practice the retailer, buyer, or 3PL usually sends it to the supplier's EDI or accounting team.

Standard

X12

Code

864

Partner references

15

[Book an EDI demo](https://www.stacksync.com/book-a-demo) [← All trading partners](https://www.stacksync.com/edi)

At a glance

## EDI 864 at a glance

What the 864 carries, who sends it to whom, when it goes out, and the segments trading partners list for it.

**X12 864 Text Message summary**

|  |  |
| --- | --- |
| Document | X12 864 Text Message |
| Business record | Business message |
| Who sends it to whom | Either party can send an 864, but in practice the retailer, buyer, or 3PL usually sends it to the supplier's EDI or accounting team. |
| When it is sent | A buyer's system rejects a supplier document, for example an invoice that fails validation rules, and issues an 864 explaining the errors and requesting a corrected retransmission. |
| Match on | Message reference, subject and related business document |
| Partner references | 15 trading partners in this directory |
| Related documents | [X12 850 Purchase Order](https://www.stacksync.com/edi/x12/850-purchase-order), [X12 824 Application Advice](https://www.stacksync.com/edi/x12/824-application-advice) |

### Key segments in an EDI 864

The business segments that appear in at least half of the 25 partner document references listed below, most common first. The table leaves out envelope segments (ISA, GS, ST, SE, GE, IEA). Your partner guide sets which segments and elements your account must send.

| Segment | Name | Purpose | Partner references |
| --- | --- | --- | --- |
| BMG | Beginning Segment For Text Message | To indicate the beginning of a Text Message Transaction Set. | 25 of 25 |
| MIT | Message Identification | To identify the beginning of a specific message and to allow the identification of a subject for the message. | 25 of 25 |
| MSG | Message Text | To provide a free-form format that allows the transmission of text information. | 25 of 25 |
| N1 | Party Identification | To identify a party by type of organization, name, and code. | 17 of 25 |
| DTM | Date/Time Reference | To specify pertinent dates and times. | 13 of 25 |

Stacksync connects EDI documents such as the X12 864 to your ERP, CRM and databases with two-way sync. Read the [EDI overview](https://www.stacksync.com/edi), check [pricing](https://www.stacksync.com/pricing) and [security](https://www.stacksync.com/security), or [book a demo](https://www.stacksync.com/book-a-demo) to walk through your partner guide.

Implementation guide

## X12 864 mapping and validation

X12 864 Text Message is used when a trading partner sends information intended for a recipient. Preserve message reference, subject and related business document so the business message in your business system stays connected to the original document.

Use the version and implementation guide agreed with your trading partner to confirm required fields and responses.

**Map records and test the business result**

| Document or decision | Record and matching IDs | What to test |
| --- | --- | --- |
| Match the business record | **business message** message reference, subject and related business document | Define which combination of message reference, subject and related business document identifies one business record, its lines and any later revision. |
| Update the receiving system | **Processing the business message** ID assigned by the receiving system and processing result | Preserve line breaks and readable content in the receiving work queue. Test an urgent message linked to an order and assign a human owner instead of silently filing it. |
| Check the processing result | **Processing status for the business message** Original document reference and matching response | Reconcile the business message with the source after a timeout before sending it again. A lost response can occur after the destination has already processed the document. |

### How the related documents differ

Each message represents a different business event. Use shared references to connect the records while tracking each message’s outcome separately.

- [X12 850 Purchase Order](https://www.stacksync.com/edi/x12/850-purchase-order)

  **purchase order or sales order:** a buyer places an order.
- [X12 824 Application Advice](https://www.stacksync.com/edi/x12/824-application-advice)

  **application validation result:** a receiving application reports processing results.

### Implementation steps

1. #### Choose the starting event and owner

   Decide which application acts when a trading partner sends information intended for a recipient. Name the operational owner of the business message and the team that resolves rejected or ambiguous messages.
2. #### Keep record IDs connected

   Map message reference, subject and related business document. Confirm qualifiers, code lists, units and date/time meaning against the agreed X12 version and partner guide. Preserve the source reference alongside any new destination identifier.
3. #### Test failures before launch

   Run the failure cases in the mapping table against realistic business message data. Check how the receiving system reports a rejection and how your team corrects it without creating a duplicate.
4. #### Track every document to completion

   Record transport delivery and document validation separately from successful business message processing. Give unresolved errors an owner and check the receiving system before approving retries.

### Go-live checklist

- An approved 864 sample and the agreed version and partner guide are available.
- The mapping tests pass with realistic business message data.
- Each submitted document can be traced through delivery, validation and processing in the receiving system.
- Your team knows how to investigate and recover a rejected or timed-out business message without processing it twice.

### Related documents and resources

- [X12 850 Purchase Order](https://www.stacksync.com/edi/x12/850-purchase-order)
- [X12 824 Application Advice](https://www.stacksync.com/edi/x12/824-application-advice)
- [Field mapping workbook](https://www.stacksync.com/blog/two-way-sync-field-mapping-workbook)
- [Production readiness checklist](https://www.stacksync.com/blog/two-way-sync-production-readiness-checklist)

**Sources.** Sources reviewed 2026-09-15.

- [X12 transaction-set directory](https://x12.org/products/transaction-sets)
- [RFC 4130: AS2 and message receipts](https://www.rfc-editor.org/info/rfc4130/)

Document structure

## X12 864 Text Message at the element level

The X12 864 reference contains 16 segment entries and 52 data elements; 35 are marked mandatory in this reference. Use the version and partner guide agreed for your account to confirm required fields.

Segments

16

Data elements

52

Mandatory elements

35

**Segments with elements marked mandatory in this reference**

| Segment | Elements | Mandatory |
| --- | --- | --- |
| BMG | 3 | 1 |
| N1 | 4 | 1 |
| MIT | 1 | 1 |
| N3 | 2 | 1 |
| REF | 2 | 1 |
| PER | 4 | 1 |
| MSG | 1 | 1 |

Key identifiers in 864

- Transaction Set Purpose Code
- Entity Identifier Code
- Reference Identification
- Address Information
- Reference Identification Qualifier
- Contact Function Code
- Free-Form Message Text

## Find your trading partner for X12 864

15 partners, 25 channels. Choose a channel to inspect its listed document reference and implementation context.

- [7-Eleven](https://www.stacksync.com/edi/7-eleven)

  [7-Eleven (Legacy ISA ID: 007347602SLND)](https://www.stacksync.com/edi/7-eleven/7-eleven-legacy-isa-id-007347602slnd/x12-864-text-message)
- [7-Eleven (SEDC: Seven Eleven Distribution Company)](https://www.stacksync.com/edi/7-eleven-sedc-seven-eleven-distribution-company)

  [7-Eleven (SEDC: Seven Eleven Distribution Company)](https://www.stacksync.com/edi/7-eleven-sedc-seven-eleven-distribution-company/7-eleven-sedc-seven-eleven-distribution-company/x12-864-text-message)
- [Ace Hardware](https://www.stacksync.com/edi/ace-hardware)

  [Ace Hardware](https://www.stacksync.com/edi/ace-hardware/ace-hardware/x12-864-text-message)
- [Boot Barn Holdings](https://www.stacksync.com/edi/boot-barn)

  [Boot Barn (via ecUtopia)](https://www.stacksync.com/edi/boot-barn/boot-barn-via-ecutopia/x12-864-text-message)
- [Dillard's Department Stores, Inc.](https://www.stacksync.com/edi/dillards-department-stores-inc)

  [Dillards Department Stores(Inovis VAN)](https://www.stacksync.com/edi/dillards-department-stores-inc/dillards-department-stores-inovis-van/x12-864-text-message) [Dillards Department Stores(TGMS Customers)](https://www.stacksync.com/edi/dillards-department-stores-inc/dillards-department-stores-tgms-customers/x12-864-text-message) [Dillards Department Stores via InterTrade](https://www.stacksync.com/edi/dillards-department-stores-inc/dillards-department-stores-via-intertrade/x12-864-text-message)
- [Do It Best Hardware](https://www.stacksync.com/edi/do-it-best-hardware)

  [Do It Best Hardware](https://www.stacksync.com/edi/do-it-best-hardware/do-it-best-hardware/x12-864-text-message)
- [Family Dollar](https://www.stacksync.com/edi/family-dollar)

  [Family Dollar](https://www.stacksync.com/edi/family-dollar/family-dollar/x12-864-text-message)
- [Loblaw Companies Limited](https://www.stacksync.com/edi/loblaw-companies-limited)

  [Loblaws - LCLPRODEDI](https://www.stacksync.com/edi/loblaw-companies-limited/loblaws-lclprodedi/x12-864-text-message) [Loblaw Companies Limited](https://www.stacksync.com/edi/loblaw-companies-limited/loblaw-companies-limited/x12-864-text-message)
- [Menards](https://www.stacksync.com/edi/menard)

  [Menards](https://www.stacksync.com/edi/menard/menards/x12-864-text-message)
- [Sheplers](https://www.stacksync.com/edi/sheplers)

  [Sheplers (via ecUtopia)](https://www.stacksync.com/edi/sheplers/sheplers-via-ecutopia/x12-864-text-message)
- [Shoe Carnival](https://www.stacksync.com/edi/shoe-carnival)

  [Shoe Carnival](https://www.stacksync.com/edi/shoe-carnival/shoe-carnival/x12-864-text-message)
- [Target](https://www.stacksync.com/edi/target)

  [Target Direct Vendor Ship](https://www.stacksync.com/edi/target/target-direct-vendor-ship/x12-864-text-message) [Target Global Sourcing](https://www.stacksync.com/edi/target/target-global-sourcing/x12-864-text-message) [Target US Domestic Merchandise (DSD Direct To Store Delivery | Distribution/Fulfillment Centers | Indirect Domestic)](https://www.stacksync.com/edi/target/target-us-domestic-merchandise-dsd-direct-to-store-delivery-distribution-fulfillment-centers-indirect-domestic/x12-864-text-message)
- [The Home Depot](https://www.stacksync.com/edi/the-home-depot)

  [Home Depot (Mincron)](https://www.stacksync.com/edi/the-home-depot/home-depot-mincron/x12-864-text-message) [Home Depot US (RDC/DTS)](https://www.stacksync.com/edi/the-home-depot/home-depot-us-rdc-dts/x12-864-text-message) [Home Depot Pro](https://www.stacksync.com/edi/the-home-depot/home-depot-pro/x12-864-text-message) [The Home Depot - Canada - Merchandise](https://www.stacksync.com/edi/the-home-depot/the-home-depot-canada-merchandise/x12-864-text-message)
- [Wakefern](https://www.stacksync.com/edi/wakefern)

  [Wakefern Warehouse & DSD](https://www.stacksync.com/edi/wakefern/wakefern-warehouse-dsd/x12-864-text-message) [Wakefern Warehouse & DSD (UCS)](https://www.stacksync.com/edi/wakefern/wakefern-warehouse-dsd-ucs/x12-864-text-message)
- [Walmart](https://www.stacksync.com/edi/walmart)

  [Walmart US (Goods for Resale)](https://www.stacksync.com/edi/walmart/walmart-us-goods-for-resale/x12-864-text-message) [Walmart (Goods Not For Resale)](https://www.stacksync.com/edi/walmart/walmart-goods-not-for-resale/x12-864-text-message)

Catalog breakdown

## Where X12 864 Text Message appears in this catalog

The largest groups of classified 864 catalog entries are in building & hardware, grocery & food and retail.

### By industry

- building & hardware 7 channels
- grocery & food 6 channels
- retail 6 channels
- apparel & footwear 6 channels

### By network

- ecUtopia 2 channels
- InterTrade 1 channel

Partner entries with the most listed channels

- [The Home Depot](https://www.stacksync.com/edi/the-home-depot)
- [Dillard's Department Stores, Inc.](https://www.stacksync.com/edi/dillards-department-stores-inc)
- [Target](https://www.stacksync.com/edi/target)
- [Loblaw Companies Limited](https://www.stacksync.com/edi/loblaw-companies-limited)
- [Wakefern](https://www.stacksync.com/edi/wakefern)
- [Walmart](https://www.stacksync.com/edi/walmart)
- [7-Eleven](https://www.stacksync.com/edi/7-eleven)
- [7-Eleven (SEDC: Seven Eleven Distribution Company)](https://www.stacksync.com/edi/7-eleven-sedc-seven-eleven-distribution-company)

FAQ

## EDI 864 questions

### What is an EDI 864?

EDI 864 is the X12 Text Message transaction set. Trading partners use it when a trading partner sends information intended for a recipient. It carries the data for the business message, and your system matches it on message reference, subject and related business document.

### Who sends an EDI 864 and who receives it?

Either party can send an 864, but in practice the retailer, buyer, or 3PL usually sends it to the supplier's EDI or accounting team. Your trading partner agreement confirms the direction and version for your account.

### When is an EDI 864 sent?

A buyer's system rejects a supplier document, for example an invoice that fails validation rules, and issues an 864 explaining the errors and requesting a corrected retransmission. Your partner guide sets any deadline or schedule for the document.

### What are the key segments in an EDI 864?

Across 25 partner document references listed here, the business segments that appear most often include BMG (Beginning Segment For Text Message), MIT (Message Identification), MSG (Message Text), N1 (Party Identification), DTM (Date/Time Reference). Each partner guide sets which segments and elements your account must send.

### What is the difference between EDI 864 and EDI 850?

The 864 carries the business message and is used when a trading partner sends information intended for a recipient. The 850 carries the purchase order or sales order and is used when a buyer places an order.

### What should I map for X12 864?

Start with message reference, subject and related business document and the target business message. Define duplicate detection, allowed updates and response correlation before mapping individual fields. Use the partner guide to check required fields and their formats.

### How should I test 864 error handling?

Preserve line breaks and readable content in the receiving work queue. Test an urgent message linked to an order and assign a human owner instead of silently filing it. Also test a lost response after destination processing so that a retry cannot create an unintended duplicate or repeated adjustment.

### Which partners list X12 864?

The directory on this page links 15 partner entries that list this message. Choose your partner and channel, then confirm which messages and versions your account requires.

## Connect EDI to your business systems

See how Stacksync can fit your enterprise EDI workflow. Bring one partner guide and a sample exchange to plan the system mapping, exception handling and production rollout.

[Book an EDI demo](https://www.stacksync.com/book-a-demo) [Explore the EDI platform](https://www.stacksync.com/edi)
