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.
| Canonical Element | Type Definition | Description | IDoc mapping | X12 mapping | EDIFACT mapping | ||||
|---|---|---|---|---|---|---|---|---|---|
| data | - | Object type/root element. | - | - | - | ||||
| controlFileHeader | - | Canonical control file header to store data for control segments of IDocs and TL XML transactions, and EDI envelopes for X12 and EDIFACT. | - | - | - | ||||
| canonicalGroceryProductsInvoiceHeader | - | Invoice header information. | - | - | - | ||||
| processingFunctionTypeCode | string | Invoice processing function code. Valid values include:
| - | ORIGINAL | - | ||||
| transactionReferenceIdentifierList | array | Transaction references for invoice at header level | - | G01 and N9 | - | ||||
| b2bTransactionIdentifierType | string | Referenced document type. Valid values include:
| - | N901 = BM (BOL) | - | ||||
| b2bTransactionIdentifierValue | string | Reference order identifier value for invoice identified by transactionReferenceIdentifierType. | - | G0102 when b2bTransactionIdentifierType = GROCERYPRODUCTSINVOICE (required) G0104 when b2bTransactionIdentifierType = GROCERYPRODUCTSPURCHASEORDER G0105 when b2bTransactionIdentifierType = SUPPLIERORDER N902 | - | ||||
| lineItemNumber | string | Line item number in transaction reference. Line item level only. | - | - | - | ||||
| transactionDate | string | Date transaction created. | - | G0101 when b2bTransactionIdentifierType = GROCERYPRODUCTSINVOICE G0103 when b2bTransactionIdentifierType = GROCERYPRODUCTSPURCHASEORDER | - | ||||
| epochTransactionDate | integer | Date transaction created in epoch integer date format. | - | - | - | ||||
| transactionReferenceInformation | array | Reference information for identifiers that are not related to transaction documents. This group would map to X12 segments REF and N9 and EDIFACT RFF for information other than transaction documents. | - | N9 | - | ||||
| transactionReferenceType | string | Transaction reference type for X12 segments REF and N9 and EDIFACT RFF for general reference data that is not a transaction document identifier. | - | N901 | - | ||||
| transactionReferenceIdentifier | string | Transaction reference identifier value. | - | N902 | - | ||||
| description | string | Identifier or description defined by qualifier code in transactionReferenceIdentifier (REF02). | - | N903 | - | ||||
| transactionReferenceDate | string | Transaction reference date and time/ if time available/ in date format YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS.nnnZ if time available. | - | N904 & N905 | - | ||||
| epochTransactionReferenceDate | integer | Transaction reference date and time in EPOCH date time format. | - | - | - | ||||
| invoiceDates | array | Invoice dates at header level. | - | G62 | - | ||||
| dateType | string | referenced date type. Valid values include:
| - | G6201 =
| - | ||||
| dateValue | string | Date defined by referenced date type | - | G6202 | - | ||||
| epochDateValue | integer | Date defined by referenced date type generated in epoch integer date format. | - | - | - | ||||
| timeZone | string | Time zone for referenced dates. | - | - | - | ||||
| partnerBusinessInformation | array | Business Parties identifiers and address information. | - | N1 | - | ||||
| partnerEntityType | string | Denotes type of the entity involved in this business transaction, Valid values include:
| - | N101 | - | ||||
| businessName | string | Business name for partner or location | - | N102 | - | ||||
| additionalBusinessName | string | Additional Business name for partner or location. | - | N201 | - | ||||
| companyLocationPartnerName | string | Additional Location of same Business partner. | - | - | - | ||||
| mpcCompanyLocationIdentifierList | array | Identifier list for business party.. | - | - | - | ||||
| isIdentifierPresentInEvent | boolean | Is identifier present in event boolean. | - | - | - | ||||
| companyIdentifierType | string | Company identifier type for business partner. | - | N103 PartyEntityType = Carrier then 93 Shipper then 94 | - | ||||
| companyIdentifierValue | string | Company identifier value for business partner. | - | N104 | - | ||||
| alternateCompanyLocationIdentifierValue | string | Alternate company location identifier value. | - | - | - | ||||
| address | - | Party address information. | - | N3, N4, | - | ||||
| address1 | string | Main street address. | - | N301 | - | ||||
| address2 | string | Supplemental street address. | - | N302 | - | ||||
| city | string | City | - | N401 | - | ||||
| district | string | District | - | N/A | - | ||||
| state | string | State or region code | - | N402 | - | ||||
| postalCode | string | Postal code | - | N403 | - | ||||
| country | string | Country code | - | N404 | - | ||||
| telephone | string | Telephone number. | - | - | - | ||||
| fax | string | Fax number | - | - | - | ||||
| url | string | Website URL | - | - | - | ||||
| buildingNumber | string | Building number | - | - | - | ||||
| plantNumber | string | Plant number | - | - | - | ||||
| floorNumber | string | Floor number in building. | - | - | - | ||||
| lscAddressIdentifier | string | LSC address identifier. | - | - | - | ||||
| village | string | Village name | - | - | - | ||||
| houseNumber | string | House number | - | - | - | ||||
| township | string | Township | - | - | - | ||||
| premisesCode | string | Premises code. | - | - | - | ||||
| companyLocationContactInformation | - | - | - | - | - | ||||
| contactType | string | Contact type. Valid values include:
| - | - | - | ||||
| contactName | string | Contact name. | - | - | - | ||||
| contactTitle | string | Title of contact. | - | - | - | ||||
| contactPhone | string | Contact phone number. | - | - | - | ||||
| contactEmail | string | Contact email address. | - | - | - | ||||
| mpcAdditionalAddressInformation | - | Additional address information that is not included in addressTypeDefinition. | - | - | - | ||||
| externalERPUserName | string | External ERP system user name for user who generated message. | - | - | - | ||||
| organizationCode | string | Code for organization responsible for generating the message. | - | - | - | ||||
| organizationDescription | string | Description of the organization responsible for generating the message. | - | - | - | ||||
| groupCode | string | Code identifying group responsible for generating the message. | - | - | - | ||||
| language | string | Language key for message. | - | - | - | ||||
| languageCode | string | ISO language code for message. | - | - | - | ||||
| referenceIdentifier | string | Partner reference identifier. | - | - | - | ||||
| orderType | string | Order Type. | - | - | - | ||||
| address3 | string | Additional address information that is not included in addressTypeDefinition. | - | - | - | ||||
| address4 | string | Additional address information that is not included in addressTypeDefinition. | - | - | - | ||||
| postalArea | string | Postal Area | - | - | - | ||||
| timeZone | string | Time zone for referenced dates. | - | - | - | ||||
| telephone | string | Telephone Number. | - | - | - | ||||
| emailAddress | string | Email Address. | - | - | - | ||||
| vatRegistrationNumber | string | Vat Registration Number. | - | - | - | ||||
| taxExemptCode | string | Tax exempt Code. | - | - | - | ||||
| locationType | string | Business Partner Location Type. | - | N405 | - | ||||
| locationIdentifier | string | Business Partner location Identifier. | - | N406 | - | ||||
| countrySubDivisionCode | string | Describes the country subdivision. | - | N407 | - | ||||
| groceryProductInvoiceCarrierInformation | array | Invoice related carrier information. | - | G27 ( | - | ||||
| carrierCode | string | Carrier code for shipper. | - | G2704 | - | ||||
| equipmentPrefix | string | Prefix or alphabetic part of an equipment unit's identifying number. | - | G2702 | - | ||||
| equipmentIdentifier | string | Sequencing or serial part of an equipment unit's identifying number. | - | G2703 | - | ||||
| transportMethod | string | Transport method type. Valid values include:
| - | G2701 =
| - | ||||
| routingDescription | string | Routing Description. | - | G2705 | - | ||||
| orderStatusCode | string | Order or shipment status code. | - | G2706 | - | ||||
| transactionReferenceIdentifierList | - | Transaction references for invoice carrier at header level. | - | - | - | ||||
| b2bTransactionIdentifierType | string | Referenced document type. Valid values include:
| - | - | - | ||||
| b2bTransactionIdentifierValue | string | Reference order identifier value. | - | - | - | ||||
| lineItemNumber | string | Line item number in transaction reference. Line item level only. | - | - | - | ||||
| transactionDate | string | Date transaction created. | - | - | - | ||||
| epochTransactionDate | integer | Date transaction created in epoch integer date format. | - | - | - | ||||
| groceryProductInvoiceCarrierInformation | array | Invoice related carrier information. | - | CAD (>=4060) | - | ||||
| carrierCode | string | Carrier code for shipper. | - | CAD04 | - | ||||
| equipmentPrefix | string | Prefix or alphabetic part of an equipment unit's identifying number. | - | CAD02 | - | ||||
| equipmentIdentifier | string | Sequencing or serial part of an equipment unit's identifying number. | - | CAD03 | - | ||||
| transportMethod | string | Transport method type. Valid values include:
| - | CAD01 =
| - | ||||
| routingDescription | string | Routing Description | - | CAD05 | - | ||||
| orderStatusCode | string | Order or shipment status code | - | CAD06 | - | ||||
| transactionReferenceIdentifierList | - | Transaction references for invoice carrier at header level | - | - | - | ||||
| b2bTransactionIdentifierType | string | Referenced document type. Valid values include:
| - | CAD07 | - | ||||
| b2bTransactionIdentifierValue | string | Reference order identifier value for invoice identified by transactionReferenceIdentifierType. | - | CAD08 | - | ||||
| lineItemNumber | string | Line item number in transaction reference. Line item level only. | - | - | - | ||||
| transactionDate | string | Date transaction created. | - | - | - | ||||
| epochTransactionDate | integer | Date transaction created in epoch integer date format. | - | - | - | ||||
| termsOfPayment | array | Terms of payment looping group. | - | G23 | - | ||||
| termsOfPaymentKey | string | Terms of payment. | - | - | - | ||||
| termsOfPaymentTypeCode | string | Code identifying type of payment terms. Valid values include:
| - | G2301 =
| - | ||||
| termsOfPaymentDateBasis | string | Code identifying the beginning of the terms period. Valid values:
| - | G2302 =
| - | ||||
| termsStartDate | string | The date when the payment terms begin (i.e. when the countdown for due dates or discounts starts) | - | G2303 | - | ||||
| epochTermsStartDate | integer | The date when the payment terms begin in epoch integer date format. | - | - | - | ||||
| dueDateType | string | How the due date is designated—what rule or reference determines when payment is due. Valid values:
| - | G2304 =
| - | ||||
| numberOfDays | string | Terms of payment: number of days | - | G2309 | - | ||||
| discountDueNumberOfDays | number | Terms Discount Days Due. Number of days in the terms discount period by which payment is due if terms discount is earned. | - | G2307 | - | ||||
| termsOfPaymentPercent | string | Terms of payment: percentage. | - | G2305 | - | ||||
| invoicePayablePercent | string | Percentage of invoice payable. | - | G2314 | - | ||||
| discountDueDate | string | Discount due date in string date format YYYY-MM-DD. | - | G2306 | - | ||||
| epochDiscountDueDate | integer | Discount due date in epoch integer date format. | - | - | - | ||||
| discountedDueAmount | number | The actual amount the buyer needs to pay if they pay by the discount date. | - | G2311 | - | ||||
| discountBaseAmount | number | The base amount upon which the total term discount amount is calculated (this may not be equal to total invoice amount). | - | G2312 | - | ||||
| paymentDueDate | string | Due date for payment. | - | G2308 | - | ||||
| paymentDeferredToDate | string | Date deferred payment or percent of invoice payable is due. | - | - | - | ||||
| epochPaymentDueDate | integer | Due date for payment generated in epoch integer date format. | - | - | - | ||||
| epochPaymentDeferredToDate | integer | Date deferred payment or percent of invoice payable is due generated in epoch integer date format. | - | - | - | ||||
| paymentDeferredDueAmount | string | Deferred amount due for payment. | - | - | - | ||||
| description | string | Terms of payment description. | - | G2315 | - | ||||
| totalTermDiscountAmount | number | Terms of payment discount amount. Total amount of terms discount. | - | G2310 | - | ||||
| dayOfMonth | integer | The numeric value of the day of the month between 1 and the maximum day of the month being referenced. | - | - | - | ||||
| deliveryTerms | array | Terms of delivery, transport or inco terms looping group. | - | G25 (FOB) | - | ||||
| description | string | Description for inco term. | - | G2503 | - | ||||
| deliveryTermsConditionCode | string | Delivery Terms condition code. | - | - | - | ||||
| shipmentChargePaymentMethodType | string | Method of payment for delivery. Valid values inlcude:
| - | G2501 =
| - | ||||
| fobTransferLocation | string | Code specifying the type of location at which the risk of loss for the shipment transfers. Valid values:
| - | G2502 =
| - | ||||
| deliveryTermCode | string | Delivery terms condition code. Valid values include:
| - | - | - | ||||
| creditsAndCharges | array | Credits and charges on invoice including invoice total, discounts, allowances, promotions, services, and others. | - | G72 (Allowances and charges) | - | ||||
| allowanceOrChargeCode | string | Allowance or charge code identifying the type of allowance or charge. | - | G7201 | - | ||||
| creditChargeKeyType | string | Key identifies credit or charges as discounts or additional charges. Valid values include:
| - | - | |||||
| creditChargeType | string | Code representing type of credit or charge Valid values:
| - | - | |||||
| creditChargeIdentifier | string | The identifier used to reference allowance or charge or promotion or deal. | - | G7203 | - | ||||
| creditChargeExceptionIdentifier | string | The unique number identifies an exception or modification to an offered or existing promotion. | - | G7204 | - | ||||
| creditChargeAmount | string | Total amount for the payment. | - | G7208 | - | ||||
| qualifyingAmount | string | Amount qualifying for cash discount, allowance, promotion, service or charge. | - | - | - | ||||
| creditChargePercentRate | string | Percentage rate for cash discount, allowance, promotion, service or charge. | - | G7209 | - | ||||
| percentRateBasisTypeCode | string | Code indicating basis that allowance or charge percent is calculated. | - | - | - | ||||
| creditChargeCurrencyCode | string | Currency code for credit or charge. | - | - | - | ||||
| creditChargeHandlingCode | - | Method of handling for discount or charge. Valid values include:
| - | G7202 | - | ||||
| description | string | Description of credit or charge. | - | - | - | ||||
| unitPriceAmount | string | Unit price amount. | - | G7205 | - | ||||
| unitPriceBasisQuantity | string | Quantity basis for the unit price. | - | - | - | ||||
| itemQuantity | string | Item quantity. | - | G7206 | - | ||||
| unitOfMeasure | string | Base unit of measure or UOM for quantity of item in pack. Quantity UOMs valid values include:
| - | G7207 | - | ||||
| baseValue | string | - | - | - | - | ||||
| creditChargeConditionType | string | Credit charge condition type | - | - | - | ||||
| basisAmountForPercent | number | Base amount to be used in the percentage calculation of the allowance, charge, or tax. | - | G7210 | - | ||||
| creditChargeDescriptions | array | Credit charges description. | - | G73 | - | ||||
| description | string | descriptive information of credit or charges. | - | G7301 | - | ||||
| freeTextNote | array | Free text, instructions, notes, descriptions and other free text elements. | - | NTE | - | ||||
| textReferenceCode | string | Text reference or subject code. | - | NTE01 | - | ||||
| textFunctionCode | string | Text function code. | - | - | - | ||||
| language | string | Language key for message. | - | - | - | ||||
| languageCode | string | ISO language code for message. | - | - | - | ||||
| textFormatCode | string | Format code for free text. | - | - | - | ||||
| freeFormText | string | Free text. | - | NT02 | - | ||||
| canonicalGroceryProductsInvoiceItemDetails | array | Invoice items details. | - | G17 Loop(required) | - | ||||
| lineItemNumber | number | Line item number. | - | incremental number | - | ||||
| packingUnits | number | Number of packing units at line item. | - | G2001 | - | ||||
| packSize | string | Size/weight/volume of each unit. | - | G2002 | - | ||||
| unitOfMeasure | string | Unit or Basis for Measurement Code. Size or weight or volume of each unit OZ - Oz | - | G2003 | - | ||||
| weightValue | string | Weight of product. | - | G2004 | - | ||||
| weightUOM | string | Weight unit of measure in master data for product. Valid values
| - | G2005 | - | ||||
| volumeValue | number | Volume value. | - | G2006 | - | ||||
| volumeUOM | string | Volume unit of measure. | - | G2007 | - | ||||
| innerPackCount | String | Inner Pack count within a container. | - | G2009 | - | ||||
| priceBracketIdentifier | string | Identifier for the price bracket applied to an item, vendor-assigned. | - | G1709 | - | ||||
| productCodesIdentifiers | array | Internal material identifier in the backend/ERP systems for the product. In the delivery this will be the supplier, although the customer and other identifiers may also be present. | - | - | - | ||||
| productCodeType | string | Code to qualify product identifier type. Some valid product types include:
| - | G1705 or G1707 | - | ||||
| productCodeValue | string | Products code identifier value. | - | G1704 when productCodeType = CASEUPC G1706 or G1708 | - | ||||
| productItemCodeType | string | Products item code type.. | - | - | - | ||||
| productItemInformation | array | Regulatory product description list. Defined as array to enable descriptions in multiple languages. | - | G69 | - | ||||
| productLanguageCode | string | Language for product description. | - | - | - | ||||
| productName | string | Name of product. | - | G6901 | - | ||||
| genericName | string | Generic name for product. | - | - | - | ||||
| productDescription | string | Description of the product defined by the current product identifier. | - | G6901 | - | ||||
| additionalItemInformation | array | Additional item information including status of units shipped. | - | G19 | - | ||||
| numberOfUnitsShipped | number | Number of units shipped.. | - | G1901 | - | ||||
| unitOfMeasure | string | Unit or Basis for Measurement Code. Quantity UOM's include:
| - | G1902 | - | ||||
| statusCodeForShipmentOrOrder | string | Status code for the order or shipment. | - | - | - | ||||
| quantityDifference | number | Numeric value of variance between ordered and shipped quantities. | - | - | - | ||||
| agencyCode | string | Agency defines the codes for item / products. | - | - | - | ||||
| productDescriptionType | string | Item / Products description code type. | - | - | - | ||||
| itemQuantity | array | Order quantity at line item level. | - | - | - | ||||
| quantityType | string | Type of quantity recorded. Valid value:
| - | - | - | ||||
| quantityValue | number | Quantity of product in delivery. | - | G1701 when quantityType = INVOICE G1710 when quantityType = SHIPPED | - | ||||
| unitOfMeasure | string | Unit of measure for quantity value. | - | G1702 when quantityType = INVOICE G1711 when quantityType = SHIPPED | - | ||||
| invoicePricing | array | Invoice price amounts for item. | - | - | - | ||||
| pricingType | string | Pricing type for invoice item. Valid pricing types include:
| - | - | - | ||||
| pricingAmount | string | Pricing amount for pricing type. | - | G1703 when pricingType = GROSS | - | ||||
| currencyCode | string | Currency for pricing amount. | - | - | - | ||||
| priceUOM | string | Unit of measure used for pricing at the order line item level. | - | - | - | ||||
| transactionReferenceIdentifierList | array | Transaction references for deliveries at header level. | - | N9 | - | ||||
| b2bTransactionIdentifierType | string | Referenced document type. | - | N901 | - | ||||
| b2bTransactionIdentifierValue | string | Reference order identifier value for invoice. | - | N902 | - | ||||
| lineItemNumber | string | Line item number in transaction reference. Line item level only. | - | - | - | ||||
| transactionDate | string | Date transaction created. | - | N904 & N905 | - | ||||
| epochTransactionDate | integer | Date transaction created in epoch integer date format. | - | - | - | ||||
| transactionReferenceInformation | array | Reference information for identifiers that are not related to transaction documents. This group would map to X12 segments REF and N9 and EDIFACT RFF for information other than transaction documents. | - | N9 | - | ||||
| transactionReferenceType | string | Transaction reference type for X12 segments REF and N9 and EDIFACT RFF for general reference data that is not a transaction document identifier. | - | N901 | - | ||||
| transactionReferenceIdentifier | string | Transaction reference identifier value. | - | N902 | - | ||||
| description | string | Identifier or description. | - | N903 | - | ||||
| transactionReferenceDate | string | Transaction reference date and time/ if time available/ in date format YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS.nnnZ if time available. | - | N904 & N905 | - | ||||
| epochTransactionReferenceDate | integer | Transaction reference date and time in EPOCH date time format. | - | - | - | ||||
| creditsAndCharges | array | Credits and charges on invoice including invoice total, discounts, allowances, promotions, services, and others. | - | G27 | - | ||||
| allowanceOrChargeCode | string | Allowance or charge code identifying the type of allowance or charge. | - | G7201 | - | ||||
| creditChargeKeyType | string | Key identifies credit or charges as discounts or additional charges. Valid values include:
| - | - | - | ||||
| creditChargeType | string | Code representing type of credit or charge. Valid values:
| - | - | - | ||||
| creditChargeIdentifier | string | The identifier used to reference allowance or charge or promotion or deal. | - | G7203 | - | ||||
| creditChargeExceptionIdentifier | string | The unique number identifies an exception or modification to an offered or existing promotion. | - | G7204 | - | ||||
| creditChargeAmount | string | Total amount for the payment. | - | G7208 | - | ||||
| qualifyingAmount | string | Amount qualifying for cash discount, allowance, promotion, service or charge. | - | - | - | ||||
| creditChargePercentRate | string | Percentage rate for cash discount, allowance, promotion, service or charge. | - | G7209 | - | ||||
| percentRateBasisTypeCode | string | Code indicating basis that allowance or charge percent is calculated. | - | - | - | ||||
| creditChargeCurrencyCode | string | Currency code for credit or charge. | - | - | - | ||||
| creditChargeHandlingCode | - | Method of handling for discount or charge. Valid values include:
| - | G7202 | - | ||||
| description | string | Description of credit or charge. | - | - | - | ||||
| unitPriceAmount | string | Unit price amount. | - | G7205 | - | ||||
| unitPriceBasisQuantity | string | Quantity basis for the unit price. | - | N/A | - | ||||
| itemQuantity | string | Item quantity. | - | G7206 | - | ||||
| unitOfMeasure | string | Base unit of measure or UOM for quantity of item in pack. Quantity UOMs valid values include:
| - | G7207 | - | ||||
| baseValue | string | - | - | - | - | ||||
| creditChargeConditionType | string | Credit charge condition type. | - | - | - | ||||
| basisAmountForPercent | number | Base amount to be used in the percentage calculation of the allowance, charge, or tax. | - | G7210 | - | ||||
| creditChargeDescriptions | array | Credit charges description. | - | - | - | ||||
| description | string | descriptive information of credit or charges. | - | G7301 | - | ||||
| invoiceDates | array | Invoice reference dates at line item level. | - | - | - | ||||
| dateType | string | referenced date type. | - | - | - | ||||
| dateValue | string | Date defined by referenced date type. | - | - | - | ||||
| epochDateValue | integer | Date defined by referenced date type generated in epoch integer date format. | - | - | - | ||||
| timeZone | string | Time zone for referenced dates. | - | - | - | ||||
| freeTextNote | array | Free text, instructions, notes, descriptions and other free text elements. | - | - | - | ||||
| textReferenceCode | string | Text reference or subject code. | - | - | - | ||||
| textFunctionCode | string | Text function code. | - | - | - | ||||
| language | string | Language key for message. | - | - | - | ||||
| languageCode | string | ISO language code for message. | - | - | - | ||||
| textFormatCode | string | Format code for free text. | - | - | - | ||||
| freeFormText | string | Free text array. | - | - | - | ||||
| canonicalGroceryProductsInvoiceSummary | array | Summary totals in invoice. | - | G31 & G33 (required) | - | ||||
| summaryType | string | Type of summary. Valid values include:
| - | - | - | ||||
| summaryValue | string | Value in summary to map it to summary total amounts or tax. | - |
| - | ||||
| summaryValueUnit | string | Unit of measure or currency or other unit for summary value. | - |
| - | ||||