Nawaf Sayed
8 min readFeb 27, 2024

Mastering Inventory Management with Graph Analytics

In today’s dynamic business landscape, efficient inventory management is not just a necessity; it’s a competitive advantage. Businesses grapple with vast volumes of data, intricate supply chain networks, and the need for real-time insights. Traditional approaches often fall short in providing the agility and depth required to navigate this complexity. Enter Graph Database (TigerGraph) — a game-changer in the realm of inventory management.

Our recent endeavor centered around crafting an Inventory Management Dashboard powered by TigerGraph a graph database . This system is developed to provide businesses with a computationally efficient hence cost effective and intuitive way to manage their inventory, track assets, emulate inventory status for forecasted sales and gain valuable insights into their supply chain operations leveraging graph capabilities and algorithms.This innovative system isn’t just another tool; it’s a paradigm shift. Here’s why:

1.1 Project Objectives

  • Streamlined Inventory Management: The primary goal was to simplify inventory management processes for businesses by centralizing data coming from various heterogeneous sources of data in a graph database providing a 360 view.
  • Real-time Visibility: We aimed to provide real-time visibility into inventory levels, allowing businesses to make informed decisions promptly leveraging the speed of graph and parallel processing.
  • Scalability: The solution was designed to handle large volumes of data and the growing needs of the business at less cost.

1.2 Motivation behind choosing Graph Database and Analytics

Complex Relationship Network
  • Complex Relationships: In inventory management, products are not isolated entities; they have intricate relationships with various components of the supply chain. There is a network of dependencies for each calculation, hence these relationships can be best represented as a graph, where nodes represent entities like products, suppliers, warehouses, and sites and edges represent connections between them. A graph database’s inherent ability to model and navigate complex relationships makes it an ideal choice.
  • Real-Time Visibility: Supply chains are dynamic, real-time visibility into inventory levels, movement, and transactions is crucial.
  • Efficient Querying: Writing queries in a graph database to retrieve information about connected entities is often more intuitive and faster than using traditional relational databases. This makes it easier for businesses to ask complex questions about their inventory, such as identifying bottlenecks in the supply chain, tracking the flow of products, or finding alternate suppliers quickly.
  • Cost Savings: By leveraging the efficiency and speed of graph databases, businesses can reduce the computational resources required for inventory management tasks. This translates into cost savings, as fewer hardware resources are needed to handle the same workload. Additionally, faster query response times enable more agile decision-making, potentially reducing operational costs related to overstocking or stock outs.queris involving traversing relationships(joins) of data is often expensive in tradistional databases like SQL especially if it requires deep relation analytics but not the case with graph database.

1.3 Project Features

1.3.1 Root Cause Analysis:

Based on sales forecasts the supply chain for the forecasted dates are emulated and insights are provided on whether the inventory and production rate is able to meet the forecasted demand, if not then the root cause is pointed out.

Graph visualization: Visualizes the supply chain graph of input end-product for the given forecasted date where each vertex shows the inventory status (red if out of stock else green) and whether a given inventory of dependent product meets the demand.

Forecast vs Estimate: If demand is not met it calculates how much it can produce from the current inventory and then compares it against the forecasted sales and measures loss incurred.

Date wise and overall report: Generates the overall report that signifies the stock status, stock level, utilization rate and loss made due to not meeting forecasted sales for each date.

Example: Considering the past usage of materials and analyzing its use in the future and checking if we currently have the required amount of stock which would fulfill further demand.

Root Cause Analysis on TigerGraph Insights

1.3.2 Risk Analysis

Based on certain factors like site dependency, importance of material produced, risk scores are assigned that signify the priority. Any discrepancies in the score can lead to disruption in the supply chain and hence affect the production of the end product.

SITE RISK REPORT: Gives the risk score, dependent materials and its dependency score, site importance, end products utilizing it for all sites.

