Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Google Merchant Center

Which ECC fields feed which attribute of Google’s product data specification, and how. 27 attributes are mapped: 18 machine data, 6 authored, 3 not in ECC.

MeansWho may change it
machine dataA fact ECC already holds as a code, identifier, amount, unit, date or stock quantityNobody: it is converted by a fixed rule in src/merchant.rs and never rewritten or generated. A wrong value is fixed in ECC.
authoredText a person writes, or a mapping a person keepsPeople, and AI if it is declared: Google’s structured_title and structured_description carry digital_source_type: trained_algorithmic_media for generated text.
not in ECCOwned by another system (storefront, DAM)That system.

A material with the deletion flag MARA-LVORM set is removed from the feed rather than sent. Values the rules can’t convert (a failed GTIN check digit, a unit Google doesn’t accept) are left out and listed as notes for review, never guessed.

Machine data: converted by rule

AttributeECC sourceRuleMerchant API v1RequirementSection
idMARA-MATNRMATNR as SAP displays it (numeric numbers lose their leading zeros). Must stay stable; prefix a market only if one material is sent to several feeds.offerId
string
requiredBasic product data
availabilityMARD-LABST
MARD-INSME
MARD-SPEME
in_stock when unrestricted stock (LABST) in the shipping plants is above zero; stock in quality inspection (INSME) or blocked (SPEME) doesn’t count. preorder and backorder need a date from purchasing or ATP and are not derived.productAttributes.availability
enum IN_STOCK / OUT_OF_STOCK / PREORDER / BACKORDER / LIMITED_AVAILABILITY
requiredPrice and availability
priceA004-KSCHL
A004-DATAB
A004-DATBI
KONP-KBETR
KONP-KPEIN
KONP-KONWA
KONP-LOEVM_KO
TCURX-CURRDEC
The PR00 condition valid today and not deletion-flagged: KBETR divided by KPEIN; shifted by TCURX-CURRDEC because SAP stores every amount with 2 decimals (KRW 129000 is stored as 1290.00); written as “129.00 USD”.productAttributes.price
Price {amountMicros (int64 string) + currencyCode}
requiredPrice and availability
sale_priceA004-KSCHL
A004-DATAB
A004-DATBI
KONP-KBETR
KONP-KPEIN
KONP-KONWA
TCURX-CURRDEC
A sale condition type (ZSAL in the sample) valid today; same conversion as price.productAttributes.salePrice
Price
optionalPrice and availability
sale_price_effective_dateA004-DATAB
A004-DATBI
DATAB/DATBI as ISO 8601 with the sales organisation’s UTC offset (DATS has no time zone). An open-ended DATBI (99991231) omits the attribute so the sale applies until the condition ends.productAttributes.salePriceEffectiveDate
Interval {startTime + endTime} RFC 3339 UTC; end exclusive
optionalPrice and availability
cost_of_goods_soldMBEW-VPRSV
MBEW-STPRS
MBEW-VERPR
MBEW-PEINH
Standard price (VPRSV S) or moving average (V) divided by PEINH in the company code currency. Confidential cost data: send it only if finance agrees.productAttributes.costOfGoodsSold
Price
optionalPrice and availability
unit_pricing_measureMARA-INHAL
MARA-INHME
Net contents (IS-Retail) such as “750 ml”. EU unit-price rules require it for many goods.productAttributes.unitPricingMeasure
{value + unit}
conditionalPrice and availability
product_typeMARA-PRDHA
T179T-PRODH
T179T-VTEXT
The product hierarchy text for each level (5 + 5 + 8 characters) joined with “ > “.productAttributes.productTypes[]
string list
optionalProduct category
gtinMARM-EAN11
MARM-NUMTP
MARA-EAN11
MARA-NUMTP
The EAN of the base unit (MARM row where MEINH = MARA-MEINS) or else MARA-EAN11. Sent only with a valid GS1 check digit and never an in-store number (NUMTP IE or GS1 prefixes 02 / 04 / 20-29).productAttributes.gtins[]
string list (up to 10)
conditionalProduct identifiers
mpnMARA-MFRPNManufacturer part number as stored.productAttributes.mpn
string
conditionalProduct identifiers
identifier_existsMARA-EAN11
MARA-MFRPN
“no” when there is neither a valid GTIN nor an MPN.productAttributes.identifierExists
boolean (default true)
optionalProduct identifiers
item_group_idMARA-SATNRThe generic article (IS-Retail) that groups variants.productAttributes.itemGroupId
string
conditionalDetailed product description
product_weightMARA-NTGEW
MARA-GEWEI
Net weight with the SAP unit mapped (KG to kg / G to g / LB to lb / OZ to oz).productAttributes.productWeight
{value (4 decimals) + unit g / kg / oz / lb}
optionalDetailed product description
shipping_weightMARA-BRGEW
MARA-GEWEI
Gross weight; same unit mapping. Required for carrier-calculated rates.productAttributes.shippingWeight
{value + unit}
conditionalShipping and returns
shipping_lengthMARM-LAENG
MARM-MEABM
Base-unit length; MM and M converted to cm; IN kept. Length / width / height are sent together or not at all.productAttributes.shippingLength
{value + unit in / cm}
conditionalShipping and returns
shipping_widthMARM-BREIT
MARM-MEABM
As shipping_length.productAttributes.shippingWidth
{value + unit in / cm}
conditionalShipping and returns
shipping_heightMARM-HOEHE
MARM-MEABM
As shipping_length.productAttributes.shippingHeight
{value + unit in / cm}
conditionalShipping and returns
ships_from_countryT001W-LAND1Country of the shipping plant (ISO 3166-1 alpha-2).customAttributes[ships_from_country]
{name + value}: v1 has no typed field for it
optionalShipping and returns

