855 Purchase Order Acknowledgement

📄 NetSuite to EDI 855 Mapping Documentation

This document describes the mapping of fields from NetSuite Sales Orders into a JSON representation of an 855 EDI document.


🧾 Acknowledgment Header

NetSuite FieldEDI Field (JSON)Description
trandatebeginningSegmentForPurchaseOrderAcknowledgment[].datePurchase order date from the Sales Order.
Current DatebeginningSegmentForPurchaseOrderAcknowledgment[].date1Date of generating the 855 acknowledgment.
otherrefnumbeginningSegmentForPurchaseOrderAcknowledgment[].purchaseOrderNumberCustomer PO number from Sales Order.
(calculated)beginningSegmentForPurchaseOrderAcknowledgment[].acknowledgmentTypeCodeDerived from status of line items.

🔁 Reference Identifiers

NetSuite FieldEDI Field (JSON)Description
otherrefnumreferenceInformation[].referenceIdentification (PO)Customer PO Number.
tranidreferenceInformation[].referenceIdentification (Vendor)NetSuite Sales Order Number.
outboundConfig.vendorNumberreferenceInformation[].referenceIdentification (Vendor)Internal vendor number from config.
custbody_orderful_cust_order_numreferenceInformation[].referenceIdentification (Customer)Additional customer order reference from custom field.

🏢 Entity and Address Information

NetSuite FieldEDI Field (JSON)Description
Customer billing addressN1_loop[].EntityIdentifier.Bill_ToMapped using lib.netSuiteAddressToEDI.
Customer shipping addressN1_loop[].EntityIdentifier.Ship_ToIncludes optional DC number and ID qualifier.
Sales order location addressN1_loop[].EntityIdentifier.Ship_FromShip-from location on the sales order, includes location number.

📦 Line Items

NetSuite FieldEDI Field (JSON)Description
Sales Order line itemsPO1_loop[].baselineItemData[]Quantity is calculated based on individual or grouped line items.
itemId or upcCodeproductServiceIDUsed to match against product identifiers in the original 850.
orderedQuantitybaselineItemData[].quantityQuantity acknowledged for the item.
acknowledegmentStatusCodeACK_loop[].lineItemAcknowledgment[].lineItemStatusCodeItem-level acknowledgment status.
shipDateACK_loop[].lineItemAcknowledgment[].dateItem-level ship date. If provided, formatted to yyyyMMdd.
changeReasonN9_loop[].text[].textualDataNotes about reason for any change/rejection in acknowledgment.

🔁 SLN / Kits Handling

NetSuite FieldEDI Field (JSON)Description
Kit Reference (via groupLineItemsByKit)SLN_loop[]Kit-based grouping if enabled. Items are grouped and mapped per SLN format.
Calculated from line item + SLN matchbaselineItemData[].quantityQuantity calculated using calculateKitQuantity.

💲 Currency

NetSuite FieldEDI Field (JSON)Description
Fixed: USDcurrency[].currencyCodeCurrency used for acknowledgment.
Fixed: Sellercurrency[].entityIdentifierCodeIndicates seller perspective.