Skip to main content

Escalate urgent Orders to Order Managers

This automation identifies urgent orders by comparing delivery dates across multiple data tables. It aggregates the relevant order details into a formatted HTML table and sends an automated notification to a designated Microsoft Teams recipient, channel, or group. This replaces the manual process of querying tables and drafting individual escalation messages.

This Action Flow automates the escalation process through the following steps:

  1. Data Extraction: Queries specific data models to retrieve order details and delivery dates.

  2. Data Aggregation: Consolidates the retrieved records into a structured HTML format and applies date formatting.

  3. Notification: Delivers the formatted HTML table to a designated Microsoft Teams channel or recipient.

55707107.png

Below you will find the step-by-step guide for configuring each module of the above Action Flow.

To get the data you want to use in the HTML Table you have to set up the Celonis Query Data Model. All information on how to do it can be found here. We use some Demo Data here as an example, getting Order IDs and the corresponding delivery dates.

For the example we decided to filter the rows for the customer BASF SE, to have a smaller amount of example data. Thus we adjusted the row limit to 100. Make sure to always define a suitable row limit for your data.

55707108.png

Configuration:

Action Flows Module: Celonis

Action: Query Data

55707111.png
55707112.png

to build up a html table you have to define a structure with table rows (<tr>) and table cells (<td>) which will later be included in a table structure to get the right format. Here you have the chance to format dates as we show it with the Delivery Dates.

Add for each column you want to have in your resulting table the structure <td> data of the column</td>

Text:

<tr>
<td>{{1.`Order ID`}}</td>
<td> {{formatDate(1.`Delivery Date`; "DD.MM.YYYY")}}</td>
</tr>
55707109.png

Configuration:

Action Flows Module: Tools

Action: Text Aggregator

57542297.png

To make sure to send only the urgent cases of BASF SE in the database we set up a filter defining some criteria . In our example we only want to consider sales orders which have a requested delivery within the next two weeks.

55707114.png

To send a message in Teams you have to connect your account and grant celonis access to your teams account. In the module you have the possibility to either send a channel or chat message. In this example we'll send a channel message.

When sending a channel message you can choose between selecting the channel from the list or toggle the map button and provide the team and channel id.

Team and Channel ID

How to get the team and channel id?

Go to the channel in teams and open the drop down menu by right clicking. Choose 'Get link to channel'. The link will be structured as follows:

https://teams.microsoft.com/l/channel/CHANNEL_ID/something?groupId=TEAM_ID&amp;tenantId....

Example:

https://teams.microsoft.com/l/channel/19%3aca2c45182d344aa476de1f8c5%40thread.tacv2/Test%2520Channel?groupId=2d563777-8a8d-4cb3-bf58-45aa62cefae2&amp;tenantId=b7ace95d-83d7-4723-85c7-b1575720809d

When sending a chat message you can send the message in a group or one-to-one, selecting members of the chat out of a menu or providing the IDs.

Content Type: HTML

Message:

<html>

<head>

<style> table, th, td {border: 1px solid black;border-collapse: collapse;} </style>

</head>

<body>

<h2> Delivery Dates </h2>

<p> See below the urgent Delivery Dates of BASF SE.</p>

table html code:

<table style="width:100%">

<tr>

<th>Order ID</th>

<th>Delivery Date</th>

</tr>

{{2.text}}

</table>

</body>

</html>

HTML Tables

Find more information on how to send HTML tables in a mail and how to adapt the HTML code to your needs in this template.

55707110.png

Configuration:

Action Flows Module: Microsoft Teams

Action: Send a Message

55707119.png
57540655.png
57542296.png
55707117.png

Related topics