Skip to content

Dataset

EDI message history datasets for AI training

An EDI dataset is an archive of the electronic data interchange messages a company exchanged with its trading partners, kept in raw X12 or EDIFACT form. It covers purchase orders, acknowledgments, changes, advance ship notices, invoices, load tenders and status messages, with their functional acknowledgments, the partner-specific maps and the translated application records. SourceX sources these archives to a buyer's spec from established manufacturers, distributors, retail suppliers and EDI service providers. Each dataset is de-identified, with partner identifiers, prices and account numbers masked to the agreed level, and licensed for an agreed permitted use.

Dataset manifest

Sourced to your spec
What it is
Raw trading-partner messages with acknowledgments, partner maps and translated application records
Typical systems
IBM Sterling B2B Integrator, OpenText Trading Grid, SPS Commerce, Cleo Integration Cloud, TrueCommerce, ERP IDoc and flat-file interfaces
Typical history
Varies by partner and archive retention; specify transaction sets, direction, partner count and years
Modality
Delimited message text with parsed segment trees, mapping specifications and linked ERP records
Delivery formats
Raw interchanges as archived plus JSONL parse trees; maps as exported; translated records as JSONL or XML
Preparation
Partner IDs, names, addresses, prices and account numbers masked in place so messages still parse
Licensing
Scoped per trading partner, transaction set and period; rights review covers the holder's partner agreements
Availability
Sourced to your spec; raw files, maps and acknowledgments depend on what the holder archived
Structured recordsIllustrative

What a delivery contains

Fields vary by source system and are fixed per order. A typical delivery includes:

FieldTypeWhat it holds
interchange_idstringPseudonymous key for one interchange as it crossed the wire, from X12 ISA to IEA or EDIFACT UNB to UNZ.
syntaxobjectThe standard and release named in the envelope, the delimiters declared for this interchange and its test or production flag.
directionenumInbound or outbound from the holder's side, with the transport, such as a value-added network, AS2 or SFTP, where logged.
partner_profileobjectTokenized sender and receiver, the partner's role and industry, and the implementation guide the pair trades under.
transaction_typestringThe X12 transaction set or EDIFACT message type, for example 850, 856 and 810 or ORDERS, DESADV and INVOIC.
raw_messagestringThe message as sent or received, masked in place so segment order, qualifiers and repeats are unchanged.
segment_treearrayThe parsed loops and segments with element positions, so each qualifier stays paired with its value.
functional_ackobjectThe 997, 999 or CONTRL that answered the message, with accepted, accepted with errors or rejected and any segment and element error codes.
partner_mapobjectThe map revision that translated the message: field rules, code cross-references, unit conversions and hard-coded defaults.
translated_recordobjectWhat the translator produced for the ERP or read from it, such as an IDoc, flat file or API payload, with any translation error.
conversation_keyobjectThe business references that tie messages into one chain, such as purchase order, shipment, bill of lading and invoice numbers, tokenized consistently.
discrepanciesarrayElement-level differences between this message and earlier ones in its chain, such as quantity, price, unit of measure, pack or date.
business_rejectionobjectContent-level refusals outside the syntax check: an application advice, a portal rejection, a chargeback or a deduction code.
timingobjectSent, received and acknowledged times, and how the message sat against a partner deadline such as ship notice before arrival.
Sample recordIllustrative

Field names from the table above; values are masked placeholders.

Example record

