X12 850 Purchase Order: SDC4 Mapping Guide

Document Type: Technical Mapping Guide (Open Source)
Audience: EDI developers, data architects, integration specialists
Status: Draft
Version: 1.0
Date: 2025-11-03
Authors: Timothy W. Cook (Founder, Axius SDC, Inc.) w/Claude (Anthropic AI Assistant)
Organization: Semantic Data Charter (open source community)
License: Creative Commons Attribution 4.0 International (CC BY 4.0)

About This Document: This describes the open SDC4 specification maintained by the Semantic Data Charter. SDCStudio by Axius SDC, Inc. is one commercial implementation of this specification. See ABOUT_SDC4_AND_SDCSTUDIO.md for the distinction between open specifications and commercial tools.


Executive Summary

This document provides a complete segment-by-segment mapping of the X12 850 Purchase Order transaction set to SDC4 Clusters and XdTypes.

Purpose: Show EDI practitioners exactly how familiar X12 segments translate to SDC4's structure-semantics separation model.

Key Insight: Where X12 uses ~50 different segment types for a purchase order, SDC4 uses ~15 reusable component types with semantic variation achieved through ontology references.

Result: Build once, reference everywhere. Implementation guide chaos eliminated.


Table of Contents

  1. 850 Transaction Overview
  2. Overall SDC4 Structure
  3. Transaction Header Mapping
  4. Party Identification Mapping
  5. Purchase Order Line Items
  6. Summary and Control
  7. Complete Example
  8. Component Reuse Benefits
  9. Comparison: X12 vs SDC4
  10. Next Steps

850 Transaction Overview

What is an 850 Transaction?

The X12 850 Purchase Order is one of the most widely used EDI transaction sets. It enables a buyer to send a purchase order to a supplier electronically.

Business Use Cases:
- Retail: Store replenishment orders
- Manufacturing: Component procurement
- Healthcare: Medical supply orders
- Government: Procurement contracts

Standard 850 Structure

Envelope (Transaction control):

ST*850*0001~           Transaction Set Header
...payload segments...
SE*25*0001~            Transaction Set Trailer

Header (Order-level information):

BEG*00*NE*PO123456**20251103~     Beginning Segment
REF*DP*42~                         Reference IDs
DTM*010*20251115~                  Dates

N1 Loops (Party identification - repeating):

N1*BY*ACME CORP*92*1234567~       Buyer
N1*ST*WAREHOUSE A*92*9876543~     Ship-To
N3*123 MAIN ST~                    Address
N4*LOS ANGELES*CA*90001*US~        City/State/Zip

PO1 Loop (Line items - repeating):

PO1*1*100*EA*12.50*PE*BP*0001234567890~   Item line
PID*F****WIDGET BLUE 12-PACK~              Item description

Summary:

CTT*5~                             Transaction Totals

Segment Count

Typical 850 with 5 line items: 20-30 segments

X12 Segment Types Used: BEG, REF, DTM, N1, N2, N3, N4, PO1, PID, MEA, CTT, SE, etc.

SDC4 Approach: Map all to Cluster hierarchy with reusable components.


Overall SDC4 Structure

High-Level Cluster Hierarchy

X12 Flat Structure:

ST...BEG...REF...DTM...N1...N3...N4...PO1...PID...SE
(Sequential segments, grouping implicit)

SDC4 Hierarchical Structure:

<sdc4:dm-[CUID2]>                    <!-- DataModel (PO Document) -->
  <dm-label>Purchase Order 850</dm-label>

  <sdc4:ms-[CUID2]>                  <!-- Header Cluster -->
    <label>PO Header</label>
    <sdc4:ms-[CUID2]>                <!-- PO Number -->
    <sdc4:ms-[CUID2]>                <!-- PO Date -->
    ...
  </sdc4:ms-[CUID2]>

  <sdc4:ms-[CUID2]>                  <!-- Parties Cluster -->
    <label>Trading Partners</label>
    <sdc4:ms-[CUID2]>                <!-- Buyer -->
    <sdc4:ms-[CUID2]>                <!-- Ship-To -->
    ...
  </sdc4:ms-[CUID2]>

  <sdc4:ms-[CUID2]>                  <!-- Line Items Cluster -->
    <label>Order Lines</label>
    <sdc4:ms-[CUID2]>                <!-- Line 1 -->
    <sdc4:ms-[CUID2]>                <!-- Line 2 -->
    ...
  </sdc4:ms-[CUID2]>
</sdc4:dm-[CUID2]>

Key Difference: SDC4 makes hierarchy explicit. X12 uses implicit loops and positional logic.


Transaction Header Mapping

X12 Header Segments

BEG Segment (Beginning Segment for Purchase Order):

BEG*00*NE*PO123456**20251103~

