Table of contents
The Grocery Products Invoice is an industry-specific transaction used by suppliers to bill retailers, wholesalers, and distribution centers for delivered grocery and consumer packaged goods (CPG). As part of the ANSI X12 standard, this message supports high-volume, item-level invoicing and replaces paper invoices with a structured, electronic format.
Suppliers typically send the Grocery Products Invoice after shipment and receipt of goods, following transactions such as the purchase order and advance ship notice. The invoice communicates key billing details, including products delivered, quantities, pricing, allowances, discounts, taxes, and the total amount due. It also supports grocery-specific pricing models such as promotional discounts, off-invoice allowances, and bill-back arrangements.
By standardizing invoice data exchange, the Grocery Products Invoice enables automated accounts payable processing and improves alignment between suppliers and customers. It supports three-way matching with purchase orders and shipment data, reduces manual entry and pricing discrepancies, and provides better visibility into financial transactions.
By streamlining invoicing operations, the Grocery Products Invoice improves accuracy, accelerates payment cycles, and supports efficient, high-volume supply chain processes.
Grocery Products Invoice (X12)
The Grocery Products Invoice is serving the grocery industry and supports high-volume, item-level invoicing requirements common in food and consumer packaged goods (CPG) distribution.
Contact your TraceLink Services representative for more information about integrating with this message.
- Message Type: MPC_GROCERY_PRODUCTS_INVOICE
- X12 Format: X12 880
-
Transform Names:
- B2B_EDI_X12_880_GroceryProductsInvoice_IB_V1
B2B_EDI_X12_880_GroceryProductsInvoice_OB_V1
| Input Element | Occurs | Length | Description | Example | |||||
|---|---|---|---|---|---|---|---|---|---|
| ISA | 1…1 | - | Required. ISA interchange envelope. | - | |||||
| ISA01 | 1…1 | 2/2 | Required. Qualifier for authorization control number in ISA02. Valid values :
| 00 | |||||
| ISA02 | 1…1 | 10/10 | Required. Information used for additional identification or authorization of the interchange sender or the data in the interchange/ 10 spaces a valid entry. | - | |||||
| ISA03 | 1…1 | 2/2 | Required. Qualifier for security information in ISA04. Valid values:
| 00 | |||||
| ISA04 | 1…1 | 10/10 | Required. Identifies security information about the interchange sender or data. | - | |||||
| ISA05 | 1…1 | 2/2 | Required. Interchange sender partner ID qualifier.
| 07 | |||||
| ISA06 | 1…1 | 15/15 | Required. EDI sender ID mapping to file control header and to ServiceLinkId (see row 23). | 7777776067344 | |||||
| ISA06 | - | - | EDI sender ID mapping to Interchange control group header | 7777776067344 | |||||
| ISA07 | 1…1 | 2/2 | Required. Interchange receiver partner ID qualifier.
| 07 | |||||
| ISA08 | 1…1 | 15/15 | Required. EDI receiver ID mapping to file control header. | 888888404358877 | |||||
| ISA09 | 1…1 | 6/6 | Required. Interchange date in 6 char YYMMDD format. | 260620 | |||||
| ISA10 | 1…1 | 4/4 | Required. Interchange time in 4 char HHMM format. | 1420 | |||||
| ISA11 | 1…1 | 1/1 | Required. Repetition separator. Delimiter that separates repeated occurrences of a data element or composite data structure. Must be different than the data element separator, component separator, and segment terminator | : | |||||
| ISA12 | 1…1 | 5/5 | Required. Interchange control version number. Valid value = “00401” | 00501 | |||||
| ISA13 | 1…1 | 9/9 | Required. Interchange Control Number for file control header. | 0000000000619827 | |||||
| ISA14 | 1…1 | 1/1 | Required. Interchange level acknowledgment requested. Valid values:
| 0 | |||||
| ISA15 | 1…1 | 1/1 | Required. Indicates whether the interchange is for production, test, or information purposes. Valid values:
| P | |||||
| ISA16 | 1…1 | 1/1 | Required. Component element separator. Delimiter that separates data elements within a composite data structure. Must be different than the data element separator and segment terminator. | > | |||||
| GS | 1…1 | - | Required. GS group functional envelope. Child of ISA. Only one GS group expected per interchange. | - | |||||
| GS01 | 1…1 | 2/2 | Required. GS group function code. Valid value:
| GP | |||||
| GS02 | 1…1 | 2/15 | Required. Application Sender's Code. | 2222224043588 | |||||
| GS03 | 1…1 | 2/15 | Required. Application Receiver's Code. | TRACELINK | |||||
| GS04 | 1…1 | 8/8 | Required. Current date stamp in 8 char X12 date format YYYYMMDD. | 260620 | |||||
| GS05 | 1…1 | 4/8 | Required. Current time stamp in 6 char X12 time format HHMMSS. | 142000 | |||||
| GS06 | 1…1 | 1/9 | Required. Group Control ID Number. | 619827 | |||||
| GS07 | 1…1 | 1/2 | Required. Responsible Agency Code. Valid value = X. | X | |||||
| GS08 | 1…1 | 1/12 | Required. X12 message version code. Valid value = 004010. | 005010 | |||||
| ST | 1…* | - | ST transaction set envelope. Child of GS group. Only one ST transaction expected. | - | |||||
| ST01 | 1…1 | 3/3 | Required. Transaction set identifier code. | 880 | |||||
| ST02 | 1…1 | 4/9 | Required. Transaction set ID number. Counter for each ST segment beginning with 1. | 1 | |||||
| G01 | 1…1 | - | Required. Beginning segment for Grocery Invoice. | - | |||||
| G0101 | 1…1 | 8/8 | Required. Invoice date in X12 date format YYYYMMDD. | 20260620 | |||||
| G0102 | 1…1 | 1/22 | Required. Invoice number. | 006733288 | |||||
| G0103 | 0…1 | 8/8 | Purchase order date in X12 date format YYYYMMDD. | '20260618 | |||||
| G0104 | 0…1 | 1/22 | Purchase order number. | 466733288 | |||||
| G0105 | 0…1 | 1/22 | Purchase order number. | 466733288 | |||||
| N9 | 0…* | - | Reference segment for mapping to the transaction references. | - | |||||
| N901 | 1…1 | 2/3 | Required. Reference identification qualifier for the contract class.
| CT | |||||
| N902 | 0…1 | 1/80 | Reference identifier value. | 123456 | |||||
| N903 | 0…1 | 1/45 | Description defined by qualifier code in N902. | sub-340B | |||||
| N904 | 0…1 | 8/8 | Date expressed as CCYYMMDD where CC represents the first two digits of the calendar year. | 20241215 | |||||
| N905 | 0…1 | 4/8 | Time. | 121314 | |||||
| G62 | 0…5 | - | Date and time segment for purchase order. | - | |||||
| G6201 | 0…1 | 2/2 | Date/Time qualifier identifying shipment date.
| 011 | |||||
| G6202 | 0…1 | 8/8 | Date in X12 date format YYYYMMDD for purchase order. | 20260620 | |||||
| G6203 | 0…1 | 4/8 | Time qualifier. | - | |||||
| G6204 | 0…1 | 4/8 | Time in HHMMSS or HHMM format for shipment or delivery date of sending party. | - | |||||
| NTE | 0…20 | - | Note and/or special instructions for Invoice. | - | |||||
| NTE01 | 0…1 | 3/3 | NTE reference code identifying the functional area or purpose for which the note applies. | INV | |||||
| NTE02 | 1…1 | 1/80 | Required. Free-form description for the note or special instructions. | RANCHO DOMINGUEZ CA | |||||
| G27 | 0…5 | - | Invoice related carrier information, either G27 (=4060) segment will present, map to target any one of them. | - | |||||
| G2701 | 1…1 | 1/2 | Required. Transportation method type code identifying the method or type of transport to be used for delivery of the order.
| M | |||||
| G2702 | 0…1 | 1/4 | Equipment prefix. | SC | |||||
| G2703 | 0…1 | 1/10 | Equipment unique identifier. | 1234 | |||||
| G2704 | 0…1 | 2/4 | Equipment owner Standard carrier alpha code (SCAC code). | SCAC | |||||
| G2705 | 0…1 | 1/35 | Descriptive information about routing. | - | |||||
| G2706 | 0…1 | 2/2 | Indicate transaction level whether any difference in order and shipped quantities. | SH | |||||
| CAD | 0…5 | - | Invoice related carrier information, either G27 (=4060) segment will present, map to target any one of them. | - | |||||
| CAD01 | 1…1 | 1/2 | Required. Transportation method type code identifying the method or type of transport to be used for delivery of the order.
| M | |||||
| CAD02 | 0…1 | 1/4 | Equipment prefix. | SC | |||||
| CAD03 | 0…1 | 1/15 | Equipment unique identifier. | 1234 | |||||
| CAD04 | 0…1 | 2/4 | Equipment owner Standard carrier alpha code (SCAC code). | SCAC | |||||
| CAD05 | 0…1 | 1/35 | Descriptive information about routing. | - | |||||
| CAD06 | 0…1 | 2/2 | Indicate transaction level whether any difference in order and shipped quantities. | AA | |||||
| CAD07 | 0…1 | 2/3 | Reference identification qualifier for the contract class.
| BM | |||||
| CAD08 | 0…1 | 1/80 | Reference identifier value. | 123456 | |||||
| G23 | 0…20 | - | Terms of payment. | - | |||||
| G2301 | 1…1 | 2/2 | Required. Terms of sale type code. Identifies type of payment code. Valid values:
| 01 | |||||
| G2302 | 1…1 | 1/2 | Required. Terms of sale basis code. Identifies beginning of the terms of payment code. Valid values:
| 3 | |||||
| G2303 | 0…1 | 8/8 | The date when the payment terms begin (i.e. when the countdown for due dates or discounts starts) | 20260620 | |||||
| G2304 | 0…1 | 2/2 | How the due date is designated—what rule or reference determines when payment is due. Valid values:
| 3 | |||||
| G2305 | 0…1 | 1/6 | Percentage of discount available to the purchaser if an invoice is paid on or before the terms of payment discount due date. | 1.25 | |||||
| G2306 | 0…1 | 8/8 | Discount due date in X12 date format YYYYMMDD. | 20260620 | |||||
| G2307 | 0…1 | 1/3 | Number of days payment is due within discount period to qualify for the discount. | - | |||||
| G2308 | 0…1 | 8/8 | Terms net due date. Date when the invoice total amount is due in X12 date format YYYYMMDD. | 20260620 | |||||
| G2309 | 0…1 | 1/3 | Number of days total invoice payment is due where no discount is applicable. | 30 | |||||
| G2310 | 0…1 | 1/10 | Total terms discount amount | 1020 | |||||
| G2311 | 0…1 | 1/10 | The actual amount the buyer needs to pay if it paid by the discount date. | 1000 | |||||
| G2312 | 0…1 | 1/10 | The base amount upon which the total term discount amount is calculated (this may not be equal to total invoice amount). | 1030 | |||||
| G2314 | 0…1 | 1/5 | Amount of invoice payable expressed in percent. | 10.5 | |||||
| G2315 | 0…1 | 1/60 | Free-form text or description for terms of payment. | 30 days payable in full | |||||
| G25 | 0…1 | - | FOB information, method of freight payment details. | - | |||||
| G2501 | 1…1 | 2/2 | Required. Shipment method of payment code that identifies the payment terms for transportation charges. Valid values:
| PB | |||||
| G2502 | 1…1 | 2/2 | Required. FOB point code. Valid values:
| 01 | |||||
| G2503 | 0…1 | 1/30 | Descriptive name of F.O.B point. | Location name | |||||
| N1 Loop | 1…* | - | N1 segment loop. | - | |||||
| N1 | 1…1 | - | Required. Party identification. | - | |||||
| N101 | 1…1 | 2/3 | Required. Entity qualifier for the Sender or Receiver party identifier and address information.
| SU | |||||
| N102 | 0…1 | 1/60 | Name. | Pharma customer | |||||
| N103 | 0…1 | 1/2 | Identifier code qualifier. Valid values:
| UL | |||||
| N104 | 0…1 | 2/80 | Party identifier as qualified by N103 mapping to companyIdentifierValue. | 3333331013655 | |||||
| N2 | 0…1 | - | N2: Additional names: Child of customer party N1 name segment., we do support one iteration of N2. | - | |||||
| N201 | 1…1 | 1/60 | Required. Additional name 2. | Pharma name2 | |||||
| N202 | 0…1 | 1/60 | Additional name 2. | Pharma name2 | |||||
| N3 | 0…2 | - | N3: Address: Child of customer party N1 name segment. | - | |||||
| N301 | 1…1 | 1/55 | Required. Street address 1. | 555 Neelan Road | |||||
| N302 | 0…1 | 1/55 | Street address 2. | Suite 123 | |||||
| N4 | 0…1 | - | N4: Geographic Location. Child of customer party N1 name segment. | - | |||||
| N401 | 0…1 | 2/30 | City name | Sacramento | |||||
| N402 | 0…1 | 2/2 | State or province code. Code (Standard state/province) as defined by appropriate government agency. | CA | |||||
| N403 | 0…1 | 3/15 | Postal code. Code defining international postal zone code excluding punctuation and blanks. | 95833 | |||||
| N404 | 0…1 | 2/3 | Country code. | US | |||||
| N405 | 0…1 | 1/2 | Type of location. | CA | |||||
| N406 | 0…1 | 1/30 | Specific location. | 95833 | |||||
| N407 | 0…1 | 1/3 | Country subdivision. | US | |||||
| G72 | 0…* | - | Allowance or charge information loop group. | - | |||||
| G72 | 0…1 | - | Allow or charge group. | - | |||||
| G7201 | 1…1 | 1/3 | Required. Allowance or charge code identifying the type of allowance or charge in the purchase order.
| 6 | |||||
| G7202 | 1…1 | 2/2 | Required. Allowance or charge method of handling code.
| CC | |||||
| G7203 | 0…1 | 1/16 | Allowance or charge identifier assigned by a vendor referencing an allowance, promotion, deal, or charge. | 58547859 | |||||
| G7204 | 0…1 | 1/16 | The unique number identifies an exception or modification to an offered or existing promotion. | 1234 | |||||
| G7205 | 0…1 | 1/15 | Allowance or charge rate per unit. | 12.5 | |||||
| G7206 | 0…1 | 1/10 | Allowance or charge quantity when the allowance or charge is different from the purchase order. | 100 | |||||
| G7207 | 0…1 | 2/2 | Unit of measure for allowance or charge basis quantity.
| EA | |||||
| G7208 | 0…1 | 1/15 | Allowance or charge total amount. | 201.45 | |||||
| G7209 | 0…1 | 1/6 | Allowance or charge percentage. | 10.5 | |||||
| G7210 | 0…1 | 1/9 | Dollar basis for percentage. | 10.5 | |||||
| G73 | 0…10 | - | Allowance or charge description. | - | |||||
| G7301 | 1…1 | 1/45 | Required. Free form description for the allowance or charge. | Credit payment | |||||
| G17 | 0…* | - | Line item details for grocery invoice. | - | |||||
| G17 | 0…1 | - | Item details invoice, qty,product id, amount | - | |||||
| G1701 | 1…1 | 1/15 | Required. Number of Invoiced units. | 200 | |||||
| G1702 | 1…1 | 2/2 | Required. Unit of measure for invoiced quantity.
| EA | |||||
| G1703 | 0…1 | 1/9 | Item list cost. Gross unit price for the item. | 200.00 | |||||
| G1704 | 0…1 | 1/9 | UPC case code. | 001458569841 | |||||
| G1705 | 1…1 | 2/2 | Required. Product service ID qualifier mapping from global standards enum list.
| UK | |||||
| G1706 | 1…1 | 1/80 | Required. Product or service identifier. Should be the same identifiers that will be used in the invoice. | 20041415558735 | |||||
| G1707 | 0…1 | 2/2 | Product service ID qualifier mapping from global standards enum list.
| PI | |||||
| G1708 | 0…1 | 1/80 | Product or service identifier. Should be the same identifiers that will be used in the invoice. | 37942 | |||||
| G1710 | 0…1 | 1/10 | Number of units shipped. | 11 | |||||
| G1711 | 0…1 | 2/2 | Units shipped unit or Basis for Measurement Code.
| EA | |||||
| G69 | 0…5 | - | Line item detail description. | - | |||||
| G6901 | 1…1 | 1/45 | Required. Item description. | - | |||||
| G19 | 0…10 | - | Number of items shipped and uom of it, this details either it can be found in G17 or G19. G17 will take precedence. | - | |||||
| G1901 | 0…1 | 1/10 | Number of units shipped. | 11 | |||||
| G1902 | 0…1 | 2/2 | Units shipped unit or Basis for Measurement Code.
| EA | |||||
| G20 | 0…1 | - | Item packing details | - | |||||
| G2001 | 0…1 | 1/6 | Pack. The number of inner containers, or number of eaches if there are no inner containers, per outer container. | 10 | |||||
| G2002 | 0…1 | 1/8 | Pack Size/weight/volume of each unit. | 1 | |||||
| G2003 | 0…1 | 2/2 | Unit or Basis for Measurement Code. Size or weight or volume of each unit.
| OZ | |||||
| G2009 | 0…1 | 1/6 | Inner pack. The number of eaches per inner container. | 12 | |||||
| N9(2) | 0…* | - | Reference segment for mapping to the transaction references. | - | |||||
| N901 | 1…1 | 2/3 | Required. Reference identification qualifier for the contract class.
| RF | |||||
| N902 | 0…1 | 1/80 | Reference identifier value. | 123456 | |||||
| N903 | 0…1 | 1/45 | Description defined by qualifier code in REF02. | - | |||||
| N904 | 0…1 | 8/8 | Date expressed as CCYYMMDD where CC represents the first two digits of the calendar year. | 20241215 | |||||
| N905 | 0…1 | 4/8 | Time. | 121314 | |||||
| G72 | 0…* | - | Allowance or charge information loop group. | .- | |||||
| G72 | 0…1 | - | Allow or charge group. | - | |||||
| G7201 | 1…1 | 1/3 | Required. Allowance or charge code identifying the type of allowance or charge in the purchase order.
| 6 | |||||
| G7202 | 1…1 | 2/2 | Required. Allowance or charge method of handling code.
| CC | |||||
| G7203 | 0…1 | 1/16 | Allowance or charge identifier assigned by a vendor referencing an allowance, promotion, deal, or charge. | 58547859 | |||||
| G7204 | 0…1 | 1/16 | The unique number identifies an exception or modification to an offered or existing promotion. | 1234 | |||||
| G7205 | 0…1 | 1/15 | Allowance or charge rate per unit. | 12.5 | |||||
| G7206 | 0…1 | 1/10 | Allowance or charge quantity when the allowace or charge is different from the purchase order. | 100 | |||||
| G7207 | 0…1 | 2/2 | Unit of measure for allowance or charge basis quantity.
| EA | |||||
| G7208 | 0…1 | 1/15 | Allowance or charge total amount | 201.45 | |||||
| G7209 | 0…1 | 1/6 | Allowance or charge percentage. | 10.5 | |||||
| G7210 | 0…1 | 1/9 | Dollar basis for percentage. | 10.5 | |||||
| G73 | 0…10 | - | Allowance or charge description. | - | |||||
| G7301 | 1…1 | 1/45 | Required. Free form description for the allowance or charge. | Credit payment | |||||
| G31 | 1…1 | - | Required. Transaction Total invoice quantity. | - | |||||
| G3101 | 1…1 | 1/10 | Required. Number of units invoiced (supplier units). | - | |||||
| G3102 | 1…1 | 2/2 | Required. Unit or Basis for Measurement Code.
| LB | |||||
| G3103 | 0…1 | 1/10 | Total weight of ordered product. | 111 | |||||
| G3104 | 0…1 | 2/2 | Unit of measure for total weight.
| LB | |||||
| G3105 | 0…1 | 1/8 | Total volume of ordered product. | 6 | |||||
| G3106 | 0…1 | 2/2 | Unit of measure for total volume of ordered product.
| CF | |||||
| G33 | 1…1 | - | Required. Total invoice amount, including charges less allowances, before terms discount. | - | |||||
| G3301 | 1…1 | 1/15 | Required. Total invoice amount. | 6 | |||||
| SE | 1…1 | - | Required. ST … SE transaction set trailer envelope. Child of GS group. Only one ST transaction expected. | - | |||||
| SE01 | 1…1 | 1/10 | Required. Total count of segments in ST … SE transaction set including ST and SE segments. | 10 | |||||
| SE02 | 1…1 | 4/9 | Required. Transaction set control number. | 1 | |||||
| GE | 1…1 | - | Required. GS … GE functional group trailer envelope. Child of ISA interchange. Only one GS group expected. | - | |||||
| GE01 | 1…1 | 1/6 | Required. Number of transaction sets in functional group | 5 | |||||
| GE02 | 1…1 | 1/9 | Required. Functional group control number | 619827 | |||||
| IEA | 1…1 | - | Required. ISA … IEA interchange control trailer envelope. Only one interchange expected per transmission. | - | |||||
| IEA01 | 1…1 | 1/5 | Required. Number of functional groups in interchange. | 1 | |||||
| IEA02 | 1…1 | 9/9 | Required. Interchange control number. | 0000000000619827 | |||||
ISA*00*01 *00*11 *01*7777776067344 *07*888888404358877*241020*1348*^*00401*000619827*0*P*:~
GS*GP*7777776067344*888888404358877*20241020*142000*619827*X*005010~
ST*880*0001*s23~
G01*20260620*006733288*20260620*466733288*466733288~
N9*SI*123456*sub-340B*20260402*165414~
N9*BN*DP_1111*sub-340B*20260402*16541412~
G62*11*20260402*0*1122~
NTE*INV*RANCHO DOMINGUEZ CA~
G27*M*SC*1234*SCAC*Vent setting temp to be maintained*SH~
CAD*M*SC*1234*SCAC*s34*SH*BM*123456~
G23*01*3*20260402*03*1.25*20260402*48*20260402*30*1020*1000*1030**10.5*30 days payable in full~
G25*PB*01*Location Name~
N1*SU*SU_Name*54*3333331013655~
N2*SU_AddName*SU_Address3~
N3*SU_Address1*SU_Address2~
N4*SU_City*CA*95833*US*CA*95833*US~
G72*6*CC*58547859*1234*12.5*100*EA*20145*10.5*10.5~
G73*Credit Payment~
G17*200*EA*200.00*458569841*UK*20041415558735*PI*37942**11*EA~
G69*Desc1~
G19*11*EA~
G20*10*1*OZ******100~
N9*SI*123456*sub-340B*20260402*165414~
N9*BN*DP_1111*sub-340B*20260402*16541412~
G72*6*CC*58547859*1234*12.5*100*EA*20145*10.5*10.5~
G73*Credit Payment~
G31*2*LB*111*LB*6*CF~
G33*6~
SE*26*s123~
GE*124*619827~
IEA*126*000619827~
Review TraceLink's API: Terms of Use