Commerce fields and mapping

When you create a source, the Coveo Platform automatically generates a set of fields in your Coveo organization (if they don’t already exist).

The type of source you create determines which fields are generated in your organization. For example, if you create a Catalog source, the Coveo Platform generates a set of default fields that are common to all sources, such as language, permanentid, and uri. It also generates a set of commerce-specific standard fields. If you use a different source, you’ll need to configure these commerce-specific fields yourself.

To generate facets and power essential features, such as Coveo Machine Learning (Coveo ML) models, the Coveo Platform needs your catalog object information to be held in Coveo fields. You make this information available to the Coveo Platform by mapping it to specific fields. You also have to map certain product metadata to important default Coveo fields.

Configure commerce fields

In your catalog data, catalog object information is represented as metadata keys and values, as shown in the following image:

Image of a canoe with associated metadata | Coveo for Commerce

Before you can index your catalog data, make sure that the following types of commerce-specific fields are in your Coveo organization:

Important default Coveo fields

Besides the commerce-specific fields, the following default fields are important for your Coveo for Commerce implementation:

Map metadata keys to Coveo fields

Mapping is the process of associating metadata keys from your catalog data to populate Coveo fields. To populate your fields correctly, you’ll need to complete two stages of metadata mapping:

For detailed information on how to map your metadata keys to Coveo fields, see Map commerce fields.

Implementation flow

The typical implementation flow for mapping metadata keys to Coveo fields is as follows:

Field management flow in Coveo for Commerce | Coveo for Commerce
  1. Create your Catalog source.

  2. Create the commerce fields that you’ll map your metadata to. When using a Catalog source, the Coveo Platform automatically creates the standard commerce fields for you. You’ll need to manually create any structure and custom fields that you require. Fields are also used as attributes to build rules in the Coveo Merchandising Hub (CMH). If you want to use a given field as an attribute in rules, you must enable the Facet or Multi-value facet option for that field.

  3. Define your catalog configuration. You’ll be required to:

    1. Choose the metadata keys that uniquely identify your products, variants, and availabilities. It’s important to choose the metadata keys that hold the unique identifiers of items as opposed to the Coveo fields. For example, if your metadata key for the unique identifier of a product is product_code, you must choose the product_code metadata key as the product identifier, not the ec_product_id field.

      product-code metadata in catalog configuration| Coveo for Commerce
    2. Map your metadata keys to Coveo fields in the catalog. For example, Coveo’s standard field dedicated to a product’s price is ec_price. If your metadata key for the price of a product is price, you must map the price metadata key to the ec_price Coveo standard field.

      metadata mapping in catalog configuration| Coveo for Commerce
  4. Map your metadata keys to standard commerce fields in the index. While the standard field mappings defined in the catalog configuration is replicated in the index when using a Catalog source, you’ll still need to map your metadata keys for any custom fields you’ve created.

  5. Index your commerce items.