Use Experience Search to dynamically generate product listing pages (PLPs) on your site while leveraging our advanced capabilities to optimize and personalize them. When a visitor clicks a category name, the Search experience you’ve created sends an API call with the relevant filters and generates the corresponding PLP, applying any rules and boosts you’ve configured.
Create the search experience
To create an experience for category pages:
In Experience Search, create an experience targeting an empty query.
! Make sure the toggle is set to Users search for and not All queries, but leave the query field empty.If you want to create an experience for a specific category page (rather than a single experience handling all your category pages), target an empty query as described in Step 1, and also the specific category in the Where field. Important: Ensure that the category is correctly passed in the Experience Search API request.
You can use all Experience Search capabilities in your variations, including:
Include / Exclude / Pin rules
Boost by Algorithm Studio
Any other Experience Search capability
Implementation
In this method, PLPs are implemented using the Experience Search API, as follows:
- Call the Search API with an empty text query.
- Apply filters to limit results to a specific category (and apply and other constraints).
Example: Request for a men-shoes category page
{
"query": {
"text": "",
"filters": [
{
"field": "categories",
"values": ["mens-shoes"]
}
],
"pagination": {
"numItems": 20,
"offset": 0
},
"user": {
"dyid": "12264556113"
},
"session": {
"dy": "3124353434443123"
},
"context": {
"page": {
"type": "Category",
"data": ["men-shoes"],
"location": "https://shop.biz/men/shoes",
"referrer": "https://shop.biz"
}
},
"selector": {
"name": "Semantic Search"
}
}
}Note: The API doesn't impose a hard limit on the number of products returned (pagination is optional and controlled by you)
Sorting category pages
You can optionally include a sortBy object to support common category-page sorting behaviors, instead of the default ordering. You can sort products by any field in your product feed or by popularity.
Examples:
Newest / Recently added: Sort by the arrival_date or created_at column
Most popular: Sort by popularity
The sortBy object includes the field and order (asc / desc).