850 Purchase Order

📄 EDI 850 to NetSuite Sales Order Mapping Documentation

This document maps fields from an inbound EDI 850 Purchase Order document to a NetSuite Sales Order, detailing how each EDI field translates into NetSuite record fields.


🧾 Header Mapping

EDI Field (JSON)NetSuite FieldDescription
beginningSegmentForPurchaseOrder.purchaseOrderNumberotherrefnumCustomer’s PO number.
beginningSegmentForPurchaseOrder.datecustbody_orderful_edi_po_date, trandatePO date, optionally used as the order date if configured.
(current date)trandateDefaults to today unless overridden by config.
contacts.orderContact.emailemailOrder contact email.
entityNetSuiteId (lookup)entityInternal customer entity ID in NetSuite.
ediServiceCode, ediCarrierId, ediRoutingcustbody_orderful_edi_service, custbody_orderful_edi_carrier, custbody_orderful_edi_routingCarrier and routing info from EDI.
departmentNumbercustbody_orderful_department_numberDepartment number (custom).
customerOrderNumbercustbody_orderful_cust_order_numAdditional customer-facing order number.
earliestDelivery, latestDeliverycustbody_orderful_earliest_delivery, custbody_orderful_latest_deliveryDelivery window info.
N1_loop[].EntityIdentifier.Ship_Tocustbody_orderful_n1_shiptoJSON representation of the ship-to party.
N1_loop[].EntityIdentifier.Bill_Tocustbody_orderful_n1_billtoJSON representation of the bill-to party.
EDI Transaction Typecustbody_orderful_documentLinked to the internal Orderful transaction ID.

🏢 Address Handling

EDI Field (JSON)NetSuite FieldDescription
shippingAddress, shipToIdshippingaddress or shipaddresslistBased on whether the address is direct or referenced via a DC ID.
billingAddress, ediIdbillingaddress or billaddresslistSame as above for billing.
shipToId, if used as DCcustbody_orderful_ship_dc_numberCaptures the distribution center number.
billingAddress.ediId, if used as DCcustbody_orderful_bill_dc_numberCaptures the billing DC number.

🔁 Reference Identifiers

EDI Field (JSON)NetSuite FieldDescription
referenceInformation[].referenceIdentification (PO)otherrefnumPO number from EDI.
referenceInformation[].referenceIdentification (Vendor)tranidSales Order ID if used for traceability.
referenceInformation[].referenceIdentification (Customer)custbody_orderful_cust_order_numAdditional customer-facing order number.

📦 Line Items

EDI Field (JSON)NetSuite FieldDescription
PO1_loop[].quantityquantityOrdered quantity.
PO1_loop[].priceratePrice or rate, if EDI pricing is enabled.
PO1_loop[].productServiceIDcustcol_orderful_item_identificationOriginal product identifiers (JSON format).
PO1_loop[].lineItemChange.lineItemStatusCodecustcol_orderful_line_refLine reference or change status tracking.
ACK_loop[].dateshipdateRequested ship date, parsed from the EDI format.
N9_loop[].text[].textualDatacustbody_orderful_n9_notesNotes and comments pulled from the N9 loop.
SLN_loop[] (kit reference)custcol_orderful_kit_ref / custcol_orderful_kits_countUsed for kits and component breakdowns.

💲 Discounts and Adjustments

EDI Field (JSON)NetSuite FieldDescription
SAC_loop[]discountitem, discountrate, custbody_orderful_discount_itemIf only one discount applies. Others added as line items.
Discount lines in item-level SACDiscount line itemsDiscount lines added as NetSuite line items if more than one is present.

🔄 Custom Mappings

EDI Field (Custom/Derived)NetSuite Field (via plugin or SDF map)Description
Any customrecord_orderful_edi_field_map_headMapped dynamically to header fieldsCustom header field mapping via SuiteQL.
Any customrecord_orderful_edi_field_map_lineMapped dynamically to line fieldsCustom line-level field mapping via SuiteQL.

Let me know if you'd like to export this or generate similar mappings for other EDI transactions!