Create product listing pages
Create product listing pages
product listing pages (PLPs) let customers browse, filter, and sort products of a given category. They’re an integral part of any ecommerce implementation.
There are two ways to create PLPs:
-
If you only need to create a few pages, use the Coveo Merchandising Hub (CMH) to create them one by one.
-
To create multiple PLPs at once, use the Public Listing Page API to create them in a batch.
Create a product listing page using the CMH
You can create product listing pages (PLPs) directly in the Coveo Merchandising Hub (CMH).
To create a product listing page
-
In the CMH, access the Product listings manager.
-
In the header, select the Property and Locale for which you want to create a PLP.
-
On the right of the Product listings manager, click Create listing page.
-
In the Page name field, enter a name for your PLP. The name you enter will appear in the Product listings manager, making it easy to identify and manage your PLP later.
-
In the Page URLs field, enter the full URL of your PLP, starting with
https://. You can specify multiple URLs in this field. -
Click Create page.
-
You’ll be prompted to create a filter rule for your product listing page (PLP). A PLP must contain at least one filter rule that defines the product category in which to display the products.
Once completed, your PLP will become active and appear in the Product listings manager.
Create product listing pages in a batch
To create one or more product listing pages (PLPs), make the following request to the Public Listing Page API:
POST https://platform.cloud.coveo.com/rest/organizations/<ORGANIZATION_ID>/commerce/v2/listings/pages/bulk-create HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer **********-****-****-****-************
where <ORGANIZATION_ID> is the unique identifier of your Coveo organization.
To learn how to find your organization ID, see Find your organization ID.
Payload:
[
{
"name": "Canoes & Kayaks|Kayaks|Sports Kayaks",
"patterns": [
{
"url": "https://sports.barca.group/plp/canoes-kayaks/kayaks/sports-kayaks"
}
],
"pageRules": [
{
"name": "Include ec_category_slug contains canoes-kayaks/kayaks/sports-kayaks",
"locales": [
{
"language": "en",
"country": "US",
"currency": "USD"
}
],
"filters": [
{
"fieldName": "ec_category_slug",
"operator": "contains",
"value": {
"type": "array",
"values": [
"canoes-kayaks/kayaks/sports-kayaks"
]
}
}
]
}
],
"trackingId": "barca_sports_ca"
}
]
| Specify the name of the PLP. This is also what appears in the CMH. | |
| Specify one or more URLs associated with the PLP. These URLs are used by the Commerce API on the front end to retrieve this PLP. | |
Specify the filter rule that defines the PLP.
Each PLP must be defined by at least one filter rule.
In this example, the PLP filters products that belong to the category canoes-kayaks/kayaks/sports-kayaks. |
|
The trackingId lets you segregate your PLPs.
When you make a request through the Commerce API to retrieve this PLP, you’ll need to specify the tracking ID. |