Disable availability filtering
Disable availability filtering
If your catalog contains availability channels and your commerce interface allows customers to disable availability filtering, also known as the ability to view products from all availability channels at once, you can use the AvailabilityFilterStrategy
parameter to ensure that all products are returned in search results.
By default, if your catalog uses availability channels, only products referenced in at least one availability channel will be displayed.
Changing the filter strategy ensures that all products matching the search criteria are displayed, even if no availabilityId
is specified.
This feature allows customers who disabled availability filtering to access the entire product catalog, regardless of whether the products are referenced in availability channels or not.
Whether this may apply to your website search interface depends entirely on your use case. It can be enabled after the catalog configuration.
A retailer sets up their 1:1 catalog configuration and doesn’t have availability objects that contain all their products, regardless of location.
By changing the AvailabilityFilterStrategy
, a user would be able to query a catalog without a store location.
How to change the availability filter strategy
Currently, you can only disable availability filters on the catalog through the REST API.
You’ll need to modify the AvailabilityFilterStrategy
option in the catalog configuration.
By default, the option is set to ALWAYS
and will only return items that have availabilities.
When changed to WHEN_SPECIFIED
, it will only filter by availability, if an availability is specified in the search request. Otherwise, it won’t filter by availabilities.