Unable to append further data to supplemental feed id for the same product id through api

49 views
Skip to first unread message

Vipul Mishra

unread,
May 27, 2024, 8:57:31 AMMay 27
to Google Content API for Shopping
Problem Statement:
When adding a product to a supplemental feed for the first time using the customBatch insert API, it works correctly. However, subsequent attempts to append additional data to the same supplemental feed for the same product ID do not update the feed as expected. The expected behavior was that the insert API would replace the old data with new data, but this does not seem to be happening. Even when retrieving the current data using the customBatch get API and then attempting to re-insert the updated data, the new data is not reflected in the supplemental feed in the Google Merchant Center UI.

Detailed Explanation
  1. Initial Insertion: The first insertion of product details into the supplemental feed works as expected. The product details appear in the Google Merchant Center UI.
  2. Subsequent Updates: Attempts to append additional product details to the same product ID in the supplemental feed do not work. The supplemental feed does not show the updated data in the UI.
  3. Expected Behavior: It was initially thought that the customBatch insert API would append the data, but turns out it  replaces the existing data with new data. Therefore, the approach was to retrieve the current data using the customBatch get API, frame the updated data, and then use the customBatch insert API again.
  4. Observed Behavior: The supplemental feed gets created only once with the initial product details. Further attempts to append or update data do not show the updated information in the Google Merchant Center UI.

    JUST Fyi, i am using Custom batch insert and get , heres the api link

https://developers.google.com/shopping-content/reference/rest/v2.1/products/custombatch#ProductsCustomBatchRequest

NOTE: Is it something to do with Update Mask property .
  • MY ORIGINAL JSON

   "entries":[
      {
         "batchId":1,
         "feedId":"XXXXXXX",
         "merchantId":"XXXXXX",
         "method":"insert",
         "productId":"online:en:US:bag",
         "product":{
            "brand":"Test",
            "channel":"online",
            "offerId":"bag",
            "contentLanguage":"en",
            "targetCountry":"US",
            "productDetails":[
               {
                  "sectionName":"Attributes",
                  "attributeName":"Style",
                  "attributeValue":"ALine"
               },
               {
                  "sectionName":"Attributes",
                  "attributeName":"Test",
                  "attributeValue":"Test,Test"
               }
            ]
         },
         "updateMask":"productDetail"
      }
   ]

Example Scenario
  1. First Insertion:
    Product ID: 12345
      Supplemental Feed Content:{
    • {
        "productDetails": [
          {
       "sectionName": "Section1",
            "attributeName": "Color",
            "attributeValue": "Red"
          }
        ]
      }
    • Result: Product details are successfully added to the supplemental feed.

  2. Subsequent Update: New Data to Append
{
  "productDetails": [
    {
      "sectionName": "Section2",
      "attributeName": "Size",
      "attributeValue": "Large"
    }
  ]
}

  • Expected Result: Supplemental feed should now contain both the original and new product details.
  • Observed Result: Only the original product details are visible in the supplemental feed.

Shopping API Forum Advisor

unread,
May 27, 2024, 2:30:21 PMMay 27
to vipul....@lily.ai, google-content-...@googlegroups.com
Hi,

Thank you for contacting the Content API support team.

Based on the provided information, I understand that you would like to know why the Subsequent Updates data will not show in the UI. Please note that if you add or update a field via a supplemental feed request and then do not include the field in a subsequent request, the data for the omitted field is removed from the feed. For more information, you can refer to this document.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02tJ6Du:ref" (ADR-00236676)

Thanks,
 
Google Logo Content API for Shopping Team

 

Vipul Mishra

unread,
May 28, 2024, 12:03:26 PMMay 28
to Google Content API for Shopping
I mean if i use insert API "POST https://shoppingcontent.googleapis.com/content/v2.1/products/batch" using Custom batch.
and method here will be "insert" and i am using supplemental feed id, if i use insert then the previous records should be unaltered and new set of record should be appended, not replaced.

Lets say the 1st data which i need to frame and hit the above api is

DATA 1:

  • {
      "productDetails": [
        {
     "sectionName": "Section1",
          "attributeName": "Color",
          "attributeValue": "Red"
        }
      ]
    }

  • So If there's no data present for that particular feed id, the DATA 1, will be seen on UI, now i need to append(insert) and additional set of data for the same feed id, which is DATA 2. So both DATA 1, and DATA 2 should be present on UI


    DATA 2:

  • {
      "productDetails": [
        {
          "sectionName": "Section2",
          "attributeName": "Size",
          "attributeValue": "Large"
        }
      ]
  • }

    NOTE : I am using DATA 1 JSON request  first  and hitting the api, in next request only DATA 2 JSON  will be framed(In the second request DATA 1 will not be present) and i'll hit the API. Both DATA 1 and DATA 2 should be present .

    Current result : The first time i hit the custom batch api with the request DATA 1 and method is "insert" not "Update", the entire product details is seen in supplemental feed section of GMC, Now if i hit again the custom batch api with the request DATA 2 (DATA 1 is not present in this JSON request), so if i am using "insert" method here , my assumption is DATA 2 should be appended with already existing DATA 1  right ?

    BUT WHAT HAPPENS HERE  IS,  DATA 2 (JSON ) REPLACES DATA 1(JSON) INSTEAD OF APPENDING.

    please help !


Shopping API Forum Advisor

unread,
May 28, 2024, 4:27:49 PMMay 28
to vipul....@lily.ai, google-content-...@googlegroups.com
Hi Vipul,

I understand that you performed the insert method for data1 (productDetails values), and later again used the insert method for the same product with a different data2 (productDetails values), and now the data2 values are showing in the UI. Please note that if you perform the insert method for already existing products, it will override with the recently updated values for your product.
Reply all
Reply to author
Forward
0 new messages