Authored

AttributeECC sourceRuleMerchant API v1RequirementSection
titleMAKT-MAKTX
MAKT-SPRAS
The 40-character short text in the feed language: an internal label to start from. If AI writes or rewrites the title, send structured_title with digital_source_type trained_algorithmic_media.productAttributes.title
string
requiredBasic product data
descriptionThe sales text is a long text (READ_TEXT object MVKE id 0001), not a table field. AI-written text goes in structured_description with digital_source_type trained_algorithmic_media.productAttributes.description
string
requiredBasic product data
google_product_categoryMARA-MATKLNo ECC field: keep a mapping from material group (or product hierarchy) to the Google taxonomy ID in the system of record.productAttributes.googleProductCategory
string
optionalProduct category
brandMARA-MFRNRMFRNR is the manufacturer’s vendor number; the brand name comes from that vendor (LFA1-NAME1) or a classification characteristic. Not resolved here.productAttributes.brand
string
requiredProduct identifiers
materialMARA-WRKSTBasic material text as entered.productAttributes.material
string
conditionalDetailed product description
colorClassification characteristics (AUSP / CABN); not table fields covered here. Same for size and pattern.productAttributes.color
string
conditionalDetailed product description

Not in ECC

AttributeECC sourceRuleMerchant API v1RequirementSection
linkThe storefront page. Not in ECC.productAttributes.link
string
requiredBasic product data
image_linkThe DAM or CMS. Not in ECC. Google enforces a 500 x 500 px minimum from 2027-01-31.productAttributes.imageLink
string
requiredBasic product data
conditionNot a material field; new for standard stock.productAttributes.condition
enum NEW / USED / REFURBISHED
conditionalDetailed product description

Example: one material

The sample material HM-QUEEN-01 (fixtures/merchant/heated-mat-queen.json) for a US feed on 2026-11-04, price condition PR00, sale condition ZSAL, UTC offset -08:00. tests/merchant.rs checks every value below.

