Location>code7788 >text

SaaS Architecture: Centralized Inventory System Architecture Design

Popularity:182 ℃/2024-10-14 11:23:02

Hello, I'm Master Tang~

In recent years, more and more retail enterprises have vigorously developed omni-channel business. In terms of sales growth, traffic realization channels are expanded through online small programs, live broadcasts and platform channels. In terms of membership growth, omni-channel reaches consumers and expands membership scale through various interactive methods. And omni-channel inventory management is gradually turning into a core activity for retailers in terms of channel operation, which is also the key to improving inventory turnover and ensuring profits.

Under the omni-channel model, each channel must have a sufficient amount of goods to meet customer demand, and at the same time need to effectively manage the total inventory and balance the inventory of each channel in order to minimize out-of-stock or slow-moving situations.

Challenges of inventory management under the omni-channel model

Against the backdrop of the convergence of online and offline channels, retailers who fail to manage their omni-channel inventories can bring about a number of problems:

  • Inventory is fragmented across channels, and when online and offline promotions are conducted, merchandise is oversold, causing customer complaints.
  • Inventory is poorly allocated across channels and either out of stock or backlogged.
  • Inventory data across channels is not updated in a timely manner, orders cannot be placed even though they are in stock, and sales opportunities are lost in large numbers.
  • Inventory data is dispersed in various systems and is not accessible, making it impossible to know the distribution of inventory and to harmonize purchasing/reallocation.
  • It is not possible to intelligently separate warehouses and deliver goods nearby based on the user's order information.

Positioning of the centralized inventory system

Downward docking of local warehouses/stores inventory, the local inventory in the "one inventory", management, unified deployment.

Upwardly open all sales channel platforms to realize omni-channel inventory sharing and automated operations.

Key concepts of a centralized inventory system

Overall operational framework for the centralized inventory

The central inventory system divides inventory management into three layers, the sales layer, the scheduling layer, and the warehouse layer, to maximize inventory utilization and support various business scenarios under the multi-warehouse, multi-channel model.

warehouse floor

The positioning of the warehouse layer is to manage the warehouse inventory, generally use the warehouse WMS, store system or ERP system to manage the warehouse purchase and sale of inventory, through the entry and exit documents to change the warehouse inventory quantity.

Key attributes of warehouse inventory include: owner, warehouse/store, SKU, lot number, date of manufacture, inventory status, and warehouse location.

  • Owner: The person who owns the goods.
  • Warehouse/Store: a logical unit for storing goods, here it needs to be separated from the physical world warehouse area, and it may be that a physical warehouse contains multiple logical warehouse units.
  • Batch number: Used to differentiate each batch of products produced by feeding, in order to trace the responsibility of this batch of products after the fact, each batch of products has a corresponding batch number.
  • Production date: The date and time when the production line packages out a ready-to-sell finished product.
  • Inventory Status: Describe the different statuses of inventory in different business scenarios, e.g., available, frozen, in-transit, defective, scrap, etc.
  • Stock space: generally refers to the actual stock space that exists in a factory warehouse, such as a single shelf. It is also the smallest granularity of SKU inventory.

scheduling layer

The scheduling layer is positioned to summarize the total inventory of all inventory states in each warehouse/store, but unlike warehouse inventory, the physical inventory in the scheduling layer doesn't need to manage fine-grained inventory dimensions such as lot number, warehouse location, and so on, and only needs to manage the total amount of physical inventory in each inventory state, which is a kind of decoupled design approach.

Key attributes of physical inventory include: warehouse/store, SKU, inventory status, etc. Key concepts include:

  • Inventory in Transit: Inventory that has been shipped by a supplier but has not yet been warehoused, and is sometimes used to expand sales inventory quantities in order to expand sales opportunities.
  • Available Physical Inventory: The inventory actually available for sale in the warehouse.
  • Unavailable physical inventory: i.e. unavailable inventory in the corresponding warehouse.
  • Sales Pre-occupied Inventory: After the order is submitted and successfully divided into warehouses, the inventory of the corresponding warehouse will be pre-occupied, and the pre-occupied inventory will be deducted after the order is canceled or shipped.
  • Sales Available Inventory: Sales Available Inventory = Available Physical Inventory - Sales Pre-occupied Inventory.

