Magidoc

Real-Time Stock Levels

Real-time stock levels are important for a number of reasons but that doesn't mean that we need you to keep the stock level 100% in sync on Cloudshelf.

Instead, we take a much simpler approach, when you sync Product Variants you simply let us know if the variant is in stock and/or if it can be purchased.

This lets you handle the follow product types:

  1. In stock; available to purchase
  2. Out of stock; available to purchase (These might be pre-order items, or stock you know is arriving soon)
  3. Out of stock; not available to purchase (These might be items you have discontinued, or you just don't know when it's coming back in stock)

So having a couple of stock flags makes syncing super easy, and you can update these flags at any time... but it doesn't let a customer know where they can get an item.

That's where Real-Time Stock Levels come in, building on top the of existing stock flags, the screens in your stores will be able to make live stock level requests.

How does it work?

#

When a customer views a product on your Cloudshelf Screens, the Cloudshelf will make a live request to get the stock level for that product.

It will then show the Real-Time Stock Level on the product page. If the product has since gone out of stock, we will not allow the user to make the purchase.

How to use this feature?

#

This depends on your eCommerce Provider, and assumes you have enabled "local stock" in your cloudshelf.

  1. Shopify - This will all be handled automatically.
  2. Other Platforms - Provide a stock levels endpoint (in your organisations settings), which follows our example below. Note that the search params will be added to the url you provide automatically at runtime.

You provide

    
  

We call

    
  

Which would return a small JSON payload that looks like this:

    
  

It should be noted that if location is not provided you should still provide results for locations , and just provide null for location . We have an open source example in our Shopify Connector