Currently, rules are not available for Trending Items models.
To work around this, you can use queryParameters
when retrieving the trending items. If using the Javascript API client, you can find more info on the parameter here. If using the trendingItems
InstantSearch widget, the same parameter is available here.
Example
To prevent out of stock items from appearing in Trending Items, you could set:
queryParameters: {
filters:'out_of_stock:false'
}
where out_of_stock
is the attribute that determines if an item is available.
You will need to ensure the attribute has been set as an attributeForFaceting
.