{
  "interchange_id": "ix_9f20c4",
  "syntax": {
    "standard": "X12",
    "element_separator": "*",
    "segment_terminator": "~",
    "usage": "production"
  },
  "direction": "outbound",
  "partner_profile": {
    "sender": "tp_holder",
    "receiver": "tp_retail_031",
    "guide": "ig_retail_031_856_rev_c"
  },
  "transaction_type": "856",
  "raw_message": "ST*856*0001~BSN*00*SHP_5512*20240611*1432*0001~HL*1**S~TD5**2*[SCAC]~REF*BM*BOL_88213~DTM*011*20240611~N1*ST**92*[DC_CODE]~HL*2*1*O~PRF*PO_441907~HL*3*2*P~MAN*GM*[SSCC_0001]~HL*4*3*I~LIN**UP*[UPC_A]~SN1**48*EA~CTT*4~SE*16*0001~",
  "segment_tree": [
    {
      "hl": 1,
      "level": "S",
      "BSN": {
        "purpose": "00",
        "structure": "0001"
      }
    },
    {
      "hl": 2,
      "parent": 1,
      "level": "O",
      "PRF": "PO_441907"
    },
    {
      "hl": 3,
      "parent": 2,
      "level": "P",
      "MAN": {
        "qualifier": "GM",
        "value": "[SSCC_0001]"
      }
    },
    {
      "hl": 4,
      "parent": 3,
      "level": "I",
      "LIN": {
        "UP": "[UPC_A]"
      },
      "SN1": {
        "units_shipped": 48,
        "uom": "EA"
      }
    }
  ],
  "functional_ack": {
    "type": "997",
    "status": "accepted",
    "received": "2024-06-11T14:41:00Z"
  },
  "partner_map": {
    "map_id": "map_856_out_tp031",
    "revision": 7,
    "rule_applied": "case quantity multiplied to eaches"
  },
  "translated_record": {
    "source": "erp_delivery",
    "delivery": "dlv_70155",
    "qty": 1,
    "uom": "CA",
    "units_per_case": 48
  },
  "conversation_key": {
    "po": "PO_441907",
    "shipment": "SHP_5512",
    "bill_of_lading": "BOL_88213",
    "invoice": "INV_20931"
  },
  "discrepancies": [
    {
      "between": [
        "850",
        "856"
      ],
      "element": "quantity",
      "values": [
        "2 CA",
        "48 EA"
      ],
      "finding": "one of two cases shipped"
    },
    {
      "between": [
        "856",
        "810"
      ],
      "element": "quantity",
      "values": [
        "48 EA",
        "2 CA"
      ],
      "finding": "invoiced for a case not shipped"
    }
  ],
  "business_rejection": {
    "on_message": "810",
    "channel": "partner_portal",
    "result": "invoice_held_three_way_match",
    "deduction_code": "ded_shortage"
  },
  "timing": {
    "sent": "2024-06-11T14:38:00Z",
    "carrier_arrival": "2024-06-12T09:15:00Z",
    "asn_before_arrival": true
  }
}

Synthetic record for illustration. Field names, structure and format are agreed per order.

What AI teams use it for

Parse and validate across partner dialects

Messages from many partners teach a model that one transaction set has many accepted shapes, and which each partner rejects.

Write and repair maps

A raw message, the map that translated it and the resulting application record form a worked example for generating or debugging a mapping.

Catch rejections before sending

Outbound messages paired with acknowledgments and later chargebacks label which errors a partner refused and what each cost.

Resolve order-to-cash exceptions

Chains ending in a failed invoice match show an agent which element disagreed, which message introduced it and how it was settled.

Test onboarding of an unseen partner

Holding out whole partners gives an evaluation of whether a system can read a dialect it was not trained on.

Use-case guides: Enterprise and computer-use agents, Finance and accounting agents, Private evaluation sets

What makes this data valuable

Many partner dialects

Value rises with the number of distinct partners and guides, not with message count.

Raw beside translated

The wire format, the map and the application record are kept together for each message.

Acknowledgments attached

Each message carries the functional acknowledgment that answered it, rejections included.

Whole chains

Orders can be followed through acknowledgment, change, ship notice and invoice.

Maps dated

Each message can be paired with the map revision in force when it was translated.

Masking that still parses

Tokens sit where the values were, and control numbers and segment counts still agree.

Record timeline

EDI dataset

This page covers EDI message histories.Illustrative

The standard is only half the format

X12 and EDIFACT are dictionaries. They define envelopes, segments, elements and code lists, then leave most segments optional and most qualifiers open. Large buyers fill the gap with their own implementation guides, each stating which segments it requires, which qualifiers it accepts and what its private codes mean. So the same 856 ship notice differs by partner. One wants shipment, order, pack and item levels in the HL loop with a serial shipping container code for every carton in a MAN segment. Another puts items above packs, and a third adds a pallet level. One identifies items by UPC in the LIN segment and another by its own item number.

A parser that knows the standard is therefore not enough, and a dataset is valuable in proportion to the dialects it spans. A large archive from one retailer teaches one guide. A model that will onboard partners, write maps or check outbound messages needs many partners across industries and releases of the standard, since old and new releases stay in use side by side. EDIFACT has subsets of its own, such as GS1's EANCOM, so ask which one each partner trades in. The guides are the partner's documents, and whether a holder may pass them on is a question for counsel, so expect to learn the dialect from the messages and the holder's maps.

Storage creates its own traps. X12 declares its delimiters in the fixed-width ISA segment, so a file cannot be split on an assumed character. Some archives keep only the translated record and discard the wire format. Masking has to replace values in place, because a removed segment breaks the count in the SE trailer and the file no longer validates.

Messages form conversations

An X12 order chain runs from the 850 purchase order through the 855 acknowledgment, the 860 change and the 856 ship notice to the 810 invoice. EDIFACT runs ORDERS, ORDRSP, DESADV and INVOIC. Each message quotes references from the one before, and linking them turns an archive into conversations. A functional acknowledgment, the 997 or 999 in X12 and CONTRL in EDIFACT, reports only whether the message's structure passed the receiver's translator. Whether the content was acceptable arrives separately, as an 855, an 824 application advice, a portal status or a deduction on a later payment.

