An 855 Purchase Order Acknowledgment can be used either to simply acknowledge a buyer's purchase order, or it can be used as a notification that the vendor has generated an order on their end.

🚧

Update sender and receiver to test

If you want to use this example within your own test transaction, make sure you edit the sender (ODF_SUPPLIER) and receiver (ODF_BUYER) ISA IDs.

Purchase Order Acknowledgment Example Transaction

{
    "type": {
        "name": "855_PURCHASE_ORDER_ACKNOWLEDGMENT"
    },
    "stream": "test",
    "sender": {
        "isaId": "ODF_SUPPLIER"
    },
    "receiver": {
        "isaId": "ODF_BUYER"
    },
    "message": {
        "transactionSets": [
          {
              "beginningSegmentForPurchaseOrderAcknowledgment": [
                  {
                      "transactionSetPurposeCode": "00",
                      "acknowledgmentTypeCode": "AC",
                      "purchaseOrderNumber": "PO123456789",
                      "date": "20200828",
                      "date1": "20200828"
                  }
              ],
              "referenceInformation": [
                  {
                      "referenceIdentificationQualifier": "DP",
                      "referenceIdentification": "210"
                  }
              ],
              "N1_loop": [
                  {
                      "partyIdentification": [
                          {
                              "entityIdentifierCode": "BT",
                              "name": "ODF BUYER HQ"
                          }
                      ],
                      "partyLocation": [
                          {
                              "addressInformation": "1119 BUSH STREET"
                          }
                      ],
                      "geographicLocation": [
                          {
                              "cityName": "SAN FRANCISCO",
                              "stateOrProvinceCode": "CA",
                              "postalCode": "94101"
                          }
                      ]
                  },
                  {
                      "partyIdentification": [
                          {
                              "entityIdentifierCode": "ST",
                              "name": "ODF BUYER MAIN STORE"
                          }
                      ],
                      "partyLocation": [
                          {
                              "addressInformation": "1207 WASHINGTON RD"
                          }
                      ],
                      "geographicLocation": [
                          {
                              "cityName": "SEATTLE",
                              "stateOrProvinceCode": "WA",
                              "postalCode": "98101"
                          }
                      ]
                  }
              ],
              "PO1_loop": [
                  {
                      "baselineItemData": [
                          {
                              "assignedIdentification": "1",
                              "quantity": "48",
                              "unitOrBasisForMeasurementCode": "CA",
                              "unitPrice": "26.25",
                              "productServiceIDQualifier": "UP",
                              "productServiceID": "711719100246",
                              "productServiceIDQualifier1": "VN",
                              "productServiceID1": "009"
                          }
                      ],
                      "PID_loop": [
                          {
                              "productItemDescription": [
                                  {
                                      "itemDescriptionTypeCode": "F",
                                      "description": "SUNGLASSES VERMILLION (E16249)"
                                  }
                              ]
                          }
                      ],
                      "ACK_loop": [
                          {
                              "lineItemAcknowledgment": [
                                  {
                                      "lineItemStatusCode": "IA",
                                      "quantity": "48",
                                      "unitOrBasisForMeasurementCode": "CA",
                                      "dateTimeQualifier": "055",
                                      "date": "20200829"
                                  }
                              ]
                          }
                      ]
                  },
                  {
                      "baselineItemData": [
                          {
                              "assignedIdentification": "2",
                              "quantity": "120",
                              "unitOrBasisForMeasurementCode": "CA",
                              "unitPrice": "27.45",
                              "productServiceIDQualifier": "UP",
                              "productServiceID": "611719100245",
                              "productServiceIDQualifier1": "VN",
                              "productServiceID1": "009A"
                          }
                      ],
                      "PID_loop": [
                          {
                              "productItemDescription": [
                                  {
                                      "itemDescriptionTypeCode": "F",
                                      "description": "SUNGLASSES YELLOW (F8C729)"
                                  }
                              ]
                          }
                      ],
                      "ACK_loop": [
                          {
                              "lineItemAcknowledgment": [
                                  {
                                      "lineItemStatusCode": "IB",
                                      "quantity": "120",
                                      "unitOrBasisForMeasurementCode": "CA",
                                      "dateTimeQualifier": "068",
                                      "date": "20200915"
                                  }
                              ]
                          }
                      ]
                  }
              ],
              "CTT_loop": [
                  {
                      "transactionTotals": [
                          {
                              "numberOfLineItems": "2"
                          }
                      ]
                  }
              ]
          }
      ]
    }
}
...
ISA*00*          *00*          *ZZ*ODF_SUPPLIER   *ZZ*ODF_BUYER      *200828*1015*^*00401*000197444*0*T*>~
GS*PR*ODF_SUPPLIER*ODF_BUYER*20200828*1015*197444*X*004010~
ST*855*0001~
BAK*00*AC*PO123456789*20200828*****20200828~
REF*DP*210~
N1*BT*ODF BUYER HQ~
N3*1119 BUSH STREET~
N4*SAN FRANCISCO*CA*94101~
N1*ST*ODF BUYER MAIN STORE~
N3*1207 WASHINGTON RD~
N4*SEATTLE*WA*98101~
PO1*1*48*CA*26.25**UP*711719100246*VN*009~
PID*F****SUNGLASSES VERMILLION (E16249)~
ACK*IA*48*CA*055*20200829~
PO1*2*120*CA*27.45**UP*611719100245*VN*009A~
PID*F****SUNGLASSES YELLOW (F8C729)~
ACK*IB*120*CA*068*20200915~
CTT*2~
SE*17*0001~
GE*1*197444~
IEA*1*000197444~

