7

I have searched and searched, and I cannot find an example of JSON-LD Schema microdata that will cause my Facebook Catalog to recognize all variants of a product that has multiple variants (a t-shirt, for example). So far, I've tried these methods of implementing variants:

  • ProductGroup with an array of Products (inside the "hasVariant" ProductGroup property)
  • Product with an array of Offers
  • An array of Products

With all of these approaches, I've only managed to get Facebook to recognize one single product. Does anybody know how to compose Facebook JSON-LD microdata for a product with multiple variants or where I could find an example of this? Thank you!

Heinz
  • 81
  • 3
  • Have you tried sending some products with all the child producs having isVariantOf and the base product with the hasVariant? – Iñigo González Dec 01 '20 at 17:45
  • Have you tried `isVariantOf` of `inProductGroupWithID` as mentioned in here: https://schema.org/Product ? I think on your variant product, you need to add the microdata pointing to the parent one to create linking. – Tuhin Dec 01 '20 at 21:41

2 Answers2

3

Facing same issue, Google tool is able to parse variants but Facebook tool is not able to do so. Data is in json.

kb0000
  • 444
  • 3
  • 6
  • 18
0

I use productID for the variant and item_group_id for the product. here's the example from Facebook.

https://developers.facebook.com/docs/marketing-api/catalog/guides/microdata-tags/#json-ld

<script type="application/ld+json">
{
  "@context":"https://schema.org",
  "@type":"Product",
  "productID":"facebook_tshirt_001",
  "name":"Facebook T-Shirt",
  "description":"Unisex Facebook T-shirt, Small",
  "url":"https://example.org/facebook",
  "image":"https://example.org/facebook.jpg",
  "brand":"facebook",
  "offers": [
    {
      "@type": "Offer",
      "price": "7.99",
      "priceCurrency": "USD",
      "itemCondition": "https://schema.org/NewCondition",
      "availability": "https://schema.org/InStock"
    }
  ],
  "additionalProperty": [{
    "@type": "PropertyValue",
    "propertyID": "item_group_id",
    "value": "fb_tshirts"
  }]
}
</script>

In some basic tests it looked like it worked.

So you would need multiple Product entities if you want to mark up multiple variants on a page, which would mess with Google Searches requirements.

Tony McCreath
  • 2,882
  • 1
  • 14
  • 21
  • 2
    The example data from Facebook above only contains one variant, and I've not found a way of including multiple Products on one page which Facebook will interpret as variants of the same product - it seems to ignore everything but the first Product. You say that multiple variants on a page would mess with Google Searches requirements, but the Google Rich Results test page correctly extracts multiple product variants from JSON-LD data. It's only Facebook that seems to not work properly. – Jon Knight Feb 16 '21 at 16:31
  • From previous experience Google Search did a similar thing. They would pick one of the listed products to use. Things may change as Google merchant centre is documenting how they want you to mark up variants with multiple products. It may be the Facebook also needs to improve to support this scenaro. – Tony McCreath Feb 17 '21 at 21:58