Elements:
- 00 = Transaction Set Purpose Code (Original)
- NE = Purchase Order Type Code (New Order)
- PO123456 = Purchase Order Number
- (empty) = Release Number
- 20251103 = Purchase Order Date

REF Segment (Reference Identification - multiple allowed):

REF*DP*42~
REF*IA*VENDOR123~

DTM Segment (Date/Time Reference - multiple allowed):

DTM*010*20251115~
DTM*037*20251120~

SDC4 Header Cluster

Instance:

<!-- Purchase Order Header Cluster -->
<sdc4:ms-ab1k2m5p78901 xmlns:sdc4="https://semanticdatacharter.com/ns/sdc4/">
  <label>Purchase Order Header</label>

  <!-- PO Number -->
  <sdc4:ms-bc2l3n6q89012>
    <label>Purchase Order Number</label>
    <xdstring-value>PO123456</xdstring-value>
  </sdc4:ms-bc2l3n6q89012>

  <!-- PO Date -->
  <sdc4:ms-cd3m4o7r90123>
    <label>Purchase Order Date</label>
    <xdtemporal-value>2025-11-03</xdtemporal-value>
  </sdc4:ms-cd3m4o7r90123>

  <!-- PO Type -->
  <sdc4:ms-de4n5p8s01234>
    <label>Order Type</label>
    <xdstring-value>NE</xdstring-value><!-- New Order -->
  </sdc4:ms-de4n5p8s01234>

  <!-- Transaction Purpose -->
  <sdc4:ms-ef5o6q9t12345>
    <label>Transaction Purpose</label>
    <xdstring-value>00</xdstring-value><!-- Original -->
  </sdc4:ms-ef5o6q9t12345>

  <!-- Reference IDs Cluster -->
  <sdc4:ms-fg6p7r0u23456>
    <label>Reference Identifiers</label>

    <!-- Department Number (Walmart interpretation) -->
    <sdc4:ms-gh7q8s1v34567>
      <label>Department Number</label>
      <xdstring-value>42</xdstring-value>
    </sdc4:ms-gh7q8s1v34567>

    <!-- Vendor ID -->
    <sdc4:ms-hi8r9t2w45678>
      <label>Vendor Identifier</label>
      <xdstring-value>VENDOR123</xdstring-value>
    </sdc4:ms-hi8r9t2w45678>
  </sdc4:ms-fg6p7r0u23456>

  <!-- Dates Cluster -->
  <sdc4:ms-ij9s0u3x56789>
    <label>Order Dates</label>

    <!-- Requested Ship Date -->
    <sdc4:ms-jk0t1v4y67890>
      <label>Requested Ship Date</label>
      <xdtemporal-value>2025-11-15</xdtemporal-value>
    </sdc4:ms-jk0t1v4y67890>

    <!-- Ship Not Later Than -->
    <sdc4:ms-kl1u2w5z78901>
      <label>Ship Not Later Than</label>
      <xdtemporal-value>2025-11-20</xdtemporal-value>
    </sdc4:ms-kl1u2w5z78901>
  </sdc4:ms-ij9s0u3x56789>
</sdc4:ms-ab1k2m5p78901>

Schema Annotations (Walmart-Specific)

For Department Number Component:

<xsd:complexType name="mc-gh7q8s1v34567">
  <xsd:annotation>
    <xsd:appinfo>
      <rdf:Description rdf:about="sdc4:mc-gh7q8s1v34567">
        <rdfs:label>Department Number</rdfs:label>
        <!-- Walmart's ontology reference -->
        <rdfs:isDefinedBy rdf:resource="http://walmart.com/edi/DepartmentNumber"/>
        <!-- Also link to X12 qualifier -->
        <rdfs:isDefinedBy rdf:resource="http://x12.org/codes/ref-qualifier/DP"/>
      </rdf:Description>
    </xsd:appinfo>
  </xsd:annotation>
  <xsd:complexContent>
    <xsd:restriction base="sdc4:XdStringType">
      <xsd:sequence>
        <xsd:element name="label" type="xsd:string" fixed="Department Number"/>
        <xsd:element name="xdstring-value" type="xsd:string"/>
      </xsd:sequence>
    </xsd:restriction>
  </xsd:complexContent>
</xsd:complexType>

Key Point: The same component structure (ms-gh7q8s1v34567) can be used in Target's POs with a different rdfs:isDefinedBy pointing to Target's ontology. Structure is reused, semantics vary.


Party Identification Mapping (N1 Loops)

X12 N1 Loop Structure

Repeating Loop (Can appear multiple times with different qualifiers):

N1*BY*ACME CORPORATION*92*1234567890~
N3*100 CORPORATE DRIVE~
N4*NEW YORK*NY*10001*US~

N1*ST*ACME WAREHOUSE WEST*92*9876543210~
N3*500 DISTRIBUTION WAY~
N4*LOS ANGELES*CA*90001*US~