BAK Beginning Segment

The Beginning Segment for Purchase Order Acknowledgment (BAK) segment provides information on the type of acknowledgment, PO number, and date.

In this case we have an original (00) transaction set, with a detailed acknowledgment with changes (AC) for PO number PO123456789

"beginningSegmentForPurchaseOrderAcknowledgment": [
    {
        "transactionSetPurposeCode": "00",
        "acknowledgmentTypeCode": "AC",
        "purchaseOrderNumber": "PO123456789",
        "date": "20200828",
        "date1": "20200828"
    }
]
BAK*00*AC*PO123456789*20200828*****20200828~
JSON ElementX12 ElementValueDescription
transactionSetPurposeCodeBAK0100Code identifying purpose of transaction set.
acknowledgmentTypeCodeBAK02ACCode specifying the type of acknowledgment. In this case AC means "Acknowledge - With Change".
purchaseOrderNumberBAK03PO123456789Purchase Order number assigned by the buyer/purchaser.
dateBAK0420200828The date assigned by the buyer in the original Purchase Order in CCYYMMDD format.
date1BAK0920200828The date assigned by the vendor to the acknowledgment in CCYYMMDD format

N1 Loop

The Address (N1) loop provides information on the relevant addresses in the Purchase Order Acknowledgment.

In this Purchase Order, the N1 loop describes two addresses for this order:

  • The billing address has an entityIdentifierCode with the value BT
    The billing address is 1119 Bush street, San Francisco, CA 94101. The recipient is ODF Buyer HQ.

  • The shipping address has an entityIdentifierCode with the value ST
    The shipping address is 1207 Washington Road, Seattle, Washington, CA 98101. The recipient is ODF Buyer Main store.

Each of these addresses is included in one iteration of the N1 loop which is each composed of one or several segments:

  • Party Identification (N1) - This segment indicates the type of party
  • Party Location (N3) - The party's address
  • Geographic Location (N4) - The party's city, state and postal code.
"N1_loop": [
    {
        "partyIdentification": [
            {
                "entityIdentifierCode": "BT",
                "name": "ODF BUYER HQ"
            }
        ],
        "partyLocation": [
            {
                "addressInformation": "1119 BUSH STREET"
            }
        ],
        "geographicLocation": [
            {
                "cityName": "SAN FRANCISCO",
                "stateOrProvinceCode": "CA",
                "postalCode": "94101"
            }
        ]
    },
    {
        "partyIdentification": [
            {
                "entityIdentifierCode": "ST",
                "name": "ODF BUYER MAIN STORE"
            }
        ],
        "partyLocation": [
            {
                "addressInformation": "1207 WASHINGTON RD"
            }
        ],
        "geographicLocation": [
            {
                "cityName": "SEATTLE",
                "stateOrProvinceCode": "WA",
                "postalCode": "98101"
            }
        ]
    }
]

