Infor M3 & Telegram Notification

Guastalli Davide
4 min readNov 6, 2022

Hi all! First of all I’ll like to introduce myself: I’m Davide Guastalli, Technical Leader on Infor M3 and on the whole Infor OS stack at Horsa Group.

Today, we’ll talk about an implementation that sounds more like an exercise but can be very helpful when talking about end customers.
Nowadays, more and more e-commerce, shops and company talk with their customer and update them on their order status with apps, sms, notifications, and so on.

As I said, this is just an exercise to provide a demo of this implementation using Infor Cloudsuite (in this case Infor M3) and Telegram APIs.
In my opinion, with some changes, all these steps can be done in On-Premise version too.

I’ll structure this article into three main parts:

Create a simple telegram bot
Setup Infor M3 to: publish events and store customer telegram account
Interact with telegram APIs to send the actual message to the customer.

To simplify the flow, we’ll publish an event each time customer master will change: we change the customer name, the status, and so on. We choose this because it’s a standard integration rule from Infor.

Create a Telegram BOT

Telegram offers two kinds of APIs: Telegram APIs and BOT APIs. In our case we choose BOT APIs (please read official Telegram documentation, it’s clear enough!)

Fast path:
Write to “botfather” on Telegram(name is pretty clear!)
You will receive your secret key, that is useful to call REST APIs: the endpoint will be

https://api.telegram.org/bot<token>/METHOD_NAME

Now, you have to setup the ION API with the right endpoint and documentation.
As this can be a long topic, another guide will follow on this!
Anyway, Infor documentation will be useful for you.

Once done, we can proceed with our favourite ERP!

Setup Infor M3

Into M3 and ION we have two main actions to be done: store customers’ telegram account and setup M3 to publish the event.

To store the customer telegram account we only have to add a CMS080 custom field where we can store the account number (indeed useful to know where to send the notification)

Customer defined field basic setup

Once done, we can drag and drop on CRS610 program to make it available to users.

“Telegram” field added to panel E of CRS610

Then, as we said, we need to enable the standard rule from M3 Event Analytics and BOD Processor.
As Customer is involved, we need to activate the Sync.CustomerPartyMaster to be produced from our ERP.

From Infor Event Analytics we start M3BODs_CustomerShipToBillToPayFromMaster if not yet activated

And from BODProcessor we activate the BOD Publishing from M3

For our company and division

After we saved, reload and confirmed all the things we need to confirm, we can go to the ION Desk setup.

Interact with Telegram API

As you might know, ION Desk is a middleware and an integration platform provided by Infor to allow you integrate Infor M3 to most third party software via XML files, API, Message queues, database or flat files.

So, in our excercise we’ll use ION Desk and ION API to interact with Telegram APIs.

In the first step, we already configured our ION API, so we need to let ION Desk know how to use that. We’re now adding a workflow that instead of human activities it automate some steps: in our case, it calls M3 APIs to get the telegram account, it sets the message and it calls Telegram BOT api to send the actual message.

Example workflow

In the “Telegram” ION API part you’ll find also how we call the telegram API (basically, channel and message only in our case)

In the end, we add our workflow in our already existing (as you might see) document flow and activate it.

Test

We change our customer name, after having assigned his own Telegram channel

The update in M3 CRS610

And we received the alert on our smartphone

So.. here it is! Of course you can extend this “demo” function as you want with a million of use case..

See you soon with other M3 and Infor OS pills!

--

--

Guastalli Davide

Senior Technical Consultant on Infor M3 and Infor OS Technical stack. +10yrs on consultancy, technology addicted, currently employed at Horsa Group