Indexing Commerce Catalog Content

To index your commerce content, you need a Coveo Cloud organization. The Coveo Cloud Platform access lets you create a source which is the bridge to your commerce data.

If you have never used the Cloud Platform before, log in now.

  • Contact your sales representative to enable Coveo for Commerce features in your organization.

  • You can review your organization license limits in the Coveo Cloud Platform.

Step 1: Creating and Configuring a Source to Index a Commerce Catalog

Coveo provides many out-of-the-box connectors designed to access and index commerce catalog content. Connectors may be system-specific or generic.

The following table summarizes connection options for commerce content. For more details regarding features, including content security type support and instructions on how to create a source, in the table, click a given connector name.

Indexing alternatives
The Push API is the recommended solution for Commerce indexing, since it gives you full flexibility on what content to index and when. A new or updated product is searchable in a few minutes, without having to wait for a refresh schedule. You can push content from any system, including, but not limited to, a commerce platform, a product information management (PIM) system, a static database, etc.
Use the Database Connector if you prefer to index the underlying database of your commerce system or product information management (PIM) system directly. The database connector allows for incremental refreshes, which can run every few minutes. The Database connector also uses the Coveo On-Premises Crawling Module, which can be installed behind your firewall to avoid having to create firewall rules for Coveo Cloud.
Use the Generic REST API to get content from a remote repository exposing its data through a REST API. The Generic REST API source runs on a schedule, so expect some delays between new content added/updated and the availability in the search.
Use the Sitemap Connector for simple catalogs where all products data is available online and properly discoverable through a Sitemap file or index file. The Sitemap source runs on a schedule, so expect some delays between new content added/updated and the availability in the search.
Use the Website Connector for simple catalogs where all product data is available online. The Web source runs on a schedule, so expect some delays between new content added/updated and the availability in the search.

Understanding the Catalog Structure

A specific catalog data structure is recommended to optimize the search experience with Coveo.

Complex catalogs are often a combination of three types of objects:

Product

A product is a searchable item. In a catalog without variants, the product is the purchasable item. In a catalog with product variants, users search for products, and select the proper variant to purchase.

Variant

A variation of a product. A variant is never returned in the search, it’s instead used as metadata for a parent product when a keyword or filter is performed against the variant metadata. The variant of the product is what the user purchases.

Availability

Used to determine if the user can purchase the product or variant. An availability indicator can be a store inventory, a price list, or anything that controls which user has access to a product or variant.

If your catalog doesn’t have variants or availability restrictions, proceed to Step 3: Review and Inspect Your Indexed Content.

Step 2: Formatting Catalog Data

To effectively recreate the relationship between the three catalog object types above, you need the proper metadata.

Every Coveo item is represented by a JSON configuration, which can be inspected in the Administration Console (see Review Item Properties - Item JSON Tab).

Below are recommendations of the JSON configurations for the different object types.

{
    "title": "Coveo Soccer Shoe - Red",
    "model": "Authentic",
    "brand": ["Coveo"],
    "description": "<p>The astonishing, the original, and always relevant Coveo style.</p>",
    "color": ["Red"],
    "groupid": "001",
    "productid": "001-red",
    "imagesurl": ["https://myimagegallery?productid"],
    "gender": "Men",
    "price": 28.00,
    "category": "Soccer Shoes",
    "objecttype": "Product"
}

The product contains generic information such as the description and the image. The objecttype field is of high importance since it’s used to differentiate the object in the Coveo Content Browser.

The productid field is used to create a relationship with the variants or the availability object. In your catalog, it might have a different label.

{
    "title": "Coveo Soccer Shoe - Red / Size 8 - Wide",
    "sku": "001-red_8_wide",
    "productsize": "8",
    "width": "wide",
    "productid": "001-red",
    "objecttype": "Variant"
}

The variant contains information specific to the product for sale (or SKU).

In this example, the “Coveo Soccer Shoe” varies in size and width, so you need a variant for every combination of those two fields.

On the flip side, the product picture must not be in the variant since the actual “Coveo Soccer Shoe” product looks the same, regardless of its size and width.

As with the other objects, the objecttype field is required to properly filter the object in the Coveo Content Browser.

The productid field is used to create a relationship with the parent product. In your catalog it might have a different label.

The sku is the unique identifier used to create a relationship with the availability object. In your catalog it might have a different label.

Here is the recommended JSON structure for a common business-to-consumer (B2C) scenario where a local store contains a finite amount of products.

{
    "title": "Montreal Store",
    "lat": 45.4975,
    "long": 73.5687,
    "availableskus": ["001-red_8_wide","001-red_9_wide","001-red_10_wide","001-red_11_wide", "001-blue_8_wide"],
    "storeid": "s000002",
    "objecttype": "Availability"
}

Here is the recommended JSON structure for a common business-to-business (B2B) scenario where a price list defines who has access to what products.

{
    "title": "Group ID 42",
    "subscription_level": "Gold",
    "availableskus": ["001-red_8_wide","001-red_9_wide","001-red_10_wide","001-red_11_wide", "001-blue_8_wide"],
    "groupid": "42",
    "objecttype": "Availability"
}

As with the other objects, the objecttype field is required to properly filter the object in the Coveo Content Browser.

For both the B2C and B2B use cases, the availableskus define which variant or product the members of the group have access to. In your catalog it might have a different label.

Step 3: Review and Inspect Your Indexed Content

The Content Browser is a basic Coveo Cloud Platform demo search interface to help you navigate and inspect your organization sources content.

For instructions on accessing the Content Browser and making use of its many features, see Inspect Items With the Content Browser.

Step 4: Adding Fields and Mapping Metadata

Coveo Cloud organization sources come with a set of standard system fields. However, adding your own fields allows the end user to get additional information in search results and to better target desired content (see Field Uses).

To add a field and its associated mapping for your source

  1. Add a field.

  2. Add mapping to associate item metadata or text with the field you just created.

  3. Once completed, you’ll need to rebuild the source (for crawled back sources) or repush the content (for Push sources).

  4. After the index rebuild, return to the Content Browser page to review the changes to your indexed items.

Step 5: Add a Catalog

See Creating a Coveo Commerce Catalog.

Required Privileges

The following table indicates the privileges required to view or edit elements of the Catalogs page and associated panels (see Privilege Management and Privilege Reference). The Commerce domain is however only available in Coveo Cloud commerce organizations.

Action Service - Domain Required access level
View catalogs

Commerce - Catalogs

View
Edit catalogs

Commerce - Catalogs

Edit

Step 6: (Optional) Creating a Customizable Demo Search Page

Lets you get an idea of what you’ll be able to accomplish using the Coveo JavaScript Search Framework in the next step of the solution implementation.

So far, you used the Content Browser to filter and view your indexed content. Now create a real, customizable Coveo demo search page in the Cloud Platform (see Adding and Managing Search Pages).

What’s Next?

You can now proceed to Integrating a Search Interface into Your Commerce Solution or Website.

Recommended Articles