N1*BT*ODF BUYER HQ~
N3*1119 BUSH STREET~
N4*SAN FRANCISCO*CA*94101~
N1*ST*ODF BUYER MAIN STORE~
N3*1207 WASHINGTON RD~
N4*SEATTLE*WA*98101~

N1 Party Identification

The party identification provides the type of contact and the contact name.

  • The Bill-to-Party (BT) is "ODF Buyer HQ".
  • The Ship To (ST) is "ODF Buyer Main Store".

📘

Only the first loop is described below

"partyIdentification": [
    {
        "entityIdentifierCode": "BT",
        "name": "ODF Buyer HQ"
    }
]
N1*BT*ODF BUYER HQ~
JSON ElementX12 ElementValueDescription
entityIdentifierCodeN101BTThis code describes the type of name given in the element name (N102).

BT means Bill To. Other qualifiers can be used, such as ST (Ship To) or BY (Buying Party).
nameN102ODF BUYER HQThe value associated with the code above.

N3 Party Location

The Party Location provides the first line of the address for the contact defined in the previous segment (Party Identification or N1 segment).

  • The address of the billing contact is "1119 Bush Street".
  • The address of the shipping contact is "12 Main Street".

Only the first loop is described below.

"partyLocation": [
    {
        "addressInformation": "1119 BUSH STREET"
    }
]
N3*1119 BUSH STREET~
JSON ElementX12 ElementValueDescription
addressInformationN3011119 BUSH STREETThis is the first line of the address.

N4 Geographic Location

The Geographic Location provides the city, state/province, and postal code information for the contact defined in the previous segment (Party Identification or N1 segment).

  • The billing geographic location is in San Francisco, California and the postal code is 94101.
  • The shipping geographic location is in Seattle, Washington and the postal code is 98101.

Only the first loop is described below.

"geographicLocation": [
    {
        "cityName": "SAN FRANCISCO",
        "stateOrProvinceCode": "CA",
        "postalCode": "94101"
    }
]
N4*SAN FRANCISCO*CA*94101~
JSON ElementX12 ElementValueDescription
cityNameN401SAN FRANCISCOCity
stateOrProvinceCodeN402CATwo character state or province code
postalCodeN40394101Postal code

PO1 Loop

In this example, ODF Buyer has asked to purchase two types of items:

  • 48 cases of vermillion sunglasses referenced with the UPC code "711719100246" and the Vendor Number "009" at $26.25 per case.
  • 120 cases of yellow sunglasses referenced with the UPC code "611719100245" and the Vendor Number "009A" at $27.45 per case.

ODF Supplier is responding that:

  • the vermillion sunglasses (line item 1) are available (lineItemStatusCode is IA)
  • the yellow sunglasses (line item 2) are currently backordered (lineItemStatusCode is IB) and will be shipped later

Each of these items are included in one iteration of the PO1 loop and are composed of one or several loops and segment:

  • Baseline Item Data (PO1) - This segment controls the content of the loop
  • PID Loop
