Out of Stock Recommendations

Miso's Recommendation Engine can help keep customers exploring on your site, even when certain products are out of stock.

Example for Out of Stock Recommendations

Introduction

It’s common for things to be out of stock. Whether it’s because of a seasonal sale, a viral new trend, or supply chain issues, it is undoubtedly a frustrating experience for retailers looking to build customer loyalty and for customers trying to purchase the products they want. Here are some scenarios where this sentiment is all-too-familiar:

  • Adding a product to the shopping cart and returning shortly after to find it’s no longer available
  • Receiving an email for a clearance sale, only to find no products in your size
  • Seeing an interesting product in the search results, only to find it’s unavailable in the product detail page

In this article, we’ll take a look at techniques you can employ on your site to keep customers exploring products and drive conversions, even when certain products are out of stock.

bread_thumbnail.png

Do it with APIs

Handling Out of Stock recommendation scenarios simply requires two steps: (1) sending product inventory data to Miso and (2) using the Product to Products API to recommend in stock products.

Sending product inventory data to Miso

You can periodically upload inventory data to Miso with the Products API, using any upload schedule that makes sense for your business. The availability field in the product catalog can be updated with values such as "IN_STOCK" or "OUT_OF_STOCK". You can also create a custom attribute such as "custom_attributes.inventory_amt" : int to track the exact quantity available.

Here’s a sample request for updating inventory data, using both the availability field and a custom attribute called inventory_amt.

//Sample Request
POST /v1/products
{
    "data" : [
        {
            "product_id" : "Sony_PS5_Digital",
            "availability" : "OUT_OF_STOCK",
            "custom_attributes" : {
                "inventory_amt" : 0
            }
        }
    ]
}

There are several key benefits to sending inventory updates to Miso:

  • Fewer API calls - By consolidating inventory data, you can make fewer API calls when loading web pages and create a more responsive browsing experience for your customers.
  • Train your engine - Have Miso’s Recommendation Engine account for inventory data during training to rank items lower if they’re out of stock.
  • Strategically merchandise based on inventory - Miso supports various merchandising tools, such as filtering, boosting, and anchoring, to fine-tune your product recommendations based on inventory level.

Use the Product to Products API to show similar products

Suppose a customer clicks on a product details page and sees the item they are interested in is out of stock - or a customer adds an item to their cart and returns a while later to find out that it is no longer available. In these cases, it is advantageous to provide the customer with a “Similar Products” carousel. With a single API call, Miso’s Product to Products API can be used to recommend products that are similar to the out of stock product.

In this example, a customer is looking for some whole wheat bread, only to find that their go-to brand is out of stock. We’ll use the Product to Products API to recommend similar products, based on the product_id, and using a filter (fq) to ensure the recommended products are in stock.

//Request
POST /v1/recommendation/product_to_products
{
    "user_id" : "user-123",
    "product_id" : "daves_killer_whole_grain_27oz"
    "fq" : "availability:\"IN_STOCK\"" //only recommend in stock products
}

//Response
{
    "data" : {
        "products" : [
            {
                "product_id" : "simple_truth_whole_grain_17oz"
                "availability" : "IN_STOCK"
            },
            {
                "product_id" : "sara_lee_whole_grain_15oz"
                "availability" : "IN_STOCK"
            }
        ]
    }
}

Miso’s Product to Products API will return related items - the Simple Truth whole grain bread and the Sara Lee whole grain bread - which are comparable substitutes for someone looking to make a sandwich.

For more information on the Product to Products API, check out our Product to Products API documentation.

Tips and Tricks

  • If you’d like to entirely exclude out of stock products from being recommended, you can filter the results using the fl parameter. For more information on filtering, check out our Filtering Recipe.

Additional Resources

For more information on Miso’s Recommendation API, check out the official API Documentation.

For more recipes like this, visit the Recipes page on our Docs site.

Published Date: March 18th, 2022

Icon/Activity Icon/Add Icon/API Icon/Arrow/Down Icon/Arrow/Left Icon/Arrow/Right Icon/Arrow/TopRight Icon/Arrow/Up Icon/Bento Icon/Billing Icon/Bin Icon/Book Icon/Bookmark/Default Icon/Bookmark/Filled Icon/Calendar Icon/Caret/Down Icon/Caret/Up Icon/Chavron/DownIcon/Chavron/LeftIcon/Chavron/RightIcon/Chavron/UpIcon/Checknox/CheckedIcon/Checknox/Unchecked Icon/Checklist Icon/Chip Icon/Clipboard / Copied Icon/Clipboard/Default Icon/Clock/Stopwatch Icon/CMD Icon/Data/Catalog Icon/Data/Engine Icon/Data/Group Icon/Data/Interact Icon/Data/Users Icon/Dive Icon/Docs/Key Icon/Dojo Icon/Email Icon/Env/Development Icon/Env/Playground Icon/Env/Prod Icon/Folder Icon/Fullscreen/Collapse Icon/Fullscreen/Expand Icon/Guides/Multiple Icon/Guides/Single Icon/Hashtag Icon/Heart/Outline Icon/Heart/Solid Icon / Cart z Icon / Click Icon / Clock Icon / Data Icon / Doc Icon / EmptyCart z Icon/Social/Facebook Icon / Genome Incognito Icon / Money Icon/Social/ProductHunt Icon / Search Icon/Social/Twitter Icon / User Icon/Info/Error Icon/Info/Info Icon/Info/Question Icon/Info/Warning Icon/Interact/Download Icon/Interact/Edit Icon/Interact/External v2 Icon/Interact/External Icon/Interact/Filter Icon/Interact/Logout Icon/Interact/Options Icon/Interact/Re-order Icon/Interact/Reload Icon/Interact/Remove Icon/Interact/Replace Icon/Interact/Search Icon/Interact/Shuffle Icon/Interact/Undo Icon/Interact/Upload Icon/Interact/Video Icon/Invoice Icon/Loading Icon/Loading Icon/Lock/Locked Icon/Lock/Unlocked Icon/Lock Icon/Mapping Menu Icon/Notification Icon/Overview Icon/Person/Team Icon/Person/User Icon/Plan/Enterprise Icon/Plan/Growth Icon/Plan/Startup Icon/Plan/Trial Icon/Recipe Icon/Rocket Icon/Settings/App Icon/Settings/User Icon/Settings Icon/Shrine Icon/Sidebar/Close Icon/Sidebar/Open Icon/Slideout Icon/Sort/Ascending Icon/Sort/Default Icon/Sort/Descending Icon/Star/Filled Icon/Star/Outlined Stopwatch Icon/Support Icon/Tag Icon/Interact/Thumb/Dislike Icon/Interact/Thumb/Like Icon/Tick Icon/Trend/New Icon/Trend/Trending Icon/Tutorial Icon/Lock/Unlocked Icon/View/Grid Icon/View/List Icon/Watchlist/Add