Heinz
Heinz

Reputation: 81

JSON-LD microdata for a product with multiple variants for Facebook Catalogs

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:

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!

Upvotes: 7

Views: 1927

Answers (2)

Tony McCreath
Tony McCreath

Reputation: 3409

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.

Upvotes: 0

kb0000
kb0000

Reputation: 444

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

Upvotes: 3

Related Questions