ECC rows in
{
  "MARA": {"MANDT":"100","MATNR":"HM-QUEEN-01","ERSDA":"20240115","LVORM":"","MTART":"HAWA","MATKL":"HOME01","MEINS":"ST","BRGEW":"9.800","GEWEI":"KG","NTGEW":"8.250","EAN11":"012345678905","NUMTP":"UC","MFRNR":"0000300100","MFRPN":"HM-Q-2026","PRDHA":"HOMETHEATMATQUEEN0","WRKST":"Cotton / Carbon heating film","SATNR":"HM-QUEEN","INHAL":"0.000","INHME":""},
  "MAKT": [{"MANDT":"100","MATNR":"HM-QUEEN-01","SPRAS":"E","MAKTX":"Heated mat, queen"},
           {"MANDT":"100","MATNR":"HM-QUEEN-01","SPRAS":"3","MAKTX":"전기매트 퀸"}],
  "MARM": [{"MANDT":"100","MATNR":"HM-QUEEN-01","MEINH":"ST","UMREZ":"1","UMREN":"1","EAN11":"012345678905","NUMTP":"UC","LAENG":"1500.000","BREIT":"2000.000","HOEHE":"12.000","MEABM":"MM","BRGEW":"9.800","GEWEI":"KG"}],
  "CONDITIONS": [
    [{"MANDT":"100","KAPPL":"V","KSCHL":"PR00","VKORG":"US01","VTWEG":"10","MATNR":"HM-QUEEN-01","DATBI":"99991231","DATAB":"20260101","KNUMH":"0000100001"},
     {"MANDT":"100","KNUMH":"0000100001","KOPOS":"01","KSCHL":"PR00","KBETR":"129.00","KONWA":"USD","KPEIN":"1","KMEIN":"ST","LOEVM_KO":""}],
    [{"MANDT":"100","KAPPL":"V","KSCHL":"ZSAL","VKORG":"US01","VTWEG":"10","MATNR":"HM-QUEEN-01","DATBI":"20261130","DATAB":"20261101","KNUMH":"0000100002"},
     {"MANDT":"100","KNUMH":"0000100002","KOPOS":"01","KSCHL":"ZSAL","KBETR":"109.00","KONWA":"USD","KPEIN":"1","KMEIN":"ST","LOEVM_KO":""}]
  ],
  "MARD": [{"MANDT":"100","MATNR":"HM-QUEEN-01","WERKS":"US10","LGORT":"0001","LABST":"42.000","INSME":"3.000","SPEME":"0.000"}],
  "MBEW": {"MANDT":"100","MATNR":"HM-QUEEN-01","BWKEY":"US10","BWTAR":"","VPRSV":"S","VERPR":"0.00","STPRS":"46.50","PEINH":"1"},
  "T001W": {"MANDT":"100","WERKS":"US10","NAME1":"Los Angeles DC","LAND1":"US","REGIO":"CA"},
  "T179T": [{"MANDT":"100","SPRAS":"E","PRODH":"HOMET","VTEXT":"Home"},
            {"MANDT":"100","SPRAS":"E","PRODH":"HOMETHEATM","VTEXT":"Heating"},
            {"MANDT":"100","SPRAS":"E","PRODH":"HOMETHEATMATQUEEN0","VTEXT":"Heated mats"}],
  "CDHDR": [{"MANDANT":"100","OBJECTCLAS":"MATERIAL","OBJECTID":"HM-QUEEN-01","CHANGENR":"0000412001","USERNAME":"MDM_EDIT","UDATE":"20261028","UTIME":"141210","TCODE":"MM02","CHANGE_IND":"U"},
            {"MANDANT":"100","OBJECTCLAS":"MATERIAL","OBJECTID":"HM-QUEEN-01","CHANGENR":"0000412118","USERNAME":"BATCH_PIM","UDATE":"20261103","UTIME":"021500","TCODE":"","CHANGE_IND":"U"}],
  "TCURX": [{"CURRKEY":"KRW","CURRDEC":0},{"CURRKEY":"JPY","CURRDEC":0}]
}

Feed row out (null = not sent; link, image_link, description and brand come from other systems):