sales floor

The positioning of the sales layer is to manage the channel inventory of each sales channel, provide inventory calculation and inventory synchronization services for the sales platform, and allocate inventory through various channel inventory allocation strategies to prevent overselling and safeguard optimal profits.

Key attributes of sales inventory include:

  • Sales channels: including self-operated online stores, stores offline channels, Tmall, Jingdong, Meituan, Hungry Mou and other three-way platforms.
  • Selling store: the store or store where the sale is made.
  • Shipping method: express delivery, same city delivery, self-pickup.
  • Distribution area: Since the distribution area covered by each warehouse is different, the distribution range that SKU can support is also different.

Key concepts in selling inventory:

  • Sales Available Inventory: The amount of inventory available for sale is calculated and summarized in accordance with the warehouse/store supply relationship and the channel inventory allocation policy. The sales available inventory is deducted when the order is submitted successfully. When the physical inventory in the dispatch layer is updated, the sales layer needs to be triggered to recalculate the sales available inventory.
  • Pre-sale Inventory: If the goods have not arrived, you can turn on the pre-sale mode and sell them in advance. The physical inventory is segregated from the pre-sale inventory, and when the physical item arrives, the pre-sale inventory is uniformly pushed to the physical inventory for fulfillment.
  • Pre-occupied Inventory: Before the order is submitted but not paid, the inventory will be pre-occupied in order to reserve the product for the customer, and then the pre-occupied inventory will be deleted and the sellable inventory will be deducted after the payment is made. If the order remains unpaid for a long time, the order will be canceled and the pre-occupied inventory will be released.
  • Active Inventory: When doing promotional activities for certain SKUs, such as special price and spike activities, you need to set up active inventory, you can reserve some inventory from normal inventory and release the reserved inventory after the activity starts. If the number of orders placed for the active product is equal to the total number of inventory planned for the activity, the activity will be terminated. Activity orders and normal orders, in the inventory processing logic is exactly the same. If there are no special requirements, there is no need to separate the activity inventory separately, as an independent business processing, this will be two more sets of inventory logic, the three-tier inventory architecture need to be independently separated from the processing, greatly increasing the complexity.
  • Reserve Inventory: If you need to reserve inventory in advance for certain promotional activities so as not to have insufficient inventory after the activities start, you can set up a reserve inventory.
  • Available Inventory = Pre-sale Inventory + Sales Available Inventory - Pre-occupied Inventory - Reserved Inventory.

sales channel level

The sales channel layer represents various sales channel platforms, including self-operated online stores, store channels, Tmall, Jingdong, Meituan, Hungry's and other three-way platforms.

Logic Modeling

Core scenarios for inventory

Scheduling Layer Synchronization Logic

The physical inventory at the dispatch level comes from the inventory of the individual warehouses and is generally synchronized in two modes:

  • Flow synchronization mode: applicable to the internal system through the ability to access the warehouse / store inventory flow, through the return of the flow, change the scheduling layer of physical inventory quantities. The advantage of doing so is that there is a very clear record of changes in the physical inventory flow, easy to track down the details of each inventory change, need to pay attention to do a good job of power and other processing, to avoid duplicate synchronization leads to errors in the change of inventory quantities.
  • Quantity Synchronization Mode: Applicable to external system docking, generally can not get the detailed inventory flow, through the merchant background or system docking way to synchronize inventory real-time quantity.

Sales Inventory Calculation Logic

Under the multi-warehouse, multi-channel model of new retail, in order to realize omni-channel inventory sharing and inventory aggregation for "one pallet" management, it is necessary to take into full consideration the characteristics of each warehouse/store, including the supported shipping methods, delivery range, etc. In order to reasonably allocate the inventory, it is necessary to take into account the percentage of the inventory of each sales store. Below are a few common scenarios to illustrate the logic of sales inventory calculation.

multiple warehouse supply scenario

Store A and Store B are two offline stores, Store A has 100 iphone 14s and Store B has 50 iphone 14s.

