Ecommerce Blog Filters
Picture for blog post How to send notifications to suppliers when their products hit a low stock quantity

How to send notifications to suppliers when their products hit a low stock quantity

Created on:  12.10.2021

Say hello to our newest article. The article is based on one of our development. This week we would like to show you how to avoid delays in supply chain management.

As always we will base on our ASP.NET Shopping Cart — GrandNode. Which was created for ERP systems. GrandNode is an advanced platform that interacts with ERP, WMS, OMS systems to improve many business processes.

Prerequisite

  1. GrandNode
  2. Valid Azure subscription
  3. Webhooks plugin

Introduction

In the previous article, you’ve learned what Azure Logic App is, how to create two examples of usage, and how to connect GrandNode with Azure Logic Apps. If you haven’t seen it, let’s check it here.

Challenge

The modern supply chain must evolve to meet new demands and supply chain challenges. Delays in supply chain management are one of the most important challenges that supply chain managers have to deal with.

Our challenge to solve was to reduce the time of the supplier reaction when our customers’ products will be running out. We had to implement a mechanism that will react quickly. That’s why we decided to implement a solution based on Azure Logic Apps and Webhooks. The whole workflow is more advanced, however, we want to teach you how to implement at least the basics of it to solve your problems. Enjoy!

Solution

Send notification to the supplier when their products hit the low stock quantity

First of all, it’s time to create our Logic App. Create a new resource and in the search bar enter “Logic app”, open it and press the Create button.

Fill in the necessary fields like Logic App Name, select Region of the resource, Subscription, and Resource Group.

When you finish that press the Review + create button.

On the main page of the newly created Logic App, we should press the Logic app designer menu item.

In the search bar, we need to look for the Request group of triggers. We should find the “When an HTTP request is received” trigger.

In the first step, we have to generate a webhook for this event. To achieve that, we need to create a webhook on our store via our plugin. We need to select the type of Webhook — LowStock. After that, we need to make a test action, make an order, make a product reach low stock status, and open generated webhook.

We need to copy the Body field.

We need to paste it into the Use sample payload to generate schema. After that Logic App will generate a Body JSON schema for us.

It’s time to select action, press the Add new action button, and find Send an email from the Office365 group.

In the body field, we need to specify the body of our email message. You can use their dynamic content that is generated by our schema. In our example, we just want to pass information about the stock quantity.

If you don’t see any field, you can use also an expression that is available below. In the brackets enter the field that is available to see in the schema.

triggerBody()?['StockQuantity']

Save changes and that’s all.

What can we do next with it?

Well, in many cases for our customers, we have to implement a further scenario that includes an XML creation from the JSON coming from the webhook plugin. Then we were able to send this XML to their ERP system and process it in it.

back to top
Filters