Segments:
- N1: Name/Entity Identification (qualifier determines role: BY=Buyer, ST=Ship To, etc.)
- N3: Address Information (Street)
- N4: Geographic Location (City, State, Zip, Country)

SDC4 Parties Cluster

Instance:

<!-- Trading Partners Cluster -->
<sdc4:ms-lm2v3x6a89012 xmlns:sdc4="https://semanticdatacharter.com/ns/sdc4/">
  <label>Trading Partners</label>

  <!-- Buyer Party -->
  <sdc4:ms-mn3w4y7b90123>
    <label>Buying Party</label>

    <!-- Organization Name -->
    <sdc4:ms-no4x5z8c01234>
      <label>Organization Name</label>
      <xdstring-value>ACME CORPORATION</xdstring-value>
    </sdc4:ms-no4x5z8c01234>

    <!-- Organization ID -->
    <sdc4:ms-op5y6a9d12345>
      <label>Organization Identifier</label>
      <xdstring-value>1234567890</xdstring-value>
    </sdc4:ms-op5y6a9d12345>

    <!-- Address Cluster (REUSABLE PATTERN) -->
    <sdc4:ms-pq6z7b0e23456>
      <label>Address</label>

      <sdc4:ms-qr7a8c1f34567>
        <label>Street Address</label>
        <xdstring-value>100 CORPORATE DRIVE</xdstring-value>
      </sdc4:ms-qr7a8c1f34567>

      <sdc4:ms-rs8b9d2g45678>
        <label>City</label>
        <xdstring-value>NEW YORK</xdstring-value>
      </sdc4:ms-rs8b9d2g45678>

      <sdc4:ms-st9c0e3h56789>
        <label>State</label>
        <xdstring-value>NY</xdstring-value>
      </sdc4:ms-st9c0e3h56789>

      <sdc4:ms-tu0d1f4i67890>
        <label>Postal Code</label>
        <xdstring-value>10001</xdstring-value>
      </sdc4:ms-tu0d1f4i67890>

      <sdc4:ms-uv1e2g5j78901>
        <label>Country</label>
        <xdstring-value>US</xdstring-value>
      </sdc4:ms-uv1e2g5j78901>
    </sdc4:ms-pq6z7b0e23456>
  </sdc4:ms-mn3w4y7b90123>

  <!-- Ship-To Party -->
  <sdc4:ms-vw2f3h6k89012>
    <label>Ship To Location</label>

    <sdc4:ms-no4x5z8c01234><!-- REUSED Organization Name component -->
      <label>Location Name</label>
      <xdstring-value>ACME WAREHOUSE WEST</xdstring-value>
    </sdc4:ms-no4x5z8c01234>

    <sdc4:ms-op5y6a9d12345><!-- REUSED Organization ID component -->
      <label>Location Identifier</label>
      <xdstring-value>9876543210</xdstring-value>
    </sdc4:ms-op5y6a9d12345>

    <!-- Address Cluster (SAME STRUCTURE, different data) -->
    <sdc4:ms-pq6z7b0e23456>
      <label>Address</label>

      <sdc4:ms-qr7a8c1f34567>
        <label>Street Address</label>
        <xdstring-value>500 DISTRIBUTION WAY</xdstring-value>
      </sdc4:ms-qr7a8c1f34567>

      <sdc4:ms-rs8b9d2g45678>
        <label>City</label>
        <xdstring-value>LOS ANGELES</xdstring-value>
      </sdc4:ms-rs8b9d2g45678>

      <sdc4:ms-st9c0e3h56789>
        <label>State</label>
        <xdstring-value>CA</xdstring-value>
      </sdc4:ms-st9c0e3h56789>

      <sdc4:ms-tu0d1f4i67890>
        <label>Postal Code</label>
        <xdstring-value>90001</xdstring-value>
      </sdc4:ms-tu0d1f4i67890>

      <sdc4:ms-uv1e2g5j78901>
        <label>Country</label>
        <xdstring-value>US</xdstring-value>
      </sdc4:ms-uv1e2g5j78901>
    </sdc4:ms-pq6z7b0e23456>
  </sdc4:ms-vw2f3h6k89012>
</sdc4:ms-lm2v3x6a89012>

Component Reuse Highlight

Notice:
- Address Cluster (ms-pq6z7b0e23456) used for BOTH Buyer and Ship-To
- Organization Name (ms-no4x5z8c01234) reused
- City (ms-rs8b9d2g45678), State (ms-st9c0e3h56789), etc. all reused

In X12: Each N1 loop is structurally identical but semantically distinct via the qualifier (BY vs. ST).

In SDC4: The Cluster label and ontology references provide semantic distinction while structural components are reused.

Schema Annotations for Party Types

