Below is a summary of how all the current fields are mapped from the above entities into an outbound 856.
Header Information
Level
Orderful Field
NetSuite Field
Notes
Header
sender.isaId
{{NetSuite: ISA or Test ISA}}
Interchange sender ID
Header
receiver.isaId
{{NetSuite: Partner ISA or Test ISA}}
Interchange receiver ID
Header
type.name
-
Fixed value: 856_SHIP_NOTICE_MANIFEST
Header
stream
{{NetSuite Mode}}
Test or Production
Beginning Segment (BSN)
Level
EDI Segment
Orderful Field
NetSuite Field
Notes
TransactionSets[0]
beginningSegmentForShipNotice
transactionSetPurposeCode
'00'
Hardcoded
TransactionSets[0]
beginningSegmentForShipNotice
shipmentIdentification
itemFulfillments[0].tranid
TransactionSets[0]
beginningSegmentForShipNotice
date
format(currentDate, DateTimeFormat.yyyyMMdd)
currentDate = new Date()
TransactionSets[0]
beginningSegmentForShipNotice
time
format(currentDate, DateTimeFormat.HHmmss)
currentDate = new Date()
TransactionSets[0]
beginningSegmentForShipNotice
hierarchicalStructureCode
'0001'
Date/Time Reference (DTM at Header Level)
Level
EDI Segment
Orderful Field
NetSuite Field
Notes
TransactionSets[0]
DTM
dateTimeQualifier
Orderful.DateTimeQualifier.Shipped
Value = '011'
TransactionSets[0]
DTM
date
format(shipDate, DateTimeFormat.yyyyMMdd)
shipDate = itemFulfillments[0].trandate
Shipment Level (HL "S")
Note: There may be multiple item fulfillments associated with an 856. Everywhere in the shipment level that itemFulfillment is referenced, the code uses the first item fulfillment found. This is because it is assumed that every item fulfillment associated with an 856 has the same shipping information.
Party Identification (N1 loop at Shipment Level) - Warehouse Address
Note: First iteration of N1_loop uses the warehouse address that is joined to the Ordered Item.
Level
EDI Segment
Orderful Field
NetSuite Field
Notes
TransactionSets[0].Hl_Loop[].N1_loop[]
partyLocation
addressInformation
orderedItems[0].warehouseAddress.addr1
TransactionSets[0].Hl_Loop[].N1_loop[]
geographicLocation
cityName
orderedItems[0].warehouseAddress.city
TransactionSets[0].Hl_Loop[].N1_loop[]
geographicLocation
stateOrProvinceCode
orderedItems[0].warehouseAddress.state
TransactionSets[0].Hl_Loop[].N1_loop[]
geographicLocation
postalCode
orderedItems[0].warehouseAddress.zip
TransactionSets[0].Hl_Loop[].N1_loop[]
geographicLocation
countryCode
orderedItems[0].warehouseAddress.country
TransactionSets[0].Hl_Loop[].N1_loop[]
geographicLocation
locationIdentifier
orderedItems[0].warehouseAddress.country
TransactionSets[0].Hl_Loop[].N1_loop[]
geographicLocation
locationQualifier
“CC”
TransactionSets[0].Hl_Loop[].N1_loop[]
partyIdentification
entityIdentifierCode
EntityIdentifier.Ship_From
“SF”
TransactionSets[0].Hl_Loop[].N1_loop[]
partyIdentification
name
orderedItems[0].warehouseAddress.warehouseName
TransactionSets[0].Hl_Loop[].N1_loop[]
partyIdentification
identificationCodeQualifier
IdentificationCodeQualifier.Buyer_Assigned
“92”
TransactionSets[0].Hl_Loop[].N1_loop[]
partyIdentification
identificationCode
orderedItems[0].warehouseAddress.warehouseCode
Party Identification (N1 loop at Shipment Level) - Shipping Address
Note: Second iteration of N1_loop uses the shipping address that is attached to the item Fulfillment.
Level
EDI Segment
Orderful Field
NetSuite Field
Notes
TransactionSets[0].Hl_Loop[].N1_loop[]
partyLocation
addressInformation
itemFulfillment.shippingAddress.addr1
TransactionSets[0].Hl_Loop[].N1_loop[]
geographicLocation
cityName
itemFulfillment.shippingAddress.city
TransactionSets[0].Hl_Loop[].N1_loop[]
geographicLocation
stateOrProvinceCode
itemFulfillment.shippingAddress.state
Order Level (HL "O")
Note: One iteration of the Order Level loop is created per item fulfillment with cartons. orderedLineItems represents the items belonging to the fulfillment which this instance is created from.
If Pallet HL generated, pallet ID + 1, otherwise orderId + 1
Incremental counter
TransactionSets[0].Hl_Loop[]
hierarchicalLevel
hierarchicalParentIDNumber
ID of Parent Pallet, or Order Level if not using Pallets
Reference to parent HL
TransactionSets[0].Hl_Loop[]
hierarchicalLevel
hierarchicalLevelCode
“P”
Fixed value "P" for pack level
Pack Carrier Details (TD1)
Note: Up to two iterations depending on whether pallets and/or packs are present. This carrier details segment only represents the details in a single carton.
Incremental counter, Pack level ID + other item level index in pack + 1 if sending with Packs
TransactionSets[0].Hl_Loop[]
hierarchicalLevel
hierarchicalParentIDNumber
{{ID of Parent Pallet or Pack}}
Reference to parent HL
TransactionSets[0].Hl_Loop[]
hierarchicalLevel
hierarchicalLevelCode
“I”
Fixed value "I" for item level
Item Identification (LIN)
Note: This segment is populated either using kit information or item information. ProductServiceIdQualifiers are copied from the ordered items if they exist, otherwise they are populated with the item's UPC and SKU. These values come from the PO1 loop from the originating 850.
Note: Only populated if Kits are being used, one instance per item associated with the kit. Similar to the itemIdentification segment, this will bring in productServiceIdQualifier / productServiceId pairs from the PO1 loop in the original 850.
packedKitsCount is the total number of kits in the shipment, so this references the number of items in a single kit.
TransactionSets[0].Hl_Loop[]
sublineItemDetail
SLN0501
unitOrBasisForMeasurementCode
Units.Each
“EA”
TransactionSets[0].Hl_Loop[]
sublineItemDetail
SLN09
productServiceIDQualifier
ProductServiceQualifier.Vendor_Number (“VN”)
Note that these productServiceIdQualifiers and productServiceIds will only be populated if their corresponding values exist. Additionally, they will be overridden if there are productServiceIds and productServiceIdQualifiers attached to the items (taken from 850 PO1 loop).
TransactionSets[0].Hl_Loop[]
sublineItemDetail
SLN10
productServiceID
orderedItem.itemId
TransactionSets[0].Hl_Loop[]
sublineItemDetail
SLN11
productServiceIDQualifier1
ProductServiceQualifier.UPC (“UP”)
TransactionSets[0].Hl_Loop[]
sublineItemDetail
SLN12
productServiceID1
orderedItem.upcCode
TransactionSets[0].Hl_Loop[]
sublineItemDetail
SLN13
productServiceIDQualifier2
ProductServiceQualifier.SKU
TransactionSets[0].Hl_Loop[]
sublineItemDetail
SLN14
productServiceID2
orderedItem.sku
TransactionSets[0].Hl_Loop[]
sublineItemDetail
...
(more incrementing productServiceId<int> and productServiceIdQualifier<int> pairs)
-
Potentially more productServiceId<int> and productServiceIdQualifier<int> pairs depending on items assigned identifiers.
Purchase Order Reference
Level
EDI Segment
Orderful Field
NetSuite Field
Notes
TransactionSets[0].Hl_Loop[]
purchaseOrderReference
purchaseOrderNumber
itemFulfillment.purchaseOrderNumber
Item Physical Details
Level
EDI Segment
Orderful Field
NetSuite Field
Notes
TransactionSets[0].Hl_Loop[]
itemPhysicalDetails
pack
“1”
Hardcoded “1”
Product Item Description
Note: Only populated if orderedItems[0].description has a value.
Level
EDI Segment
Orderful Field
NetSuite Field
Notes
TransactionSets[0].Hl_Loop[]
productItemDescription
itemDescriptionTypeCode
“F”
Hardcoded “F”
TransactionSets[0].Hl_Loop[]
productItemDescription
productProcessCharacteristicCode
“08”
Hardcoded “08”
TransactionSets[0].Hl_Loop[]
productItemDescription
description
orderedItems[0].description
Reference Information
Note: Empty Array
Marks and Numbers Information
Level
EDI Segment
Orderful Field
NetSuite Field
Notes
TransactionSets[0].Hl_Loop[]
marksAndNumbersInformation
itemDescriptionTypeCode
MarksAndNumbersQualifier.Mutually_Defined
“ZZ”
TransactionSets[0].Hl_Loop[]
marksAndNumbersInformation
marksAndNumbers
pack.trackingNumber
Hardcoded “08”
Date/Time Reference (DTM at item level)
Note: Empty Array
Transaction Totals (CTT) - Header level
Level
EDI Segment
Orderful Field
NetSuite Field
Notes
TransactionSets[0]
transactionTotals
numberOfLineItems
hlLoop.length
TransactionSets[0]
transactionTotals
hashTotal
getTotalUnitsFromCartons(cartons)
Sum of all packed quantities amongst all items within cartons in the entire 856.