Suppose the merchant has 1 Tmall flagship store, store A and store B both supply to the Tmall store.

Tmall flagship store only support express delivery method, in order to prevent overselling, set the maximum allocation ratio of express delivery is 80%.

As shown in the example, the final stock quantity of iphone 14 in the Tmall channel is 120, and the quantity is regularly synchronized to the Tmall platform.

Single warehouse supplying multiple stores scenario

The merchant has 1 e-commerce warehouse that provides warehousing services and shipping services for the merchant's various e-commerce platform stores, and the e-commerce warehouse has 100 iphones14.

E-commerce warehouse at the same time for the Jingdong flagship store, Tmall flagship store supply, the two stores only support the express delivery method, the maximum allocation ratio of 40%, 60% respectively.

As shown in the example, the final inventory quantity of iphone 14 in the Jingdong channel is 40, and the inventory quantity of iphone 14 in the Tmall channel is 60.

Store Omni-Channel Inventory Sharing Scenario

With the accelerated integration of new retail online and offline channels, store online and offline omni-channel sales have become the standard for most retail merchants.

Benefit from the WeChat ecosystem and the rapid development of small program e-commerce, more and more stores opened the cloud store mode, the cloud store is actually the store's online trading channels, or called the store's "online shelf".

Chain enterprises graft offline stores into the WeChat ecosystem and upload all the store's goods to the cloud store small program. With the cloud store, consumers can enjoy the services of the store without visiting the store, and at the same time, the shopper of the store can recommend all the cloud store products to their members.

As shown in the example, Store A has 100 copies of strawberry cake, Store A supplies itself and shares the inventory of strawberry cake to multiple sales channels (Meituan takeaway, cloud store, store offline channels), realizing the store's "one plate of goods" omni-channel sales.

Channel inventory synchronization

After the sales inventory is calculated, the channel inventory needs to be synchronized to each platform channel so that the consumer can complete the transaction process. There are two processing logics for channel inventory synchronization depending on the channel type:

  • Self-supporting system: If the self-supporting channel is integrated with the inventory system, i.e. a set of systems, then there is no need for overly complex inventory synchronization logic, and the self-supporting channel can directly read the channel inventory from the central inventory system.
  • Three-party platform system: like Tmall, Jingdong, Meituan, hungry, etc., these three-party platform system belongs to the external system, the merchant can not control their own, you need to develop APIs to synchronize the channel inventory to the three-party platform. Generally speaking, the channel inventory will not be synchronized in real time, that is, as long as there are inventory changes, the channel inventory is calculated and synchronized to the three-party platform. This way is more pressure on the system, and most of the APIs of the three-party platform will be charged according to the amount of calls, therefore, the time interval will be set to regularly synchronize the channel inventory, for example, once every 5 minutes.

Combined merchandise inventory calculations

Combination of goods generally refers to the artificial combination of several individually sold goods together, for the combined sale of goods, for example: afternoon tea sets, Tanabata beauty combinations, and so on.

Combination of goods will first be in the scheduling layer, according to the combination of the proportion of calculated virtual inventory, does not affect the sub-commodity supply logic, when the order is placed, according to the combination of goods identification, the physical inventory of the sub-commodity preoccupation, deduction.

As shown in the figure, in the e-commerce warehouse, there are 150 pieces of commodity A and 200 pieces of commodity B. Based on the combination relationship, it can be calculated that there are 100 pieces of combination commodity C. When the next order of Commodity C is placed, the physical inventory of 1 piece of Commodity A + 2 pieces of Commodity B will be preoccupied.

Application Architecture Design for Centralized Inventory System

wrap-up

This paper describes the challenges of inventory management in an omni-channel model.

To address the challenges, the overall business framework of the centralized inventory system, the key concepts involved, and the processing logic of the core business scenarios of the inventory are described in detail, and finally the application architecture design of the centralized inventory system is briefly introduced.

This article has been featured on, my tech site: Inside there are, algorithm Leetcode detailed explanation, interviews eight stock text, BAT interview questions, resume templates, architecture design, and other experience sharing.