Buyer Party (Walmart's interpretation):

<xsd:complexType name="mc-mn3w4y7b90123">
  <xsd:annotation>
    <xsd:appinfo>
      <rdf:Description rdf:about="sdc4:mc-mn3w4y7b90123">
        <rdfs:label>Buying Party</rdfs:label>
        <rdfs:isDefinedBy rdf:resource="http://walmart.com/edi/BuyingOrganization"/>
        <rdfs:isDefinedBy rdf:resource="http://x12.org/codes/n1-qualifier/BY"/>
        <rdfs:isDefinedBy rdf:resource="http://schema.org/buyer"/>
      </rdf:Description>
    </xsd:appinfo>
  </xsd:annotation>
  ...
</xsd:complexType>

Ship-To Location (Walmart's interpretation):

<xsd:complexType name="mc-vw2f3h6k89012">
  <xsd:annotation>
    <xsd:appinfo>
      <rdf:Description rdf:about="sdc4:mc-vw2f3h6k89012">
        <rdfs:label>Ship To Location</rdfs:label>
        <rdfs:isDefinedBy rdf:resource="http://walmart.com/edi/ShipToWarehouse"/>
        <rdfs:isDefinedBy rdf:resource="http://x12.org/codes/n1-qualifier/ST"/>
        <rdfs:isDefinedBy rdf:resource="http://schema.org/Place"/>
      </rdf:Description>
    </xsd:appinfo>
  </xsd:annotation>
  ...
</xsd:complexType>

Target's Implementation: Would use the SAME Cluster structures but reference http://target.com/edi/StoreNumber in rdfs:isDefinedBy for Ship-To.


Purchase Order Line Items (PO1 Loop)

X12 PO1 Loop Structure

Repeating Loop (One per line item):

PO1*1*100*EA*12.50*PE*BP*0001234567890~
PID*F****WIDGET BLUE 12-PACK~

Segments:
- PO1: Baseline Item Data (line number, quantity, unit price, product ID)
- PID: Product/Item Description (free-form text description)

PO1 Elements:
- 1 = Assigned Line Number
- 100 = Quantity Ordered
- EA = Unit of Measure (Each)
- 12.50 = Unit Price
- PE = Price Basis (Price per Each)
- BP = Product ID Qualifier (Buyer's Part Number)
- 0001234567890 = Product ID Value

SDC4 Line Item Cluster

Instance (Single Line Item):

<!-- Order Line Item -->
<sdc4:ms-wx3g4i7l90123 xmlns:sdc4="https://semanticdatacharter.com/ns/sdc4/">
  <label>Order Line</label>

  <!-- Line Number -->
  <sdc4:ms-xy4h5j8m01234>
    <label>Line Number</label>
    <xdcount-value>1</xdcount-value>
  </sdc4:ms-xy4h5j8m01234>

  <!-- Quantity Ordered -->
  <sdc4:ms-yz5i6k9n12345>
    <label>Quantity Ordered</label>
    <magnitude>100</magnitude>
    <units>EA</units><!-- Each -->
  </sdc4:ms-yz5i6k9n12345>

  <!-- Unit Price -->
  <sdc4:ms-za6j7l0o23456>
    <label>Unit Price</label>
    <magnitude>12.50</magnitude>
    <units>USD</units><!-- Assumed currency -->
  </sdc4:ms-za6j7l0o23456>

  <!-- Product Identifier -->
  <sdc4:ms-ab7k8m1p34567>
    <label>Product Identifier</label>
    <xdstring-value>0001234567890</xdstring-value>
  </sdc4:ms-ab7k8m1p34567>

  <!-- Product Description -->
  <sdc4:ms-bc8l9n2q45678>
    <label>Product Description</label>
    <xdstring-value>WIDGET BLUE 12-PACK</xdstring-value>
  </sdc4:ms-bc8l9n2q45678>

  <!-- Extended Amount (calculated) -->
  <sdc4:ms-cd9m0o3r56789>
    <label>Extended Amount</label>
    <magnitude>1250.00</magnitude><!-- 100 × 12.50 -->
    <units>USD</units>
  </sdc4:ms-cd9m0o3r56789>
</sdc4:ms-wx3g4i7l90123>

Schema Annotations (Product ID)

Walmart's Implementation:

<xsd:complexType name="mc-ab7k8m1p34567">
  <xsd:annotation>
    <xsd:appinfo>
      <rdf:Description rdf:about="sdc4:mc-ab7k8m1p34567">
        <rdfs:label>Product Identifier</rdfs:label>
        <!-- Walmart's buyer part number ontology -->
        <rdfs:isDefinedBy rdf:resource="http://walmart.com/edi/BuyerPartNumber"/>
        <!-- X12 qualifier -->
        <rdfs:isDefinedBy rdf:resource="http://x12.org/codes/product-qualifier/BP"/>
        <!-- Could also link to GS1 if GTIN is known -->
      </rdf:Description>
    </xsd:appinfo>
  </xsd:annotation>
  ...
</xsd:complexType>

Target's Implementation (uses GTIN instead):

<xsd:complexType name="mc-ab7k8m1p34567">
  <xsd:annotation>
    <xsd:appinfo>
      <rdf:Description rdf:about="sdc4:mc-ab7k8m1p34567">
        <rdfs:label>Product Identifier</rdfs:label>
        <!-- Target requires GTIN-14 -->
        <rdfs:isDefinedBy rdf:resource="http://target.com/edi/GTIN14"/>
        <rdfs:isDefinedBy rdf:resource="http://x12.org/codes/product-qualifier/UK"/>
        <rdfs:isDefinedBy rdf:resource="http://gs1.org/voc/gtin"/>
      </rdf:Description>
    </xsd:appinfo>
  </xsd:annotation>
  ...
</xsd:complexType>

Key Insight: Same component structure (mc-ab7k8m1p34567), different semantic interpretations via ontology URIs.

Line Items Collection

Multiple Line Items:

<!-- Order Lines Collection Cluster -->
<sdc4:ms-de0n1p4s67890 xmlns:sdc4="https://semanticdatacharter.com/ns/sdc4/">
  <label>Order Lines</label>

  <!-- Line 1 -->
  <sdc4:ms-wx3g4i7l90123>
    <label>Order Line</label>
    <!-- ... line 1 details ... -->
  </sdc4:ms-wx3g4i7l90123>

  <!-- Line 2 -->
  <sdc4:ms-wx3g4i7l90123><!-- SAME COMPONENT TYPE! -->
    <label>Order Line</label>
    <!-- ... line 2 details (different data) ... -->
  </sdc4:ms-wx3g4i7l90123>

  <!-- Line 3 -->
  <sdc4:ms-wx3g4i7l90123><!-- SAME COMPONENT TYPE! -->
    <label>Order Line</label>
    <!-- ... line 3 details ... -->
  </sdc4:ms-wx3g4i7l90123>
</sdc4:ms-de0n1p4s67890>

Component Reuse: Order Line Cluster (ms-wx3g4i7l90123) defined once, instantiated multiple times.


Summary and Control

X12 Summary Segments

CTT Segment (Transaction Totals):

CTT*5~

Elements:
- 5 = Number of line items

SE Segment (Transaction Set Trailer):

SE*25*0001~

Elements:
- 25 = Number of included segments
- 0001 = Transaction Set Control Number (matches ST)

SDC4 Summary Cluster

Instance:

<!-- Order Summary Cluster -->
<sdc4:ms-ef1o2q5t78901 xmlns:sdc4="https://semanticdatacharter.com/ns/sdc4/">
  <label>Order Summary</label>

  <!-- Total Line Items -->
  <sdc4:ms-fg2p3r6u89012>
    <label>Total Line Items</label>
    <xdcount-value>5</xdcount-value>
  </sdc4:ms-fg2p3r6u89012>

  <!-- Total Order Value (calculated) -->
  <sdc4:ms-gh3q4s7v90123>
    <label>Total Order Amount</label>
    <magnitude>5875.50</magnitude>
    <units>USD</units>
  </sdc4:ms-gh3q4s7v90123>

  <!-- Total Quantity (calculated) -->
  <sdc4:ms-hi4r5t8w01234>
    <label>Total Quantity</label>
    <xdcount-value>450</xdcount-value>
  </sdc4:ms-hi4r5t8w01234>
</sdc4:ms-ef1o2q5t78901>

Note: In SDC4, the "control" aspects (SE segment count, transaction ID) are metadata in the DataModel, not part of the business data Clusters.


Complete Example: Walmart Purchase Order

X12 850 (Complete)

ST*850*0001~
BEG*00*NE*PO123456**20251103~
REF*DP*42~
REF*IA*VENDOR123~
DTM*010*20251115~
DTM*037*20251120~
N1*BY*ACME CORPORATION*92*1234567890~
N3*100 CORPORATE DRIVE~
N4*NEW YORK*NY*10001*US~
N1*ST*ACME WAREHOUSE WEST*92*9876543210~
N3*500 DISTRIBUTION WAY~
N4*LOS ANGELES*CA*90001*US~
PO1*1*100*EA*12.50*PE*BP*0001234567890~
PID*F****WIDGET BLUE 12-PACK~
PO1*2*50*EA*24.99*PE*BP*0001234567891~
PID*F****GADGET RED DELUXE~
CTT*2~
SE*17*0001~

SDC4 Purchase Order (Complete Instance)

<?xml version="1.0" encoding="UTF-8"?>
<sdc4:dm-po8q9r2s56789 xmlns:sdc4="https://semanticdatacharter.com/ns/sdc4/"
                       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                       xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                       xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">

  <dm-label>Purchase Order 850 - Walmart</dm-label>
  <dm-version>1.0</dm-version>
  <dm-created>2025-11-03T10:30:00Z</dm-created>

  <!-- HEADER CLUSTER -->
  <sdc4:ms-ab1k2m5p78901>
    <label>Purchase Order Header</label>

    <sdc4:ms-bc2l3n6q89012>
      <label>Purchase Order Number</label>
      <xdstring-value>PO123456</xdstring-value>
    </sdc4:ms-bc2l3n6q89012>

    <sdc4:ms-cd3m4o7r90123>
      <label>Purchase Order Date</label>
      <xdtemporal-value>2025-11-03</xdtemporal-value>
    </sdc4:ms-cd3m4o7r90123>

    <sdc4:ms-de4n5p8s01234>
      <label>Order Type</label>
      <xdstring-value>NE</xdstring-value>
    </sdc4:ms-de4n5p8s01234>

    <!-- Reference IDs -->
    <sdc4:ms-fg6p7r0u23456>
      <label>Reference Identifiers</label>

      <sdc4:ms-gh7q8s1v34567>
        <label>Department Number</label>
        <xdstring-value>42</xdstring-value>
      </sdc4:ms-gh7q8s1v34567>

      <sdc4:ms-hi8r9t2w45678>
        <label>Vendor Identifier</label>
        <xdstring-value>VENDOR123</xdstring-value>
      </sdc4:ms-hi8r9t2w45678>
    </sdc4:ms-fg6p7r0u23456>

    <!-- Dates -->
    <sdc4:ms-ij9s0u3x56789>
      <label>Order Dates</label>

      <sdc4:ms-jk0t1v4y67890>
        <label>Requested Ship Date</label>
        <xdtemporal-value>2025-11-15</xdtemporal-value>
      </sdc4:ms-jk0t1v4y67890>

      <sdc4:ms-kl1u2w5z78901>
        <label>Ship Not Later Than</label>
        <xdtemporal-value>2025-11-20</xdtemporal-value>
      </sdc4:ms-kl1u2w5z78901>
    </sdc4:ms-ij9s0u3x56789>
  </sdc4:ms-ab1k2m5p78901>

  <!-- PARTIES CLUSTER -->
  <sdc4:ms-lm2v3x6a89012>
    <label>Trading Partners</label>

    <!-- Buyer -->
    <sdc4:ms-mn3w4y7b90123>
      <label>Buying Party</label>

      <sdc4:ms-no4x5z8c01234>
        <label>Organization Name</label>
        <xdstring-value>ACME CORPORATION</xdstring-value>
      </sdc4:ms-no4x5z8c01234>

      <sdc4:ms-op5y6a9d12345>
        <label>Organization Identifier</label>
        <xdstring-value>1234567890</xdstring-value>
      </sdc4:ms-op5y6a9d12345>

      <sdc4:ms-pq6z7b0e23456>
        <label>Address</label>
        <sdc4:ms-qr7a8c1f34567>
          <label>Street Address</label>
          <xdstring-value>100 CORPORATE DRIVE</xdstring-value>
        </sdc4:ms-qr7a8c1f34567>
        <sdc4:ms-rs8b9d2g45678>
          <label>City</label>
          <xdstring-value>NEW YORK</xdstring-value>
        </sdc4:ms-rs8b9d2g45678>
        <sdc4:ms-st9c0e3h56789>
          <label>State</label>
          <xdstring-value>NY</xdstring-value>
        </sdc4:ms-st9c0e3h56789>
        <sdc4:ms-tu0d1f4i67890>
          <label>Postal Code</label>
          <xdstring-value>10001</xdstring-value>
        </sdc4:ms-tu0d1f4i67890>
        <sdc4:ms-uv1e2g5j78901>
          <label>Country</label>
          <xdstring-value>US</xdstring-value>
        </sdc4:ms-uv1e2g5j78901>
      </sdc4:ms-pq6z7b0e23456>
    </sdc4:ms-mn3w4y7b90123>

    <!-- Ship-To -->
    <sdc4:ms-vw2f3h6k89012>
      <label>Ship To Location</label>

      <sdc4:ms-no4x5z8c01234>
        <label>Location Name</label>
        <xdstring-value>ACME WAREHOUSE WEST</xdstring-value>
      </sdc4:ms-no4x5z8c01234>

      <sdc4:ms-op5y6a9d12345>
        <label>Location Identifier</label>
        <xdstring-value>9876543210</xdstring-value>
      </sdc4:ms-op5y6a9d12345>

      <sdc4:ms-pq6z7b0e23456>
        <label>Address</label>
        <sdc4:ms-qr7a8c1f34567>
          <label>Street Address</label>
          <xdstring-value>500 DISTRIBUTION WAY</xdstring-value>
        </sdc4:ms-qr7a8c1f34567>
        <sdc4:ms-rs8b9d2g45678>
          <label>City</label>
          <xdstring-value>LOS ANGELES</xdstring-value>
        </sdc4:ms-rs8b9d2g45678>
        <sdc4:ms-st9c0e3h56789>
          <label>State</label>
          <xdstring-value>CA</xdstring-value>
        </sdc4:ms-st9c0e3h56789>
        <sdc4:ms-tu0d1f4i67890>
          <label>Postal Code</label>
          <xdstring-value>90001</xdstring-value>
        </sdc4:ms-tu0d1f4i67890>
        <sdc4:ms-uv1e2g5j78901>
          <label>Country</label>
          <xdstring-value>US</xdstring-value>
        </sdc4:ms-uv1e2g5j78901>
      </sdc4:ms-pq6z7b0e23456>
    </sdc4:ms-vw2f3h6k89012>
  </sdc4:ms-lm2v3x6a89012>

  <!-- LINE ITEMS CLUSTER -->
  <sdc4:ms-de0n1p4s67890>
    <label>Order Lines</label>

    <!-- Line 1 -->
    <sdc4:ms-wx3g4i7l90123>
      <label>Order Line</label>

      <sdc4:ms-xy4h5j8m01234>
        <label>Line Number</label>
        <xdcount-value>1</xdcount-value>
      </sdc4:ms-xy4h5j8m01234>

      <sdc4:ms-yz5i6k9n12345>
        <label>Quantity Ordered</label>
        <magnitude>100</magnitude>
        <units>EA</units>
      </sdc4:ms-yz5i6k9n12345>

      <sdc4:ms-za6j7l0o23456>
        <label>Unit Price</label>
        <magnitude>12.50</magnitude>
        <units>USD</units>
      </sdc4:ms-za6j7l0o23456>

      <sdc4:ms-ab7k8m1p34567>
        <label>Product Identifier</label>
        <xdstring-value>0001234567890</xdstring-value>
      </sdc4:ms-ab7k8m1p34567>

      <sdc4:ms-bc8l9n2q45678>
        <label>Product Description</label>
        <xdstring-value>WIDGET BLUE 12-PACK</xdstring-value>
      </sdc4:ms-bc8l9n2q45678>

      <sdc4:ms-cd9m0o3r56789>
        <label>Extended Amount</label>
        <magnitude>1250.00</magnitude>
        <units>USD</units>
      </sdc4:ms-cd9m0o3r56789>
    </sdc4:ms-wx3g4i7l90123>

    <!-- Line 2 -->
    <sdc4:ms-wx3g4i7l90123>
      <label>Order Line</label>

      <sdc4:ms-xy4h5j8m01234>
        <label>Line Number</label>
        <xdcount-value>2</xdcount-value>
      </sdc4:ms-xy4h5j8m01234>

      <sdc4:ms-yz5i6k9n12345>
        <label>Quantity Ordered</label>
        <magnitude>50</magnitude>
        <units>EA</units>
      </sdc4:ms-yz5i6k9n12345>

      <sdc4:ms-za6j7l0o23456>
        <label>Unit Price</label>
        <magnitude>24.99</magnitude>
        <units>USD</units>
      </sdc4:ms-za6j7l0o23456>

      <sdc4:ms-ab7k8m1p34567>
        <label>Product Identifier</label>
        <xdstring-value>0001234567891</xdstring-value>
      </sdc4:ms-ab7k8m1p34567>

      <sdc4:ms-bc8l9n2q45678>
        <label>Product Description</label>
        <xdstring-value>GADGET RED DELUXE</xdstring-value>
      </sdc4:ms-bc8l9n2q45678>

      <sdc4:ms-cd9m0o3r56789>
        <label>Extended Amount</label>
        <magnitude>1249.50</magnitude>
        <units>USD</units>
      </sdc4:ms-cd9m0o3r56789>
    </sdc4:ms-wx3g4i7l90123>
  </sdc4:ms-de0n1p4s67890>

  <!-- SUMMARY CLUSTER -->
  <sdc4:ms-ef1o2q5t78901>
    <label>Order Summary</label>

    <sdc4:ms-fg2p3r6u89012>
      <label>Total Line Items</label>
      <xdcount-value>2</xdcount-value>
    </sdc4:ms-fg2p3r6u89012>

    <sdc4:ms-gh3q4s7v90123>
      <label>Total Order Amount</label>
      <magnitude>2499.50</magnitude>
      <units>USD</units>
    </sdc4:ms-gh3q4s7v90123>

    <sdc4:ms-hi4r5t8w01234>
      <label>Total Quantity</label>
      <xdcount-value>150</xdcount-value>
    </sdc4:ms-hi4r5t8w01234>
  </sdc4:ms-ef1o2q5t78901>

</sdc4:dm-po8q9r2s56789>

Component Reuse Benefits

Unique Component Types Needed

For This Complete Purchase Order:

Component Type CUID2 Used For Times Reused
PO Header Cluster ms-ab1k2m5p78901 Header section 1
PO Number ms-bc2l3n6q89012 PO identifier 1
Date ms-cd3m4o7r90123 PO date, ship dates 3
String Value ms-de4n5p8s01234 Order type, descriptions 10+
Reference Cluster ms-fg6p7r0u23456 Reference IDs 1
Dates Cluster ms-ij9s0u3x56789 Date grouping 1
Parties Cluster ms-lm2v3x6a89012 Trading partners 1
Party ms-mn3w4y7b90123 Buyer, Ship-To 2
Organization Name ms-no4x5z8c01234 Party names 2
Organization ID ms-op5y6a9d12345 Party IDs 2
Address Cluster ms-pq6z7b0e23456 Addresses 2
Street ms-qr7a8c1f34567 Street addresses 2
City ms-rs8b9d2g45678 Cities 2
State ms-st9c0e3h56789 States 2
Postal Code ms-tu0d1f4i67890 Zip codes 2
Country ms-uv1e2g5j78901 Countries 2
Line Items Cluster ms-de0n1p4s67890 Line collection 1
Line Item ms-wx3g4i7l90123 Individual lines 2
Line Number ms-xy4h5j8m01234 Line numbers 2
Quantity ms-yz5i6k9n12345 Quantities 2
Price ms-za6j7l0o23456 Prices, amounts 4
Product ID ms-ab7k8m1p34567 Product identifiers 2
Summary Cluster ms-ef1o2q5t78901 Summary section 1
Count ms-fg2p3r6u89012 Counts, quantities 3

Total Unique Components Defined: ~25

Total Data Points in Document: ~45

Reuse Ratio: 1.8× (on average, each component type is used twice)

For a Supplier with 10 Trading Partners:
- Same 25 components used across all
- Only semantic annotations (ontology URIs) differ
- No structural duplication


Comparison: X12 vs SDC4

Structural Complexity

Aspect X12 850 SDC4 850
Segment Types 50+ defined (BEG, REF, DTM, N1, N3, N4, PO1, PID, MEA, etc.) ~20 XdTypes + Cluster (universal)
Qualifier Codes 200+ (REF alone has 100+, N1 has 50+) 0 (semantics via ontology URIs)
Loops Implicit (positional rules) Explicit (hierarchical Clusters)
Extensibility Add new segments/qualifiers (breaks compatibility) Add new ontology references (structure unchanged)
Validation Position + code lookup XSD schema validation

Semantic Clarity

Aspect X12 850 SDC4 850
Semantic Definition PDF implementation guides (human-readable) Ontology URIs (machine-readable)
Consistency Low (every partner differs) High (structure enforced, semantics explicit)
Ambiguity High (REF*DP could mean 10 things) None (rdfs:isDefinedBy is explicit)
Evolvability Implementation guide changes break integrations Ontology updates don't affect structure

Interoperability

Aspect X12 850 SDC4 850
Cross-Partner Requires custom mapping per partner Structural reuse, semantic mapping only
Cross-Industry Difficult (different qualifier usage patterns) Natural (same structures, different ontologies)
Cross-Standard Impossible (X12 ≠ EDIFACT ≠ XML) Possible (SDC4 bridges all via ontology refs)
Future-Proof Version migrations required Version coexistence built-in

Next Steps

For EDI Practitioners

You've now seen:
- How familiar X12 segments map to SDC4 Clusters
- How component reuse eliminates duplication
- How ontology URIs replace implementation guides

Next: X12_SDC4_SOLUTION.md - See concrete examples of Walmart vs. Target implementations using the SAME structure with different semantics.

For Architects

You've now seen:
- The hierarchical data model
- Component type definitions
- Schema annotation patterns

Next: X12_TO_WEB3_BRIDGE.md - See how this architecture enables smart contract integration.

For Developers

Implementation Resources:
- SDCStudio documentation: https://axius-sdc.com/docs
- Schema examples: GitHub repository
- Community support: [Link to community forum]


Document Navigation:
← Previous: Implementation Guide Problem | Next: SDC4 Solution →


About This Documentation

This document describes the open SDC4 specification maintained by the Semantic Data Charter community.

Open Source:
- Specification: https://semanticdatacharter.com
- GitHub: https://github.com/SemanticDataCharter
- License: CC BY 4.0

Commercial Implementation:
- SDCStudio: https://axius-sdc.com (by Axius SDC, Inc.)

See ABOUT_SDC4_AND_SDCSTUDIO.md for details.


This document is part of the SDC4 X12 EDI Integration Guide series.
Author: Timothy W. Cook (Founder, Axius SDC, Inc.) w/Claude (Anthropic AI Assistant)
License: Creative Commons Attribution 4.0 International (CC BY 4.0)