This document outlines the mapping between NetSuite objects and the EDI 880 Grocery Products Invoice format. The mapping is organized by EDI segments.
EDI Source Property | NetSuite Target Property | Description |
---|
invoiceIdentification.date | invoices[0].trandate | Invoice date, formatted from M/d/yyyy to yyyyMMdd |
invoiceIdentification.invoiceNumber | invoices[0].tranid | Invoice number |
invoiceIdentification.date1 | invoices[0].custbody_orderful_edi_po_date | PO date, formatted from M/d/yyyy to yyyyMMdd |
invoiceIdentification.purchaseOrderNumber | invoices[0].otherrefnum | Purchase order reference number |
invoiceIdentification.vendorOrderNumber | salesorders[0].tranid | Sales order transaction ID |
EDI Source Property | NetSuite Target Property | Description |
---|
extendedReferenceInformation.referenceIdentificationQualifier | "IA" | Fixed value qualifier code |
extendedReferenceInformation.referenceIdentification | invoices[0].custbody_orderful_n9_notes | Notes from the invoice |
EDI Source Property | NetSuite Target Property | Description |
---|
dateTime.dateQualifier | "11" | Fixed date qualifier code |
dateTime.date | invoices[0].shipdate | Ship date, formatted from M/d/yyyy to yyyyMMdd |
carrierDetails.transportationMethodTypeCode | "ZZ" | Fixed transportation method code |
carrierDetails.routing | invoices[0].shipcarrier | Shipping carrier information |
EDI Source Property | NetSuite Target Property | Description |
---|
termsOfSale.termsTypeCode | "01" | Fixed terms type code |
termsOfSale.termsBasisDateCode | "3" | Fixed terms basis date code |
termsOfSale.termsNetDueDate | invoices[0].duedate | Payment due date, formatted from M/d/yyyy to yyyyMMdd |
termsOfSale.termsNetDays | invoices[0].terms.daysuntilnetdue | Number of days until payment is due |
termsOfSale.amountSubjectToTermsDiscount | invoices[0].totalaftertaxes | Total amount after taxes |
termsOfSale.freeFormMessage | invoices[0].terms.name | Payment terms description |
EDI Source Property | NetSuite Target Property | Description |
---|
N1_loop[0].partyIdentification.entityIdentifierCode | "ST" | Fixed entity identifier for Ship-To |
N1_loop[0].partyIdentification.name | invoices[0].shippingaddress.addressee | Ship-to address contact name |
N1_loop[0].partyIdentification.identificationCodeQualifier | "92" | Fixed identification code qualifier |
N1_loop[0].partyIdentification.identificationCode | invoices[0].custbody_orderful_ship_dc_number | Ship-to distribution center number |
N1_loop[0].partyLocation.addressInformation | invoices[0].shippingaddress.addr1 | Ship-to address line 1 |
N1_loop[0].geographicLocation.cityName | invoices[0].shippingaddress.city | Ship-to city |
N1_loop[0].geographicLocation.stateOrProvinceCode | invoices[0].shippingaddress.state | Ship-to state |
N1_loop[0].geographicLocation.postalCode | invoices[0].shippingaddress.zip | Ship-to postal code |
N1_loop[0].geographicLocation.countryCode | invoices[0].shippingaddress.country | Ship-to country code |
EDI Source Property | NetSuite Target Property | Description |
---|
N1_loop[1].partyIdentification.entityIdentifierCode | "BT" | Fixed entity identifier for Bill-To |
N1_loop[1].partyIdentification.name | invoices[0].billingaddress.addressee or invoices[0].shippingaddress.addressee | Bill-to address contact name (falls back to shipping address if billing not available) |
N1_loop[1].partyIdentification.identificationCode | invoices[0].custbody_orderful_bill_dc_number | Bill-to distribution center number |
N1_loop[1].partyLocation.addressInformation | invoices[0].billingaddress.addr1 or invoices[0].shippingaddress.addr1 | Bill-to address line 1 (falls back to shipping address if billing not available) |
EDI Source Property | NetSuite Target Property | Description |
---|
N1_loop[2].partyIdentification.entityIdentifierCode | "SF" | Fixed entity identifier for Ship-From |
N1_loop[2].partyIdentification.name | customer.companyName | Company name |
EDI Source Property | NetSuite Target Property | Description |
---|
G72_loop.allowanceOrCharge.allowanceOrChargeCode | Lookup from $authorizedDiscounts | Allowance or charge code for discounts |
G72_loop.allowanceOrCharge.allowanceOrChargeMethodOfHandlingCode | "02" | Fixed handling code |
G72_loop.allowanceOrCharge.allowanceOrChargeTotalAmount | $abs($number(foreignamount)) | Absolute value of the discount amount (from lines with accountinglinetype="DISCOUNT") |
EDI Source Property | NetSuite Target Property | Description |
---|
G17_loop.itemDetail.quantityInvoiced | $abs($number(quantity)) | Absolute value of the quantity for non-discount line items |
G17_loop.itemDetail.unitOrBasisForMeasurementCode | custcol_orderful_units | Units of measurement for the item |
G17_loop.itemDetail.itemListCost | custcol_orderful_ordered_rate | Rate/price for the item |
G17_loop.itemDetail.number and G17_loop.itemDetail.productServiceID | $eval(custcol_orderful_item_identification).UPCCaseCode | UPC code for the item |
G17_loop.itemDetail.productServiceIDQualifier | "UP" | Fixed qualifier for UPC |
G17_loop.itemDetail.monetaryAmount | $abs($number(foreignamount)) | Absolute value of the line amount |
G17_loop.lineItemDetail.freeFormDescription | memo | Line item description |
EDI Source Property | NetSuite Target Property | Description |
---|
totalInvoiceQuantity.numberOfUnitsShipped | $sum(invoices[0].lines.($abs($number(quantity)))) | Sum of all line quantities |
totalInvoiceQuantity.unitOrBasisForMeasurementCode | invoices[0].lines[0].custcol_orderful_units | Unit of measurement from the first line item |
totalDollarsSummary.amount | invoices[0].totalaftertaxes | Total invoice amount after taxes |
-
The bill-to address has conditional logic:
- Uses billing address if available
- Falls back to shipping address with bill DC number if billing address is unavailable but DC number exists
- Omits the bill-to section entirely if neither condition is met
-
Discount lines are filtered using accountinglinetype="DISCOUNT"
and mapped to the G72 loop
-
Regular line items (non-discounts) are mapped to the G17 loop
-
Date formatting converts from M/d/yyyy format to yyyyMMdd format for EDI requirements