The chain records where two companies' systems disagreed, one element at a time. The order says two cases and the supplier's item master counts eaches. The acknowledgment moves the ship date and the buyer's system never applies it. The ship notice does not match what the dock scanned, or the invoice price comes from a different price file than the order. Each leaves a mark: a rejected acknowledgment with an element error code, a ship notice chargeback, or an invoice that fails the three-way match against order and receipt and is short-paid.

The holder sees only its side. A supplier's archive has the orders it received and the notices and invoices it sent, and the buyer's receipt appears only if a receiving advice or chargeback notice came back. Chargebacks often arrive outside EDI, through a portal or a remittance line, so ask whether they were joined. Archives also mix in resends under new control numbers and test interchanges from partner onboarding. Have both flagged, not dropped, since onboarding tests show what a partner's certification catches.

What to check before licensing

  • Ask whether the holder's trading-partner agreements, network or service-provider contracts and customer supplier terms allow the messages to be licensed, and have counsel review which partners must be excluded.
  • Confirm that partner identifiers, names and addresses, prices and bank or account numbers are masked to the agreed level, and read free-text segments on the sample for names and phone numbers.
  • Parse every interchange in the sample using its own declared delimiters, and check that segment counts and control numbers still agree after masking.
  • Count distinct partners, implementation guides, transaction sets and standard releases, and measure how much of the volume the largest partner supplies.
  • Measure the share of messages with their functional acknowledgment and the share of purchase orders that can be followed through to an invoice.
  • Ask whether raw messages were archived or only translated records, and whether map revisions are dated so each message pairs with the map in force.
  • Ask whether test interchanges, duplicates and resends are flagged, and whether chargebacks and deductions received outside EDI were joined to their messages.

Delivery No files move before a signed license. A listing or a request grants no files by itself.

How licensing works through SourceX

  1. 1

    Define

    Send the domain, modality, volume, format, timeline and permitted use you need.

  2. 2

    Source

    SourceX identifies businesses that hold matching data and are open to licensing it.

  3. 3

    Qualify

    Fit, rights and quality are checked, and you review samples before committing.

  4. 4

    License

    Scope, permitted use, exclusivity, price and obligations are agreed in writing.

  5. 5

    Deliver

    Approved data is prepared, de-identified where required and transferred securely.

Questions Acquisition Partners ask

Which transaction sets are usually in scope?

The order-to-cash chain is the usual core: purchase orders, acknowledgments, changes, advance ship notices, invoices and remittance advice, each with its functional acknowledgment. Transportation sets such as load tenders, status messages and freight invoices can be added, and EDIFACT archives hold the equivalent message types. Specify the sets, direction and partner industries you need.

Why does the number of trading partners matter more than message count?

Because each partner is a separate dialect. Messages from one partner follow one implementation guide, so a large volume from a single relationship repeats the same structure. A model meant to handle new partners learns from variety in required segments, qualifiers and code lists. Ask for volume by partner and set.

Are trading partners' implementation guides included?

Usually not. A guide is written by the trading partner, so treat it as the partner's document and ask counsel whether the holder may share it. What the holder does have is its own maps and mapping specifications, which encode the same requirements as translation rules. Ask which maps are included and whether each revision is dated.

How are identifiers and prices masked without breaking the messages?

The usual method is in-place replacement, agreed per dataset. Each value gets a token of a compatible shape, and the same token wherever the value recurs, so chains still link. Segments are not removed, which keeps trailer counts valid. Prices can be scaled by a constant per partner, so extended amounts still foot, or banded if the holder requires it. Parse the masked sample to confirm.

Can messages be linked to the ERP records behind them?

Yes, where the holder archived both sides of the translator. The translated record, such as an IDoc or flat file, carries the application document number, which joins to the sales order, delivery or invoice in the ERP. Some holders use a hosted service and keep only what their ERP received, so ask which layers exist.

Does this include health care claim transactions?

No, not by default. Health care claims and remittance advice also travel as X12, but they carry patient information and belong to separately scoped health datasets, where records are de-identified before delivery. If you need them, state that in your request and confirm the de-identification method and the jurisdiction with counsel.

Evaluating this data for procurement?

Diligence packets are prepared per dataset. Rights, privacy processing and quality differ between datasets.

Request dataset diligence

Tell us what your models need

Send your spec — domain, volume, format, timeline and permitted use — and SourceX will match it against partner data and come back with what can be licensed.

Updated 25 November 2026.

See if your company qualifies