{
  "id": "HM-QUEEN-01",
  "title": "Heated mat, queen",
  "availability": "in_stock",
  "price": "129.00 USD",
  "sale_price": "109.00 USD",
  "sale_price_effective_date": "2026-11-01T00:00-08:00/2026-11-30T23:59-08:00",
  "cost_of_goods_sold": "46.50 USD",
  "unit_pricing_measure": null,
  "product_type": "Home > Heating > Heated mats",
  "gtin": "012345678905",
  "mpn": "HM-Q-2026",
  "identifier_exists": "yes",
  "item_group_id": "HM-QUEEN",
  "material": "Cotton / Carbon heating film",
  "product_weight": "8.25 kg",
  "shipping_weight": "9.8 kg",
  "shipping_length": "150 cm",
  "shipping_width": "200 cm",
  "shipping_height": "1.2 cm",
  "ships_from_country": "US"
}

What the rules did:

  • price: KONP-KBETR 129.00 ÷ KPEIN 1, USD has 2 decimals → 129.00 USD
  • sale_price_effective_date: A004 DATAB 20261101 / DATBI 20261130 plus the offset
  • gtin: MARM-EAN11 of the base unit ST, check digit valid, not an in-store prefix
  • shipping_length / width / height: MARM in MM → cm
  • availability: MARD-LABST 42 unrestricted; the 3 in quality inspection don’t count
  • product_type: PRDHA split 5 + 5 + 8 and each level’s T179T text

No notes: every machine value converted.

The same product as a Merchant API v1 product input

POST https://merchantapi.googleapis.com/products/v1/accounts/{account}/productInputs:insert?dataSource=accounts/{account}/dataSources/{dataSource}
{
  "offerId": "HM-QUEEN-01",
  "contentLanguage": "en",
  "feedLabel": "US",
  "productAttributes": {
    "title": "Heated mat, queen",
    "availability": "IN_STOCK",
    "price": {
      "amountMicros": "129000000",
      "currencyCode": "USD"
    },
    "salePrice": {
      "amountMicros": "109000000",
      "currencyCode": "USD"
    },
    "salePriceEffectiveDate": {
      "startTime": "2026-11-01T08:00:00Z",
      "endTime": "2026-12-01T08:00:00Z"
    },
    "costOfGoodsSold": {
      "amountMicros": "46500000",
      "currencyCode": "USD"
    },
    "productTypes": [
      "Home > Heating > Heated mats"
    ],
    "gtins": [
      "012345678905"
    ],
    "mpn": "HM-Q-2026",
    "itemGroupId": "HM-QUEEN",
    "material": "Cotton / Carbon heating film",
    "productWeight": {
      "value": 8.25,
      "unit": "kg"
    },
    "shippingWeight": {
      "value": 9.8,
      "unit": "kg"
    },
    "shippingLength": {
      "value": 150.0,
      "unit": "cm"
    },
    "shippingWidth": {
      "value": 200.0,
      "unit": "cm"
    },
    "shippingHeight": {
      "value": 1.2,
      "unit": "cm"
    }
  },
  "customAttributes": [
    {
      "name": "ships_from_country",
      "value": "US"
    }
  ],
  "versionNumber": "20261103021500"
}

Google names it accounts/{account}/productInputs/en~US~HM-QUEEN-01. What changes from the feed row:

  • Prices are Price objects in micros: 129.00 USD → "amountMicros": "129000000"; KRW 129000 → "129000000000".
  • availability is an enum: IN_STOCK, not in_stock.
  • salePriceEffectiveDate is an Interval in UTC with an exclusive end: the last sale day 2026-11-30 (-08:00) ends at 2026-12-01T08:00:00Z.
  • gtin and product_type become lists: gtins, productTypes.
  • Weights and dimensions are {value, unit} objects, at most 4 decimals.
  • identifierExists defaults to true, so it is only sent as false.
  • ships_from_country has no typed v1 field, so it goes in customAttributes.
  • versionNumber is the newest change document for the material (CDHDR, object class MATERIAL: 2026-11-03 02:15:00). Google refuses an insert into a primary data source whose number is lower than the stored one, so a late or replayed batch can’t overwrite a newer product with older data. It is machine data too.

Both shapes come from one converted Product in src/merchant.rs: feed_row writes the specification’s names and text ("129.00 USD"), and src/merchant_api.rs writes the Merchant API v1 productInputs resource ({"amountMicros": "129000000"}). tests/merchant_api.rs fails if a field path in this table is missing from the API output.