The SKU Select feature operates through the fq parameter passed with SKU-level attributes.
SKU Select is only supported on fq, and not efq.
Catalog requirements
To use SKU Select, your catalog must contain your SKU data. See the SKU Select catalog requirements here.
Which APIs support SKU Select?
The following APIs support SKU Select:
- Product Search API
- Category API
- Recommendations and Pathways APIs
Syntax
The fq parameter applies a filter to the recall. Any facet that you want to filter on must be in your catalog.
For SKU Select, you may use these 5 static SKU attributes:
- sku_price
- sku_sale_price
- sku_color
- sku_color_group
- sku_size
You can also use any SKU-level dynamic attributes.
Read more about using the fq parameter in the "Simple Filtering" section in the Faceting and filtering page.
Migrating to SKU Faceting
If you are, for example, currently using fq=color (where color is defined at a product level) and are moving to SKU faceting for the same attribute, you must use fq=sku_color instead. These apply to the 5 static SKU fields listed above.
For dynamic SKU facets, you can keep the same naming convention.
Sample request and response
The request has fq defined with the SKU-level attributes sku_color and sku_size.
In the response, the Hero SKU's variant data is at the top. The facet count for a SKU attribute corresponds to the product count, not the SKU count.
GET https://core.dxpapi.com/api/v1/core/? account_id=<Bloomreach provided account ID>
&auth_key=jazzhands
&domain_key=example_com
&request_id=8438674018839 &_br_uid_2=uid=7797686432023:v=11.5:ts=1428617911187:hc=55 &ref_url=http://www.example.com/home &url=http://www.example.com/index.html?q=dresses &request_type=search
&search_type=keyword
&q=dresses &fl=pid,title,brand,price,sale_price,thumb_image,url,description,sku_color,sku_size
&fq=sku_color : "yellow"
&fq=sku_size : medium
&rows=10
&start=0
docs:
[
{
sale_price: 13.25,
price: 15.25,
description: "",
title: "Bodycon Knee Length Dress",
url: "",
brand: "Acme Corp",
pid: "PID012345",
thumb_image: "https://acmecorp.com/image/123_456",
sale_price_range:
[
10.99,
250.99
],
price_range:
[
15.99,
30.99
],
variants:
[
{
sku_color: "Blue",
sku_swatch_images:
[
"0123456"
],
sku_thumb_images:
[
"https://acmecorp.com/image/123_456"
]
}
]
}
]
…
“facet_counts”: {
"facets": [
{
"name": "categoryFacet",
"type": "text",
"value": [
{
count: 20,
name: "S"
},
{
count: 24,
name: "M"
}
]
}
docs:
[
{
sale_price: 13.25,
price: 15.25,
description: "",
title: "Bodycon Knee Length Dress",
url: "",
brand: "Acme Corp",
pid: "PID012345",
thumb_image: "https://acmecorp.com/image/123_456",
sale_price_range:
[
10.99,
250.99
],
price_range:
[
15.99,
30.99
],
variants:
[
{
sku_color: "Blue",
sku_swatch_images:
[
"0123456"
],
sku_thumb_images:
[
"https://acmecorp.com/image/123_456"
]
}
]
}
]
facet_fields:
{
categoryFacet:
[
{
count: 20,
name: "S"
},
{
count: 24,
name: "M"
}
]
}
API requests should be limited to 16K Bytes. API requests above this length will throw Error Code 414.
Customers whose go-live date is after September 7, 2023 will be on V3 Facet response format by default. If you’re on the legacy format and would like to implement the new Facet response format, kindly contact your Bloomreach Services representative.