Commerce fields
Commerce fields
When preparing your catalog data for indexing, one of the first steps is to configure the commerce fields that hold key information about each item. These fields contain metadata, such as the product name or price, that power your product discovery experiences with Coveo.
This article explains which fields are required, recommended, and optional to set up your Coveo for Commerce organization.
Standard commerce fields
Standard fields are used by machine learning models and other key functionalities, such as usage analytics event tracking.
When you create a Catalog source, the standard commerce fields are automatically generated in your Coveo organization, and can’t be changed. With other source types, you must create these fields yourself, as per the following table.
Field | Type | Description | Usage notes |
---|---|---|---|
(Required) |
String |
The product’s name. |
|
(Required) |
String |
The product’s description. |
|
(Required) |
String |
The product’s unique identifier within a single source. |
|
(Required) |
Array[String] |
The product’s category. |
|
(Required) |
Decimal |
The product’s base price. |
|
(Required for grouping) |
String |
An identifier used to group similar products together. |
|
(Recommended) |
String |
A collection of lower resolution product images used for faster page load time (URL format). |
|
(Recommended) |
String |
A collection of high resolution product images used to view product details (URL format). |
|
(Recommended) |
String |
Whether the product is in stock. |
|
(Recommended) |
String |
A short description of the product. |
|
(Recommended) |
String |
The product’s brand. |
|
(Recommended) |
Decimal |
The product’s promotional price. |
|
(Recommended) |
Decimal |
Used to calculate the product margin. |
|
(Recommended) |
Decimal |
A rating-based system from 0-10. |
1. Name and Description will be copied to Title and Body respectively by the Catalog source default mappings to improve keyword relevance.
2. facet fields can be used to generate product listing pages (PLPs).
Avoid modifying the metadata of standard commerce fields using an indexing pipeline extension (IPE). This action can make the data unusable for internal systems, such as Coveo Personalization-as-you-go models. |
An item payload where the metadata keys match the standard fields:
{
"AddOrUpdate": [
{
"ec_name": "Graysuit",
"ec_description": "This Gray Acrylic pants for …",
"ec_product_id": "SP04968_00004",
"ec_category": "Clothing ; Clothing|Pants ; Clothing|Pants|Acrylic",
"ec_price": "154",
"ec_item_group_id": "SP04968",
"ec_thumbnails": "https://images.barca.group/...",
"ec_images": "https://images.barca.group/...",
"ec_in_stock": true,
"ec_shortdesc": "This Gray Acrylic pants for …",
"ec_brand": "North Face",
"ec_promo_price": 139.00,
"ec_cogs": 0.54,
"ec_rating": 3,
// ...
},
// ...
]
}
There are two levels of mappings to consider to ensure that you correctly populate your standard commerce fields:
-
Source mappings
-
If you’re using a Catalog source, the standard fields and their source mappings are automatically created (for example, the
ec_name
field is automatically created and mapped to theec_name
metadata key). You only need to create source mappings if you’re not using a Catalog source or for item custom metadata keys, if you use any. See Map commerce fields: With a Catalog source. -
If you’re not using a Catalog source, you must define source metadata mappings. See Standard commerce fields catalog mapping.
-
-
Catalog configuration mappings
Configure your Commerce standard field mappings during the catalog entity creation process.
Map permanentid
The permanentid
field should hold the same value as the product’s unique identifier.
When using a Catalog source and the ec_product_id
metadata key for your product’s unique identifier, the value of the ec_product_id
field is automatically mapped to the permanentid
field.
However, if you use a different metadata key for your product’s unique identifier, or if you don’t use a Catalog source, you must manually map the unique product identifier to the permanentid
field.
Additionally, you must create a custom field that matches the name of your chosen metadata key exactly.
For example, if the metadata key that uniquely identifies a product is product_code
, you must create a field named product_code
in Coveo and map it to the permanentId
field.
Notes
|
Structure fields
In addition to the standard commerce fields, structure fields are required for setting up your catalog configuration.
When you create a Catalog source, the catalog structure fields are automatically created in your organization. With other source types, you must create these fields yourself, as per the following table.
Field | Description | Field setting options to enable | Example |
---|---|---|---|
(String) |
Identifies the item's catalog object (product, variant, or availability). |
|
|
(String) |
Uniquely identifies each sellable variant in a catalog entity with variants. |
|
|
(String) |
Uniquely identifies each availability channel. |
|
|
(String) |
Identifies the list of available products and variants in a given availability channel. |
|
Note
If your catalog entity contains products without variants, or if the products are offered through a single availability channel (for example, a single store or product list), you won’t need to configure all of the fields listed in this section. |
Make sure to create source mappings for those fields.
If you’re using a Catalog source, the standard fields and their source mappings are automatically created.
For example, the ec_availability_id
field is automatically created and mapped to the ec_availability_id
metadata key.
Create additional commerce fields
You can also add your own fields to provide users with additional information from your products. These additional fields also let users target their desired content.
If you’re not using the ec_product_id
metadata key for your product’s unique identifier, you must create a field that matches the name of your chosen metadata key exactly and map it to the permanentId
field.
For example, if the metadata key that uniquely identifies a product is product_code
, you must create a field named product_code
in Coveo and map it to the permanentId
field.
The mapping of your metadata has to be done through the source mappings. See Additional fields mapping for instructions on how to map your additional fields to your metadata.
|
You can create your fields manually through the Administration Console (platform-ca | platform-eu | platform-au), or programmatically through the Fields API.
Leading practice
In your catalog content, avoid using the same field name that you intend to use as facets, on different types of items.
For example, if you’re defining the |
Fields per objecttype
The fields defined in this article will be used for different object types in your source.
Field | Product | Variant | Availability |
---|---|---|---|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
What’s next?
Once you’ve ensured that all of the required fields exist in your organization, you must define proper mapping between your product metadata and your fields.
See Map commerce fields for more information.