"PO1_loop": [
    {
        "baselineItemData": [
            {
                "assignedIdentification": "1",
                "quantity": "48",
                "unitOrBasisForMeasurementCode": "CA",
                "unitPrice": "26.25",
                "productServiceIDQualifier": "UP",
                "productServiceID": "711719100246",
                "productServiceIDQualifier1": "VN",
                "productServiceID1": "009"
            }
        ],
        "PID_loop": [
            {
                "productItemDescription": [
                    {
                        "itemDescriptionTypeCode": "F",
                        "description": "SUNGLASSES VERMILLION (E16249)"
                    }
                ]
            }
        ],
        "ACK_loop": [
            {
                "lineItemAcknowledgment": [
                    {
                        "lineItemStatusCode": "IA",
                        "quantity": "48",
                        "unitOrBasisForMeasurementCode": "CA",
                        "dateTimeQualifier": "055",
                        "date": "20200829"
                    }
                ]
            }
        ]
    },
    {
        "baselineItemData": [
            {
                "assignedIdentification": "2",
                "quantity": "120",
                "unitOrBasisForMeasurementCode": "CA",
                "unitPrice": "27.45",
                "productServiceIDQualifier": "UP",
                "productServiceID": "611719100245",
                "productServiceIDQualifier1": "VN",
                "productServiceID1": "009A"
            }
        ],
        "PID_loop": [
            {
                "productItemDescription": [
                    {
                        "itemDescriptionTypeCode": "F",
                        "description": "SUNGLASSES YELLOW (F8C729)"
                    }
                ]
            }
        ],
        "ACK_loop": [
            {
                "lineItemAcknowledgment": [
                    {
                        "lineItemStatusCode": "IB",
                        "quantity": "120",
                        "unitOrBasisForMeasurementCode": "CA",
                        "dateTimeQualifier": "068",
                        "date": "20200915"
                    }
                ]
            }
        ]
    }
]
PO1*1*48*CA*26.25**UP*711719100246*VN*009~
PID*F****SUNGLASSES VERMILLION (E16249)~
ACK*IA*48*CA*055*20200829~
PO1*2*120*CA*27.45**UP*611719100245*VN*009A~
PID*F****SUNGLASSES YELLOW (F8C729)~
ACK*IB*120*CA*068*20200915~

P01 Baseline Item Data

This contains the line item data. Here we will only show item 2, since that is the item that is backordered.

"baselineItemData": [
    {
        "assignedIdentification": "2",
        "quantity": "120",
        "unitOrBasisForMeasurementCode": "CA",
        "unitPrice": "27.45",
        "productServiceIDQualifier": "UP",
        "productServiceID": "611719100245",
        "productServiceIDQualifier1": "VN",
        "productServiceID1": "009A"
    }
]
PO1*2*120*CA*27.45**UP*611719100245*VN*009A~
JSON ElementX12 ElementValueDescription
assignedIdentificationPO1012This is the line number of the item.
quantityPO102120This element is the quantity ordered.
unitOrBasisForMeasurementCodePO103CAThis describes the quantity element. CA means "Case", so the buyer wants 48 cases of line item 1.
unitPricePO10427.45This is the price per unit. Each case in this order costs $27.45.
productServiceIDQualifierPO106UPThis describes the Product Service ID, in this case it identifies the ID as a UPC code (UP).
productServiceIDPO107611719100245This specifies the UPC code. It matches the corresponding code in the Purchase Order.
productServiceIDQualifier1PO106VNThis describes the additional Product Service ID, in this case it identifies the ID as a Vendor Number (VN).
productServiceID1PO107009AThis specifies the Vendor Number. It matches the corresponding code in the Purchase Order.

PID Loop

The PID loop provides the description for each item in PO1. That's why the PID loop is a child loop and is included in the PO1 loop.

Each of these descriptions is included in one iteration of the PID loop and are composed of one segment:

  • Product/Item Description (PID)
"PID_loop": [
    {
        "productItemDescription": [
            {
                "itemDescriptionTypeCode": "F",
                "description": "SUNGLASSES YELLOW (F8C729)"
            }
        ]
    }
]
PID*F****SUNGLASSES YELLOW (F8C729)~

PID Product/Item Description

The product/item description segment provides descriptive information for each item of the purchase order.

In the second iteration of the PO1 loop, the purchaser wants to buy the item described as "SUNGLASSES YELLOW (F8C729)".

 "PID_loop": [
    {
        "productItemDescription": [
            {
                "itemDescriptionTypeCode": "F",
                "description": "SUNGLASSES YELLOW (F8C729)"
            }
        ]
    }
]
PID*F****SUNGLASSES YELLOW (F8C729)~
JSON ElementX12 ElementValueDescription
itemDescriptionTypeCodePID01FThis specifies the type of item description given in the element description (PID05). F means Free-Form.
descriptionPID05SUNGLASSES YELLOW (F8C729)This is a freeform text field describing the product. It matches the description in the Purchase Order.

