X12 855 Purchase Order Acknowledgment Last updated: 2026-09-29
The 855 is the X12 purchase order acknowledgment. The supplier sends it after receiving an 850 to confirm the order, and to report which lines are accepted, changed, backordered or rejected.
BAK carries the acknowledgment type for the whole order and references the PO number; each PO1 loop can carry ACK segments with line status, quantities and scheduled dates.
At a glance
- Standard
- X12
- Version
004010- Functional group
PR(GS01)- Sent by
- Supplier to buyer
- Responses
- 997
- ediFabric .NET template
TS855inEdiFabric.Templates.X12- OpenEDI definition
- View 855 in the spec library
855 structure
The full X12 855 layout from its OpenEDI definition, the same model ediFabric uses to parse, validate and generate it: 19 loops and 147 segment positions, in file order. Loops are shaded and their segments indented; Max use is how many times a segment or loop may repeat.
| Segment / loop | Name | Usage | Max use |
|---|---|---|---|
ST | Transaction Set Header | Mandatory | 1 |
BAK | Beginning Segment for Purchase Order Acknowledgment | Mandatory | 1 |
CUR | Currency | Optional | 1 |
REF | Reference Identification | Optional | >1 |
PER | Administrative Communications Contact | Optional | 3 |
TAX | Tax Reference | Optional | >1 |
FOB | F.O.B. Related Instructions | Optional | >1 |
CTP | Pricing Information | Optional | >1 |
PAM | Period Amount | Optional | 10 |
CSH | Sales Requirements | Optional | 1 |
| SAC loop | Service, Promotion, Allowance, or Charge Information | Optional | 25 |
SAC | Service, Promotion, Allowance, or Charge Information | Mandatory | 1 |
CUR | Currency | Optional | 1 |
ITD | Terms of Sale/Deferred Terms of Sale | Optional | 5 |
DIS | Discount Detail | Optional | 20 |
INC | Installment Information | Optional | 1 |
DTM | Date/Time Reference | Optional | 10 |
LDT | Lead Time | Optional | 12 |
LIN | Item Identification | Optional | 5 |
SI | Service Characteristic Identification | Optional | >1 |
PID | Product/Item Description | Optional | 200 |
MEA | Measurements | Optional | 40 |
PWK | Paperwork | Optional | 25 |
PKG | Marking, Packaging, Loading | Optional | 25 |
TD1 | Carrier Details (Quantity and Weight) | Optional | 2 |
TD5 | Carrier Details (Routing Sequence/Transit Time) | Optional | 12 |
TD3 | Carrier Details (Equipment) | Optional | 12 |
TD4 | Carrier Details (Special Handling, or Hazardous Materials, or Both) | Optional | 5 |
MAN | Marks and Numbers | Optional | 10 |
TXI | Tax Information | Optional | >1 |
CTB | Restrictions/Conditions | Optional | >1 |
| N9 loop | Reference Identification | Optional | 1000 |
N9 | Reference Identification | Mandatory | 1 |
DTM | Date/Time Reference | Optional | >1 |
MSG | Message Text | Optional | 1000 |
| N1 loop | Name | Optional | 200 |
N1 | Name | Mandatory | 1 |
N2 | Additional Name Information | Optional | 2 |
N3 | Address Information | Optional | 2 |
N4 | Geographic Location | Optional | 1 |
NX2 | Location ID Component | Optional | >1 |
REF | Reference Identification | Optional | 12 |
PER | Administrative Communications Contact | Optional | >1 |
SI | Service Characteristic Identification | Optional | >1 |
FOB | F.O.B. Related Instructions | Optional | 1 |
TD1 | Carrier Details (Quantity and Weight) | Optional | 2 |
TD5 | Carrier Details (Routing Sequence/Transit Time) | Optional | 12 |
TD3 | Carrier Details (Equipment) | Optional | 12 |
TD4 | Carrier Details (Special Handling, or Hazardous Materials, or Both) | Optional | 5 |
PKG | Marking, Packaging, Loading | Optional | 25 |
MSG | Message Text | Optional | >1 |
| ADV loop | Advertising Demographic Information | Optional | >1 |
ADV | Advertising Demographic Information | Mandatory | 1 |
DTM | Date/Time Reference | Optional | >1 |
MTX | Text | Optional | >1 |
| PO1 loop | Baseline Item Data | Optional | 100000 |
PO1 | Baseline Item Data | Mandatory | 1 |
LIN | Item Identification | Optional | >1 |
SI | Service Characteristic Identification | Optional | >1 |
CUR | Currency | Optional | 1 |
PO3 | Additional Item Detail | Optional | 25 |
CTP | Pricing Information | Optional | >1 |
PAM | Period Amount | Optional | 10 |
MEA | Measurements | Optional | 40 |
| PID loop | Product/Item Description | Optional | 1000 |
PID | Product/Item Description | Mandatory | 1 |
MEA | Measurements | Optional | 10 |
PWK | Paperwork | Optional | 25 |
PO4 | Item Physical Details | Optional | >1 |
REF | Reference Identification | Optional | >1 |
PER | Administrative Communications Contact | Optional | 3 |
| SAC loop | Service, Promotion, Allowance, or Charge Information | Optional | 25 |
SAC | Service, Promotion, Allowance, or Charge Information | Mandatory | 1 |
CUR | Currency | Optional | 1 |
IT8 | Conditions of Sale | Optional | 1 |
CSH | Sales Requirements | Optional | >1 |
ITD | Terms of Sale/Deferred Terms of Sale | Optional | 2 |
DIS | Discount Detail | Optional | 20 |
INC | Installment Information | Optional | 1 |
TAX | Tax Reference | Optional | >1 |
FOB | F.O.B. Related Instructions | Optional | >1 |
SDQ | Destination Quantity | Optional | 500 |
DTM | Date/Time Reference | Optional | 10 |
LDT | Lead Time | Optional | 12 |
TD1 | Carrier Details (Quantity and Weight) | Optional | 1 |
TD5 | Carrier Details (Routing Sequence/Transit Time) | Optional | 12 |
TD3 | Carrier Details (Equipment) | Optional | 12 |
TD4 | Carrier Details (Special Handling, or Hazardous Materials, or Both) | Optional | 5 |
| ACK loop | Line Item Acknowledgment | Optional | 104 |
ACK | Line Item Acknowledgment | Mandatory | 1 |
DTM | Date/Time Reference | Optional | 1 |
MAN | Marks and Numbers | Optional | 10 |
AMT | Monetary Amount | Optional | 1 |
CTB | Restrictions/Conditions | Optional | >1 |
TXI | Tax Information | Optional | >1 |
| QTY loop | Quantity | Optional | >1 |
QTY | Quantity | Mandatory | 1 |
SI | Service Characteristic Identification | Optional | >1 |
| PKG loop | Marking, Packaging, Loading | Optional | 200 |
PKG | Marking, Packaging, Loading | Mandatory | 1 |
MEA | Measurements | Optional | >1 |
| SCH loop | Line Item Schedule | Optional | 200 |
SCH | Line Item Schedule | Mandatory | 1 |
TD1 | Carrier Details (Quantity and Weight) | Optional | 2 |
TD5 | Carrier Details (Routing Sequence/Transit Time) | Optional | 12 |
TD3 | Carrier Details (Equipment) | Optional | 12 |
TD4 | Carrier Details (Special Handling, or Hazardous Materials, or Both) | Optional | 5 |
REF | Reference Identification | Optional | >1 |
| N9 loop | Reference Identification | Optional | 1000 |
N9 | Reference Identification | Mandatory | 1 |
DTM | Date/Time Reference | Optional | >1 |
MSG | Message Text | Optional | 1000 |
| N1 loop | Name | Optional | 200 |
N1 | Name | Mandatory | 1 |
N2 | Additional Name Information | Optional | 2 |
N3 | Address Information | Optional | 2 |
N4 | Geographic Location | Optional | 1 |
NX2 | Location ID Component | Optional | >1 |
REF | Reference Identification | Optional | 12 |
PER | Administrative Communications Contact | Optional | 3 |
SI | Service Characteristic Identification | Optional | >1 |
DTM | Date/Time Reference | Optional | 1 |
FOB | F.O.B. Related Instructions | Optional | 1 |
SCH | Line Item Schedule | Optional | 200 |
TD1 | Carrier Details (Quantity and Weight) | Optional | 2 |
TD5 | Carrier Details (Routing Sequence/Transit Time) | Optional | 12 |
TD3 | Carrier Details (Equipment) | Optional | 12 |
TD4 | Carrier Details (Special Handling, or Hazardous Materials, or Both) | Optional | 5 |
QTY | Quantity | Optional | >1 |
PKG | Marking, Packaging, Loading | Optional | 25 |
| SLN loop | Subline Item Detail | Optional | 1000 |
SLN | Subline Item Detail | Mandatory | 1 |
MSG | Message Text | Optional | >1 |
SI | Service Characteristic Identification | Optional | >1 |
PID | Product/Item Description | Optional | 1000 |
PO3 | Additional Item Detail | Optional | 25 |
CTP | Pricing Information | Optional | 25 |
PAM | Period Amount | Optional | 10 |
ACK | Line Item Acknowledgment | Optional | 104 |
| SAC loop | Service, Promotion, Allowance, or Charge Information | Optional | 10 |
SAC | Service, Promotion, Allowance, or Charge Information | Mandatory | 1 |
CUR | Currency | Optional | 1 |
DTM | Date/Time Reference | Optional | 10 |
PO4 | Item Physical Details | Optional | 1 |
TAX | Tax Reference | Optional | 3 |
ADV | Advertising Demographic Information | Optional | >1 |
| QTY loop | Quantity | Optional | >1 |
QTY | Quantity | Mandatory | 1 |
SI | Service Characteristic Identification | Optional | >1 |
| N9 loop | Reference Identification | Optional | >1 |
N9 | Reference Identification | Mandatory | 1 |
DTM | Date/Time Reference | Optional | >1 |
MSG | Message Text | Optional | >1 |
| N1 loop | Name | Optional | 10 |
N1 | Name | Mandatory | 1 |
N2 | Additional Name Information | Optional | 2 |
N3 | Address Information | Optional | 2 |
N4 | Geographic Location | Optional | 1 |
NX2 | Location ID Component | Optional | >1 |
REF | Reference Identification | Optional | 12 |
PER | Administrative Communications Contact | Optional | 3 |
SI | Service Characteristic Identification | Optional | >1 |
| CTT loop | Transaction Totals | Optional | 1 |
CTT | Transaction Totals | Mandatory | 1 |
AMT | Monetary Amount | Optional | 1 |
SE | Transaction Set Trailer | Mandatory | 1 |
Sample 855 file
An acknowledgment of a purchase order with line-level status. Paste it into EdiNation to see every element named and validated.
ISA*00* *00* *16*SENDER1 *14*RECEIVER1 *071216*1406*U*00204*000000263*1*T*>~ GS*IN*SENDER1*RECEIVER1*20071216*1406*000000001*X*004010~ ST*855*0005~ BAK*16*AP*1234567*20050102~ DTM*068*20050203~ N1*SF*XYZ MANUFACTURING CO*01*987654321~ N1*ST*KOHLS DEPARTMENT STORES*92*0085~ PO1*000001*3*EA***UP*123456789012*VA*BLU89Z012*CM*123*SM*12345~ PO1*000002*5*EA***UP*123456798123*VA*BLK98A023*CM*321*SM*12345~ PO1*000003*1*EA***UP*999988888001*VA*981RACK~ CTT*3~ SE*10*0005~ GE*2*000000001~ IEA*1*000000263~
The same 855 as JSON
ediFabric turns every loop, segment and element into a named field. This is the transaction from the sample, in the JSON that ediFabric Native and Cloud return and accept.
{
"ST": {
"TransactionSetIdentifierCode_01": "855",
"TransactionSetControlNumber_02": "0005"
},
"BAK": {
"TransactionSetPurposeCode_01": "16",
"AcknowledgmentType_02": "AP",
"PurchaseOrderNumber_03": "1234567",
"Date_04": "20050102"
},
"DTM": [
{
"DateTimeQualifier_01": "068",
"Date_02": "20050203"
}
],
"N1Loop": [
{
"N1": {
"EntityIdentifierCode_01": "SF",
"Name_02": "XYZ MANUFACTURING CO",
"IdentificationCodeQualifier_03": "01",
"IdentificationCode_04": "987654321"
}
},
{
"N1": {
"EntityIdentifierCode_01": "ST",
"Name_02": "KOHLS DEPARTMENT STORES",
"IdentificationCodeQualifier_03": "92",
"IdentificationCode_04": "0085"
}
}
],
"PO1Loop": [
{
"PO1": {
"AssignedIdentification_01": "000001",
"QuantityOrdered_02": "3",
"UnitorBasisforMeasurementCode_03": "EA",
"ProductServiceIDQualifier_06": "UP",
"ProductServiceID_07": "123456789012",
"ProductServiceIDQualifier_08": "VA",
"ProductServiceID_09": "BLU89Z012",
"ProductServiceIDQualifier_10": "CM",
"ProductServiceID_11": "123",
"ProductServiceIDQualifier_12": "SM",
"ProductServiceID_13": "12345"
}
},
{
"PO1": {
"AssignedIdentification_01": "000002",
"QuantityOrdered_02": "5",
"UnitorBasisforMeasurementCode_03": "EA",
"ProductServiceIDQualifier_06": "UP",
"ProductServiceID_07": "123456798123",
"ProductServiceIDQualifier_08": "VA",
"ProductServiceID_09": "BLK98A023",
"ProductServiceIDQualifier_10": "CM",
"ProductServiceID_11": "321",
"ProductServiceIDQualifier_12": "SM",
"ProductServiceID_13": "12345"
}
},
{
"PO1": {
"AssignedIdentification_01": "000003",
"QuantityOrdered_02": "1",
"UnitorBasisforMeasurementCode_03": "EA",
"ProductServiceIDQualifier_06": "UP",
"ProductServiceID_07": "999988888001",
"ProductServiceIDQualifier_08": "VA",
"ProductServiceID_09": "981RACK"
}
}
],
"CTTLoop": {
"CTT": {
"NumberofLineItems_01": "3"
}
},
"SE": {
"NumberofIncludedSegments_01": "10",
"TransactionSetControlNumber_02": "0005"
}
}Parse and validate an 855 file
Read the file into typed objects with ediFabric .NET, convert it to JSON in process with the ediFabric Native bindings for Python, Java and C, or post it to the ediFabric Cloud REST API from any language.
using EdiFabric.Templates.X12004010; License.SetSerial("YOUR_SERIAL_KEY"); using (var stream = File.OpenRead(@"C:\edi\PurchaseOrdersAcknowledgement.txt")) using (var reader = new X12Reader(stream, "EdiFabric.Templates.X12")) { var items = await reader.ReadToEndAsync(); foreach (var transaction in items.OfType<TS855>()) { if (transaction.IsValid(out MessageErrorContext errors)) Console.WriteLine($"{transaction.ST.TransactionSetControlNumber_02} is valid"); else Console.WriteLine(string.Join(Environment.NewLine, errors.Flatten())); } }
import json import edifabric_x12 as ef serial = "YOUR_SERIAL_KEY" ef.load_library() ef.set_serial(serial) ef.set_map(json.dumps({"default": serial, "maps": {}})) edi = open("PurchaseOrdersAcknowledgement.txt", "rb").read() output, offset = ef.parse(edi, ef.ParseMode.JSON_VALIDATE) transactions = output[:offset] report = json.loads(output[offset:]) print(report["errors_count"])
import com.edifabric.nativex12.EdiFabricX12; import com.edifabric.nativex12.ParseMode; import com.edifabric.nativex12.ParseResult; String serial = "YOUR_SERIAL_KEY"; EdiFabricX12.loadLibrary(); EdiFabricX12.setSerial(serial); EdiFabricX12.setMap("{\"default\":\"" + serial + "\",\"maps\":{}}"); String edi = Files.readString(Path.of("PurchaseOrdersAcknowledgement.txt")); ParseResult result = EdiFabricX12.parse(edi, ParseMode.JSON_VALIDATE); System.out.println(result.getTransactions()); System.out.println(result.getReport());
#include "edifabric_x12.h" const char *serial = "YOUR_SERIAL_KEY"; ef_parse_result result; if (ef_load_library(NULL) != 0) return 1; ef_set_serial(serial); ef_set_map("{\"default\":\"YOUR_SERIAL_KEY\",\"maps\":{}}"); char *edi = read_file("PurchaseOrdersAcknowledgement.txt", NULL); /* helper in example_all_functions.c */ if (ef_parse(edi, EF_PARSE_JSON_VALIDATE, NULL, &result) == 0) { /* transactions = output[0 .. offset), report = output[offset .. length) */ fwrite(result.output.data, 1, (size_t)result.output.length, stdout); ef_free(result.output.data); }
curl -X POST 'https://api.edination.com/v2/x12/read' \ -H 'Ocp-Apim-Subscription-Key: YOUR_SERIAL_KEY' \ -H 'Content-Type: application/octet-stream' \ --data-binary '@PurchaseOrdersAcknowledgement.txt'
Generate an 855 file
Populate a TS855 object in .NET, or pass JSON in the shape shown above to ediFabric Native or ediFabric Cloud, and get a valid 855 file back.
using EdiFabric.Templates.X12004010; License.SetSerial("YOUR_SERIAL_KEY"); var transaction = new TS855(); // 855 is the Transaction Set Identifier Code for the Purchase Orders Acknowledgement // 0001 is the Transaction Set Control Number transaction.ST = new ST(); transaction.ST.TransactionSetIdentifierCode_01 = "855"; transaction.ST.TransactionSetControlNumber_02 = "0001"; // Purchase Order Number 1234567 // Purchase Order Date 01 / 02 / 05 transaction.BAK = new BAK(); transaction.BAK.TransactionSetPurposeCode_01 = "16"; transaction.BAK.AcknowledgmentType_02 = "AP"; transaction.BAK.PurchaseOrderNumber_03 = "1234567"; transaction.BAK.Date_04 = "20050102"; // Repeating DTM transaction.DTM = new List<DTM>(); // ... set the remaining loops and segments the same way // SegmentBuilders is in the Common project of the example repository using (var stream = new MemoryStream()) { using (var writer = new X12Writer(stream)) { writer.Write(SegmentBuilders.BuildIsa("1")); writer.Write(SegmentBuilders.BuildGs("1")); writer.Write(transaction); } Console.WriteLine(Encoding.UTF8.GetString(stream.ToArray())); }
import json import edifabric_x12 as ef serial = "YOUR_SERIAL_KEY" ef.load_library() ef.set_serial(serial) ef.set_map(json.dumps({"default": serial, "maps": {}})) # the transactions JSON returned by ef.parse, edited or produced by your application transactions = open("PurchaseOrdersAcknowledgement.json", "rb").read() edi = ef.build(transactions, postfix="\r\n") print(edi)
import com.edifabric.nativex12.EdiFabricX12; String serial = "YOUR_SERIAL_KEY"; EdiFabricX12.loadLibrary(); EdiFabricX12.setSerial(serial); EdiFabricX12.setMap("{\"default\":\"" + serial + "\",\"maps\":{}}"); // the transactions JSON returned by parse, edited or produced by your application String transactions = Files.readString(Path.of("PurchaseOrdersAcknowledgement.json")); String edi = EdiFabricX12.build(transactions, "\r\n"); System.out.println(edi);
#include "edifabric_x12.h" ef_buffer edi; if (ef_load_library(NULL) != 0) return 1; ef_set_serial("YOUR_SERIAL_KEY"); ef_set_map("{\"default\":\"YOUR_SERIAL_KEY\",\"maps\":{}}"); /* the transactions JSON returned by ef_parse, edited or produced by your application */ char *transactions = read_file("PurchaseOrdersAcknowledgement.json", NULL); if (ef_build(transactions, "\r\n", &edi) == 0) { fwrite(edi.data, 1, (size_t)edi.length, stdout); ef_free(edi.data); }
# the JSON returned by /read, edited or produced by your application curl -X POST 'https://api.edination.com/v2/x12/write' \ -H 'Ocp-Apim-Subscription-Key: YOUR_SERIAL_KEY' \ -H 'Content-Type: application/json' \ --data-binary '@PurchaseOrdersAcknowledgement.json' \ -o 'PurchaseOrdersAcknowledgement.txt'
Complete ediFabric .NET example
A complete C# program for the X12 855, built on TS855 in EdiFabric.Templates.X12. The same code is in the ediFabric .NET examples on GitHub.
using EdiFabric.Core.Model.Edi;
using EdiFabric.Core.Model.Edi.X12;
using EdiFabric.Examples.X12.Common;
using EdiFabric.Framework.Readers;
using EdiFabric.Framework.Writers;
using EdiFabric.Templates.X12004010;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace EdiFabric.Examples.X12.T855
{
class Program
{
static void Main(string[] args)
{
SerialKey.Set(Common.SerialKey.Get());
Read();
Write();
}
///
/// Read Purchase Orders Acknowledgement
///
static void Read()
{
var ediStream = File.OpenRead(Directory.GetCurrentDirectory() + @"\..\..\..\Files\X12\PurchaseOrdersAcknowledgement.txt");
List ediItems;
using (var ediReader = new X12Reader(ediStream, "EdiFabric.Templates.X12"))
ediItems = ediReader.ReadToEnd().ToList();
var transactions = ediItems.OfType();
foreach (var transaction in transactions)
{
if (transaction.HasErrors)
{
// partially parsed
var errors = transaction.ErrorContext.Flatten();
}
}
}
///
/// Write Purchase Orders Acknowledgement
///
static void Write()
{
var transaction = BuildPurchaseOrdersAcknowledgement("5");
using (var stream = new MemoryStream())
{
using (var writer = new X12Writer(stream))
{
writer.Write(SegmentBuilders.BuildIsa("1"));
writer.Write(SegmentBuilders.BuildGs("1"));
writer.Write(transaction);
}
var ediString = stream.LoadToString();
}
}
///
/// Builds Purchase Orders Acknowledgement.
/// Original from http://www.jobisez.com/edi/tp/guide.aspx?doc=/edi-igs/Kohls/edi_855.pdf
///
static TS855 BuildPurchaseOrdersAcknowledgement(string controlNumber)
{
var result = new TS855();
// 855 is the Transaction Set Identifier Code for the Purchase Orders Acknowledgement
// 0001 is the Transaction Set Control Number
result.ST = new ST();
result.ST.TransactionSetIdentifierCode_01 = "855";
result.ST.TransactionSetControlNumber_02 = controlNumber.PadLeft(9, '0');
// Purchase Order Number 1234567
// Purchase Order Date 01 / 02 / 05
result.BAK = new BAK();
result.BAK.TransactionSetPurposeCode_01 = "16";
result.BAK.AcknowledgmentType_02 = "AP";
result.BAK.PurchaseOrderNumber_03 = "1234567";
result.BAK.Date_04 = "20050102";
// Repeating DTM
result.DTM = new List();
// Scheduled Ship Date 02 / 03 / 05
var dtm1 = new DTM();
dtm1.DateTimeQualifier_01 = "068";
dtm1.Date_02 = "20050203";
result.DTM.Add(dtm1);
// Repeating N1 Loops
result.N1Loop = new List();
// Begin N1 Loop 1
var n1Loop1 = new Loop_N1_855();
// Vendor Name XYZ MANUFACTURING CO
// Vendor DUNS 987654321
n1Loop1.N1 = new N1();
n1Loop1.N1.EntityIdentifierCode_01 = "SF";
n1Loop1.N1.Name_02 = "XYZ MANUFACTURING CO";
n1Loop1.N1.IdentificationCodeQualifier_03 = "01";
n1Loop1.N1.IdentificationCode_04 = "987654321";
// End N1 Loop 1
result.N1Loop.Add(n1Loop1);
// Begin N1 Loop 2
var n1Loop2 = new Loop_N1_855();
// Ship to Distribution Center 0085 in Menomonee Falls WI
n1Loop2.N1 = new N1();
n1Loop2.N1.EntityIdentifierCode_01 = "ST";
n1Loop2.N1.Name_02 = "KOHLS DEPARTMENT STORES";
n1Loop2.N1.IdentificationCodeQualifier_03 = "92";
n1Loop2.N1.IdentificationCode_04 = "0085";
// End N1 Loop 2
result.N1Loop.Add(n1Loop2);
// Repeating PO1 Loops
result.PO1Loop = new List();
// Begin PO1 Loop 1
var po1Loop1 = new Loop_PO1_855();
// UPC 1-23456-78901-2
// Quantity Ordered 3(Each)
// Kohl’s SKU NONE
// Vendor Style BLU89Z012
// NRMA Color Code(CM) 123
// Vendor Color(VE) BLUESKY
// NRMA Size Code(SM) 12345
// Vendor Size(SZ) W32XL34
po1Loop1.PO1 = new PO1();
po1Loop1.PO1.AssignedIdentification_01 = "000001";
po1Loop1.PO1.QuantityOrdered_02 = "3";
po1Loop1.PO1.UnitorBasisforMeasurementCode_03 = "EA";
po1Loop1.PO1.ProductServiceIDQualifier_06 = "UP";
po1Loop1.PO1.ProductServiceID_07 = "123456789012";
po1Loop1.PO1.ProductServiceIDQualifier_08 = "VA";
po1Loop1.PO1.ProductServiceID_09 = "BLU89Z012";
po1Loop1.PO1.ProductServiceIDQualifier_10 = "CM";
po1Loop1.PO1.ProductServiceID_11 = "123";
po1Loop1.PO1.ProductServiceIDQualifier_12 = "SM";
po1Loop1.PO1.ProductServiceID_13 = "12345";
// End PO1 Loop 1
result.PO1Loop.Add(po1Loop1);
// Begin PO1 Loop 2
var po1Loop2 = new Loop_PO1_855();
// UPC 1-23456-79812-3
// Quantity Ordered 5(Each)
// Kohl’s SKU NONE
// Vendor Style BLK98A023
// NRMA Color Code(CM) 321
// Vendor Color(VE) BLACK - COAL
// NRMA Size Code(SM) 12345
// Vendor Size(SZ) W32XL34
po1Loop2.PO1 = new PO1();
po1Loop2.PO1.AssignedIdentification_01 = "000002";
po1Loop2.PO1.QuantityOrdered_02 = "5";
po1Loop2.PO1.UnitorBasisforMeasurementCode_03 = "EA";
po1Loop2.PO1.ProductServiceIDQualifier_06 = "UP";
po1Loop2.PO1.ProductServiceID_07 = "123456798123";
po1Loop2.PO1.ProductServiceIDQualifier_08 = "VA";
po1Loop2.PO1.ProductServiceID_09 = "BLK98A023";
po1Loop2.PO1.ProductServiceIDQualifier_10 = "CM";
po1Loop2.PO1.ProductServiceID_11 = "321";
po1Loop2.PO1.ProductServiceIDQualifier_12 = "SM";
po1Loop2.PO1.ProductServiceID_13 = "12345";
// End PO1 Loop 2
result.PO1Loop.Add(po1Loop2);
// Begin PO1 Loop 3
var po1Loop3 = new Loop_PO1_855();
// UPC 9-99988-88800-1
// Quantity Ordered 1(Each)
// Kohl’s SKU NONE
// Vendor Style 981RACK
// NRMA Color Code(CM) NONE
// Vendor Color(VE) NONE
// NRMA Size Code(SM) NONE
// Vendor Size(SZ) NONE
po1Loop3.PO1 = new PO1();
po1Loop3.PO1.AssignedIdentification_01 = "000003";
po1Loop3.PO1.QuantityOrdered_02 = "1";
po1Loop3.PO1.UnitorBasisforMeasurementCode_03 = "EA";
po1Loop3.PO1.ProductServiceIDQualifier_06 = "UP";
po1Loop3.PO1.ProductServiceID_07 = "999988888001";
po1Loop3.PO1.ProductServiceIDQualifier_08 = "VA";
po1Loop3.PO1.ProductServiceID_09 = "981RACK";
// End PO1 Loop 3
result.PO1Loop.Add(po1Loop3);
// 3 is the Number of Items
result.CTTLoop = new Loop_CTT_855();
result.CTTLoop.CTT = new CTT();
result.CTTLoop.CTT.NumberofLineItems_01 = "3";
return result;
}
}
}More operations in ediFabric .NET
855 questions
What do the BAK02 codes mean?
AC acknowledge with detail and change, AD acknowledge with detail and no change, AK acknowledge with no detail or change, RJ rejected with no detail. Trading partners usually allow a subset.
How are line changes reported?
With ACK segments in the PO1 loop. ACK01 is the line status, such as IA accepted, IB backordered, IC changed or IR rejected, with the quantity and date in the following elements.
Is the 855 the same as a 997?
No. The 997 only confirms that the 850 was received and is syntactically valid. The 855 is a business response about the order itself.
How do I parse and generate X12 855 files in .NET, Python, Java and C?
In .NET, install EdiFabric and EdiFabric.Templates.X12, read the file with X12Reader into TS855 objects and write them back with X12Writer. From Python, Java or C, use ediFabric Native, which converts 855 files to JSON and JSON back to X12 inside your process. From any other language, post the file to the ediFabric Cloud REST API.
Resources
Parse your first X12 855 in five minutes
The Community plan is free forever and needs no credit card. It includes ediFabric .NET, Native and Cloud with one serial key.
Sign up free Validate EDI files free