Search Inventory Integration
Merchants want to be able to rank certain products higher (or lower) in search results based on their own criteria.
One such criterion is product availability. Typically, products with lower (or no) availability should be ranked lower to boost sales of the available items. However, merchants might also want to boost the ranking of products with only a few items in stock to deplete items to be discontinued.
Generally, there are tradeoffs when considering dynamic product-related data within search functionality. Customers expect a search that returns results fast, but with data in the search result that is as accurate and up-to-date as possible. If the ranking relevance of products is based on transactional data, such as the product availability, a merchant expects the ranking to change immediately.
To give merchants the ability to rank inventory products, we have added an extra ranking by product availability. Merchants can now:
- Enable or disable dynamic ranking based on availability
- Set an availability threshold, which determines if a product should be pushed to the end of the search results
- Rank less available products lower in search results
- Perform an automatic update of search result ranking based on inventory changes
To control the priority of Availability Ranking and any other sorting criteria in the storefront, use the Sorting Configuration to change the pre-defined order of possible sorting conditions.
Thresholds
To give merchants more flexibility in defining a custom ranking, we provide an extra preference that contains a threshold value. Each product with availability equal or less than this threshold is ranked lower and pushed to the end of the search result set. We don't sort by availability: we merely shift products via extra scoring criteria.
Stageable/Non-Stageable
We have divided search indexes into stageable and non-stageable index types. The additional availability index is not stageable, while all existing indexes are stageable.
Product Availability Changes
A change to a product's availability is typically done by creating an inventory transaction with a positive transaction amount. All transactions after the allocation reset date for this product are considered when calculating the actual stock-level and available-to-sell (ATS) data. This means that we only track inventory changes that are triggered by placed orders, and not inventory changes that result from:
- Resetting the allocation
- Modifying the inventory record for a product by setting the perpetual flag
- Setting a pre-/backorder allocation
- Setting the default in-stock flag of the inventory list - using getAvailabilityModel().isInStock().
These changes are part of a site setup, and not part of routine business. Thus, they require a full availability index rebuild.
API Impact
Import and export of site-specific preferences (preferences.xml) has been extended to support the additional search preference GuidedSearch.AvailabilityLowRankingThreshold.