ACK Line Item Acknowledgment

The ACK loop contains the Line Item Acknowledgment, which specifies the action taken by the vendor and confirms the baseline item data that was sent as part of the original Purchase Order.

"ACK_loop": [
    {
        "lineItemAcknowledgment": [
            {
                "lineItemStatusCode": "IB",
                "quantity": "120",
                "unitOrBasisForMeasurementCode": "CA",
                "dateTimeQualifier": "068",
                "date": "20200915"
            }
        ]
    }
]
ACK*IB*120*CA*068*20200915~
JSON ElementX12 ElementValueDescription
lineItemStatusCodeACK01IBThis indicates the action taken by the vendor. IB means "Item Backordered"
quantityACK02120The quantity for this line item.
unitOrBasisForMeasurementCodeACK03CAThe unit of measurement for the quantity. In this case it is "case".
dateTimeQualifierACK04068The qualifier that describes the date value. In this case 068 means that the date is when the item is currently scheduled to ship.
dateACK0520200915The date associated with the code above.

CTT Transaction Totals

The CTT loop provides a summary of the order.

Each type of summary is included in one iteration of the CTT loop and is composed of one segment: Transaction Totals (CTT)

"CTT_loop": [
    {
        "transactionTotals": [
            {
                "numberOfLineItems": "2"
            }
        ]
    }
]
CTT*2~
JSON ElementX12 ElementValueDescription
numberOfLineItemsCTT011Specifies the number of line items.

Purchase Order Acknowledgment Structure

"interchangeControlHeader",                //Interchange Control Header (Optional for JSON)
  "functionalGroupHeader",                 //Functional Group Header (Optional for JSON)
  "transactionSets"
      "transactionSetHeader",              //Transaction Set Header (Optional for JSON)
                                
      //Header level
      "beginningSegmentForPurchaseOrderAcknowledgment",  //Beginning Segment for Purchase Order
      "referenceInformation",              //Reference Information
      "dateTimeReference",                 //Date/Time Reference (2 iterations)
    
      "N1_loop"                            //N1 Loop (2 iterations)
          "partyIdentification",           //Party Identification
          "partyLocation",                 //Party Location
          "geographicLocation",            //Geographic Location
      
      //Detail level
      "PO1_loop"                           //PO1 Loop (2 iterations)
          "baselineItemData",              //Baseline Item Data
          "PID_loop"                       //PID Loop
              "productItemDescription"     //Product/Item Description
          "ACK_loop"                       //Acknowledgment Loop
              "lineItemAcknowledgment"     //Line Item Acknowledgment 
    
      //Summary level
      "CTT_loop"                           //CTT Loop
          "transactionTotals",             //Transaction Totals
    
      "transactionSetTrailer"              //Transaction Set Trailer
ISA                                        //Interchange Control Header
.GS                                        //Functional Group Header

  ..ST                                       //Transaction Set Header

//Header level
...BEG                                     //Beginning Segment for Purchase Order Acknowledgment
...REF 	                                   //Reference Information
...DTM                                     //Date/Time Reference (2 iterations)

...(Hidden loop)                           //N1 Loop (2 iterations)
......↳ N1                                 //Party Identification
......↳ N3                                 //Party Location
......↳ N4                                 //Geographic Location

//Detail level
...(Hidden loop)                           //PO1 Loop (2 iterations)
......↳ PO                                 //Baseline Item Data	
......↳ (Hidden loop)                      //PID Loop
.........↳ PID                             //Product/Item Description
.........↳ ACK                             //Line Item Acknowledgment 

//Summary level
...(Hidden loop)                           //CTT Loop
......↳ CTT                                //Transaction Totals

..SE                                       //Transaction Set Trailer
.GS                                        //Functional Group Trailer
ISA                                        //Interchange Control Trailer