Catalog variant data
Catalog variant data
In a catalog with variants, users search for products, and then select a variant to purchase. Variants are never returned as search results. A variant instead provides additional metadata on a parent product.
In this JSON example of a variant, the Coveo Soccer Shoes
product varies in size
and width
, so a distinct variant would be needed for every possible combination of those.
{
"DocumentId": "variant://001-red-8_wide",
"FileExtension": ".html",
"ec_name": "Coveo Soccer Shoes - Red / Size 8 - Wide",
"sku": "001-red-8_wide",
"productsize": "8",
"width": "wide",
"productid": "001-red",
"objecttype": "Variant"
}
The above JSON contains information specific to a product for sale (or SKU).
|
Leading practice
We recommend using a simple method to differentiate the metadata.
You can use dashes (
|
Observe that the product image ec_images
isn’t included in the variant, since in this case, the actual Coveo Soccer Shoes - Red
product looks the same regardless of its size and width.
The sku metadata is the unique identifier used to create a relationship with availability objects.
In your catalog this metadata may have a different label.
Use values that are standardized throughout your index. |
|
The productid metadata is used to establish a relationship with the parent product.
In your catalog this metadata may have a different label. |
|
The objecttype metadata is crucial, as it will be used to identify the item as a variant in the index. |
|
When your catalog structure contains large amounts of items and requires availability channels, use the same field name (i.e.
and availability channel
This will improve the performance of your index. |
Create additional variant fields
Sources using Coveo’s native connectors come with a set of default system fields. If you need to create more fields, see Create additional commerce fields.
Stream your catalog data to your source
You must then stream your catalog data to your source.
Review and inspect your indexed products
The Content Browser (platform-ca | platform-eu | platform-au) is a basic Coveo demo search interface to help you navigate and inspect the content of your Coveo organization sources.
For instructions on accessing the Content Browser and making use of its many features, see Inspect items with the Content Browser.