Create a web application to optimize your supply chain inventory – IBM Developer


In this code pattern, learn how to create a web-based application to optimize inventory. This code pattern is part of the Develop an intelligent inventory and procurement strategy using AI series, which provides an overview of an inventory and procurement strategy, and explains how a development team can use machine learning tools and techniques to predict demand and control costs.

If you have questions about this code pattern, ask them or look for answers in the associated forum.


Using historical demand data to train a machine learning model, you can predict demand for certain items more accurately in the future, and ensure that your customers are able to purchase what they want. Using this predicted demand as input, along with manufacturing plant data such as cost and capacity, this application enables a store manager to quickly choose the best manufacturing plants to optimize inventory and minimize cost.

When you have completed this code pattern, you understand how to:

  • Deploy a Node.js-based web application
  • Send and receive messages from a deployed IBM Watson® Machine Learning model using REST APIs

Flow diagram

  1. The user creates an IBM Watson Studio Service on IBM® Cloud.
  2. The user creates an IBM Cloud Object Storage Service and adds that to Watson Studio.
  3. The user uploads the demand and plant data files to Watson Studio.
  4. The user creates a Decision Optimization experiment and sets objectives to minimize cost through the modeling assistant.
  5. The user saves the Decision Optimization as a model, and deploys it using Watson Machine Learning.
  6. The user uses the Node.js application to connect to the deployed model through an API and finds the optimal plant selection based on cost and capacity.


Get detailed instructions from the README file. Those instructions explain how to:

  1. Clone the repository.
  2. Set the Model Deployment ID.
  3. Set the Model Space ID.
  4. Create an IBM Cloud API key.
  5. Generate the access token.
  6. Run the application.

This code pattern is part of the Develop an intelligent inventory and procurement strategy using AI series.

Leave a Reply

Your email address will not be published. Required fields are marked *