Prompt
How do I set up recommendation rules for out-of-stock items?
Latest observation
Nov 10, 2026
OpenAI APIWeb search: off
If you mean product recommendation rules in a storefront/search platform, the usual approach for out-of-stock items is:
1) Decide what should happen to OOS items
Common options:
- Exclude them from recommendations
- Show them only if no in-stock alternatives exist
- Push them to the bottom
- Replace them with similar in-stock items
- Keep them in recommendations for preorders/back-in-stock signups
2) Create a stock-based filter rule
Use a condition like:
inventory > 0stock_status = in_stockavailable = true
Then apply it to recommendation placements such as:
- “Customers also bought”
- “Similar products”
- “Trending products”
- “Frequently bought together”
3) Add fallback behavior
If your rule removes too many items, set a fallback:
- First: recommend in-stock, same category
- Then: recommend in-stock, similar price/brand
- Then: recommend best sellers
4) Exclude specific out-of-stock cases
You may want to treat these differently:
- Temporarily out of stock → hide from recommendations
- Discontinued → exclude completely
- Preorderable → allow in recommendations
- Backorderable → allow with a label
5) Test the rule
Check:
- Product detail pages
- Cart recommendations
- Email/push recommendations
- Category page widgets
Make sure the rule works for:
- logged-in vs guest users
- regions/warehouses
- variants vs parent products
Example rule logic
A simple rule might look like:
- IF product stock is
0 - THEN do not recommend it
- ELSE include it in recommendation rankings
Or a ranking rule:
- In-stock items: score
+100 - Low stock items: score
+20 - Out-of-stock items: score
-1000
If you tell me which platform you’re using — for example Shopify, Magento, Salesforce Commerce Cloud, Algolia, Bloomreach, Adobe, or a custom system — I can give you the exact setup steps.