This blog post describes how IoT enables companies optimize the replenishment process. The blog post also discusses how
SAP Leonardo IoT can be used by customers to realize this scenario.
The Replenishment Scenario
Many companies in the food processing, chemical, pharmaceutical, and other industries produce material and store them in either Silos or Containers (not to be confused with shipping containers). Material in containers are then shipped to their customers. Companies miss out on the usage level of material in Silos or Containers and face challenges to refill based on the ad hoc requests from customers. Generally, at customer site, traditional way of stock keeping is used which involves conventional methods such as weigh bridges, manual inspection etc. Not only is this prone to mistakes/mismatches, but is also an inefficient way of tracking stock. The stock also doesn’t depict the current levels but there is always a lag between the readings and update to the system, this causes a lag in the stock level visibility.
Another issue companies face due to the lack of data is to maintain more inventory. Not having data on consumption patterns at customer locations results in companies increasing inventory on their side to ensure readiness to demand. This becomes more relevant for smaller companies (larger companies tend to have schedules for delivery).
The role of IoT
A way ahead for such situations is to employ IoT to gain insights and automate parts of the supply chain. A simple example of this would be to install a fill level sensor to each of these silos/containers. The next step would be to contextualize sensor data by adding business data. Details about the material is stored in a silo, business partner associated with the container provides the necessary business context to make meaningful decisions out of sensor data. With this, companies can track stock/inventory at real time. They also gain insights on consumption patterns of different materials at different customer locations at all point of time. By creating business rules based on IoT data and other business data such as lead time to delivery, companies can automate the process of delivery. The required business process flow can now be automatically created. By always providing the latest value, IoT helps out to find the mismatch between the actual quantity of material received and the quantity mentioned in the Goods Receipt.
The below figure shows an example of how IoT enabled replenishment scenario looks like.
How to achieve IoT enabled replenishment scenario using SAP Leonardo IoT
Sensors that are fit to Containers/Silos (modeled as Things) send data to SAP Leonardo IoT. On the other hand, business data is added via integration with SAP ERP systems. Rules that are created on sensor data (in this case, rule to detect low fill level) trigger backend actions such as creation of purchase requisition. The further process of creation of purchase order and goods receipt is carried on. When the quantity is completely exhausted in the container/silo, you are ready refill based on the stock replenished earlier.
Users can use the following steps to realize the replenishment scenario using the services provided by SAP Leonardo IoT
Define the business scenario: The first step is to detail the business scenario. This involves identifying the measurable parameter to monitor, sensors to be used, master data required (and from which system), deviations/thresholds of the measure, actions that need to be taken etc.
Create thing model: Based on the sensors used and the properties of the silo/ container, the thing model should be defined. This can be done using APIs or the UI. The thing model will have all properties pertaining to the data that is being sent by the sensor (example: fill level, temperature), and metadata properties (example: container id, storage location, container type) of the thing.
Define master data and backend integration: Define all the master data that is needed (material, business partner/customer) using the custom master data APIs. SAP Leonardo IoT allows users to define 5 properties per master data type created. The user needs to choose properties that are business critical for the use case while defining the master data type. This is done in order to prevent users from replicating the whole master data in SAP Leonardo IoT
Backend Integration to fetch master data: To get the master data, one needs to define the method of integration with the source of the master data (in this use case, SAP S/4HANA). CPI iFlows are generally used to enable the integration.
Rules and action definition: SAP Leonardo IoT rules engine allows users to define rules based on their business need. Example: Fill level lesser than 100 tons. Users can define rules on streaming data as well as rules on persisted data (batch rules). Once the rule is defined, the user can create a variety of actions. Some of these are: email to the concerned person, in-app notification, REST call to a service (such as creation of Purchase Requisition in SAP S/4HANA). These can be achieved through both APIs and UI.
Develop UI for visualization: Users can build UI using a variety of templates available by integrating the right API/services with the templates.
A sample code to realize parts of the replenishment scenario using SAP Leonardo IoT is published in the following GitHub (
https://github.com/SAP-samples/leonardo-iot-replenishment-scenario). This sample code can be used to quickly configure the scenario in SAP Leonardo IoT and further extended. The sample code focuses on thing modeling, custom master data, UI for data visualization, rules and in-app notification. You could extend this to define the iflow to connect to SAP S/4HANA system to trigger the required business processes like purchase requisition.