New from O’Reilly: The memory architecture behind adaptive AI agents

Read the report
For AIAvailable to Promise in Real-time Inventory Using Redis
Will Johnston
Will Johnston
Fallback Image
Prasan Kumar

GITHUB CODE

Below is a command to the clone the source code for the application used in this tutorial

git clone https://github.com/redis-developer/redis-real-time-inventory-solutions

What is available-to-promise (ATP)?

The major requirement in a retail inventory system is presenting an accurate, real-time view of inventory to shoppers and store associates enabling buy-online-pickup-in-store (BOPIS). Optimizing fulfillment from multiple inventory locations.

Available to promise (ATP) is the projected amount of inventory left available to sell, not including allocated inventory. It allows businesses to control distribution to their customers and predict inventory. The ATP model helps retailers keep inventory costs down such as ordering costs, carrying costs and stock-out costs. ATP is helpful as long as consumer buying forecasts remain correct. Implementing ATP processes effectively for retailers can mean the difference between sustained growth and an inventory that repeatedly runs out of customer's favorite products missing sales opportunities and harming customer experience.

How to calculate available-to-promise

Calculating available-to-promise is a relatively simple undertaking. Complete the following formula for an accurate breakdown of available-to-promise capabilities:

This formula includes the following elements:

  • QuantityOnHand: the total number of products that are immediately available to a company
  • Supply: the total stock of a product available for sale
  • Demand: the amount of a specific product that consumers are willing to purchase

Current challenges in real time inventory

  • Over and under-stocking: While adopting a multi-channel business model (online & in store), lack of inventory visibility results in over and under-stocking of inventory in different regions and stores.
  • Consumers seek convenience: The ability to search across regional store locations and pickup merchandise immediately rather than wait for shipping is a key differentiator for retailers.
  • Consumers seek speed: All retailers, even small or family-run, must compete against the customer experience of large online retailers like Alibaba, FlipKart, Shopee, and Amazon.
  • High inventory costs: Retailers seek to lower inventory costs by eliminating missed sales from out-of-stock scenarios which also leads to higher “inventory turnover ratios.”
  • Brand value: Inaccurate store inventory counts lead to frustrated customers and lower sales. The operational pain will impact the status quo.

Why you should use Redis for available-to-promise

  • Increased inventory visibility: Redis Cloud provides highly scalable, real-time inventory synchronization between stores providing views into what stock is Available-To-Promise. Customers want to buy from a retailer who can check stock across multiple locations and provide real-time views on what's available locally.
  • Enhanced customer experience: Sub-millisecond latency means online customers can easily get real-time views of shopping carts, pricing, and in stock availability. Redis Cloud built-in search engine delivers full text and aggregated faceted search of inventory in real time, scaling performance to instantly search inventories with millions of product types helping customers fill their shopping carts faster, keeping them engaged and loyal.
  • Cost efficiency at scale: Redis Cloud offers real-time, bi-directional consistency between stores and data integration capabilities with enterprise systems without the complexity and costs of managing message brokers, auditing, and reconciliation.

Real time inventory with Redis

Image

Using Redis, System delivers real-time synchronization of inventory across stores, in transit and warehouses. Provide retailers the most accurate, timely data on inventory across their entire store network and consumers positive customer experiences searching and locating inventory.

Redis Data Integration (RDI) capabilities enable accurate real-time inventory management and system of record synchronization. Redis advanced inventory search and query capabilities provide accurate available inventory information to multichannel and omnichannel customers and store associates.

This solution increases inventory turnover ratios resulting in lower inventory costs, higher revenue and profits. It also reduces the impact of customer searches on Systems of Record and Inventory Management Systems (IMS).

Customer proof points

GITHUB CODE

Below is a command to the clone the source code for the application used in this tutorial

git clone https://github.com/redis-developer/redis-real-time-inventory-solutions

Managing inventory or a SKU (stock keeping unit) process contains some activities like :

  1. RetrieveSKU : Fetch the current quantity of a product
  2. UpdateSKU : Update the latest quantity of a product
  3. IncrementSKU : Increment the quantity by a specific value (Say, when more products are procured)
  4. DecrementSKU : Decrement the quantity by a specific value (Say, after order fulfillment of the product)
  5. RetrieveManySKUs : Fetch the current quantity of multiple products (Say, to verify products in stock before payment)
  6. DecrementManySKUs: Decrement the quantity of multiple products (Say, after an order fulfillment with multiple products)

RetrieveSKU

The code that follows shows an example API request and response for retrieveSKU activity.

retrieveSKU API Request

retrieveSKU API Response

When you make a request, it goes through the API gateway to the inventory service. Ultimately, it ends up calling a retrieveSKU function which looks as follows:

code

UpdateSKU

The code that follows shows an example API request and response for updateSKU activity.

updateSKU API Request

updateSKU API Response

When you make a request, it goes through the API gateway to the inventory service. Ultimately, it ends up calling a updateSKU function which looks as follows:

IncrementSKU

The code that follows shows an example API request and response for incrementSKU activity.

incrementSKU API Request

incrementSKU API Response

When you make a request, it goes through the API gateway to the inventory service. Ultimately, it ends up calling a incrementSKU function which looks as follows:

DecrementSKU

The code that follows shows an example API request and response for decrementSKU activity.

decrementSKU API Request

decrementSKU API Response

When you make a request, it goes through the API gateway to the inventory service. Ultimately, it ends up calling a decrementSKU function which looks as follows:

RetrieveManySKUs

The code that follows shows an example API request and response for retrieveManySKUs activity.

retrieveManySKUs API Request

retrieveManySKUs API Response

When you make a request, it goes through the API gateway to the inventory service. Ultimately, it ends up calling a retrieveManySKUs function which looks as follows:

DecrementManySKUs

The code that follows shows an example API request and response for decrementManySKUs activity.

decrementManySKUs API Request

decrementManySKUs API Response

When you make a request, it goes through the API gateway to the inventory service. Ultimately, it ends up calling a decrementManySKUs function which looks as follows:

Ready to use Redis in a Real time inventory system?

Hopefully, this tutorial has helped you visualize how to use Redis in a Real time inventory system for product availability across different location stores. For additional resources related to this topic, check out the links below:

Additional resources

Real time inventory with Redis

General