Risk Score is calculated in the following way:

  • Get the material importance (importance with respective to the whole manufacturing supply chain) score using page rank algorithm.
  • Traverse each site and if the site produces an important material according to the algorithm and the given material has high dependency of above 90% on site, increment alert score by big margin. Higher the importance of the material greater is the score.
  • For a given site check which end product is utilizing the material it is producing, if it is “A” listed product increment the alert score more.
  • Check the number of end products utilizing the material and increase the alert score by the length.
  • Check the number of materials it is producing and increase the alert score by the length.

Example: Considering site 5 as the input, we check which products it is producing, how much of it was used previously and how much impact the site has on the product and does it have enough stocking to meet the future demand. If not, the risk score is high.

Risk Analysis on TigerGraph Insights

1.3.3 Site Analysis:

Detailed analysis of site which highlights key factors which contribute to risk score, also gives insights to the present state of site production level, and compares against the optimal production level based on several factors.

Risk Score: Gives the risk score of the input site.

Risk Rank: Gives ranking of input site based on alert score.

Importance Rank: Gives ranking to the input site based on importance given using page rank.

Example: Aluminum rods are considered important as they are used by many other sub-materials like sensors, rims, etc.

Production Ratio: Gives the production ratio of all materials it is producing. Gives the dependency of each material it is producing on the site. If a site is producing rubber and there are 2 sites producing it, then we calculate what percentage each site contributes with respect to the total production.

Produce Delivery Deviation: Gives the performance of the site in terms of production delivery time based on deviation from prescribed delivery time.

Example: Considering site 10 as the input, we take into consideration the product which it is producing and which products are using it and what is their product importance score, based on which the site is given an importance score. If that is the only site that is producing that product, then the product is at risk therefore the site will have a higher risk score.

Site Analysis on TigerGraph Insights

1.3.4 Inventory Management:

Gives insights on the inventory status and calculates what should be the optimal inventory level based on past consumption, inventory replenishment time and calculates the loss in cost incurred due to either over or under stocking.

Optimal stock is calculated using the formula lead time (replenishment time) x Average orders + bias.

Lead time is calculated by adding the deviation of past lead time, which is regularly, dynamically recalculated.

For bias we consider the same factors as we did for calculating risk score which are material importance, material dependence, the importance of the end-product utilizing that material, count of the end products utilizing that material, count material in the inventory and deviation from the delivery time.

It also displays the comparison of optimal stock against current stock and calculates the loss incurred due to over or understocking from the optimal level.

Example: Taking a site as a input we check the importance of the product that it is producing and the risk score of the site is checked and based on which the optimal inventory is calculated and compared against the current stock.

Inventory Management on TigerGraph Insights

1.3.5 Impact Analysis:

Gives detailed information about how each site is affected when one or more site’s production capability is reduced.

This is done by first generating the production capabilities of the sites which are dependent on the affected site and then getting the percentage of effect on the site by considering how much is being produced and how much should have been produced.

It also displays a graph in which we can visualize how the site and products are related to each other, and the number of sites which they have for production. It shows the overall impact on the production line due to reduced production from the given site, and shows the maximum impacted product, which lets us decide on adding more production sites for producing the product. This helps to reduce the risk involved in producing the product, the minimum impacted product that shows that these products have their production capacities are well distributed.

Example: The production of site 5 is reduced by 50% and it produces rubber, so here we calculate how much the total production of rubber is affected, how the other materials that are using rubber are affected and in turn those products that are using the sub-products.

Impact Analysis on TigerGraph Insights

1.5 Conclusion

  • Most of the calculations involves a complex interdependent network,which would be very computationally demanding if traditional database like sql is used which would involve several costly join and complex queries.
  • Leveraging a graph database with parallel processing (Tiger Graph)results in drastic reduction in computational requirements for achieving high speed and real time analytics.
  • Leveraging graph also makes writing queries relatively easier as it involves traversing the relationship/dependencies with ease enabling client to ask complex business questions about their supply chain with ease.
  • Modeling Data as Graphs Allows Efficient Utilization of Graph Algorithms, Deriving more Insights Effectively

If you’d like to gain more insights into this powerful tool, you can connect with me on LinkedIn: Nawaf Sayed