You are here:
Searchandising - Availability Ranking
Availability Ranking describes an approach of merchandising using the functionality and power of an online product search, expanding the online merchandising activities of merchants to one of the most important tools in an online shop today, the product search. You can use availability ranking to manipulate the search results of a customer query to reflect what you want to highlight. For example, you might want to promote in-stock products, and push products with low stock levels to the end of the search results. This topic applies to B2C Commerce.
Calculating Availability
Product availability is a calculated value reflecting the number of units available to sell (ATS) as compared to the overall allocation. For instance, if the overall allocation is 100 and the ATS is 70, then the availability is calculated as 70/100 or 0.70. For perpetual products, availability is set to 1.0. For products without stock level data, availability is set to 0.0.
The calculated availability is stored in the Availability Index along with the product SKU.
Availability Index
The Ranking Index is an index that contains the calculated availability for a product along with its SKU. This index is updated automatically and incrementally each time:
- Import updates inventory records
- Inventory records are updated in Business Manager
- A shopper places an order in the storefront
The availability index exists on Production systems only and is never staged. This index is never localized; there’s one availability index for the entire site. Multiple sites that share an inventory list also share the search availability index.
Incremental Updates
The incremental index update makes sure that changes are worked into the index automatically and that only those products that changed since the last update was updated.
- Index updates are made to a new ranking index; the existing product index isn't touched
- There’s a clear separation between actual product data and transactional data
- The index rebuild doesn't cause a full rebuild of single documents with all product data
A change to a product's availability is done with an inventory transaction with a positive transaction amount. All transactions after the allocation reset date for this product are considered when calculating the product availability. In addition, the following inventory changes also result in an update to the ranking index:
- Resetting the allocation
- Setting the Perpetual flag on the inventory record for a product
- Setting a pre-/backorder allocation
- Setting the default In-stock flag of the inventory list - using getAvailabilityModel().isInStock()
- Imports of inventory records
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 rank lower to boost sales of the available items. However, merchants can 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’ve 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 is 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 isn’t stageable, while all existing indexes are stageable.
Product Availability Changes
To change a product's availability, create 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 placed orders trigger, and not inventory changes that result from:
- Resetting the allocation
- Setting the perpetual flag on the inventory record for a product
- 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.

