IA applied to MSDyn365FO thanks to LUIS and Flow (2/2)

Posted by
Version Française disponible ici

If you have read the previous post on LUIS, now you are ready to get further on with the interaction between LUIS and Microsoft Dynamics for Finance and Opeations. We have demo this at the last Dynsclub this month (which is the french AXUG basically).

So here I focus on the following process :

  • Paul is a customer of the Contoso company. He send an email to John, wich is a sales data entry operator, with the content of his current order. According to the top scoring intent (SalesQuotation or SalesOrder), the sales orders or quotation is automatically created in the system. And that’s how John’s job is upgraded to control and correct only, he will have more time to do other valuable tasks for the company.

Flow description

Now here is a brief description of the flow implemented for that process. That’s the tricky part. Maybe it would have been easier by using LogicApps but I have  honestly not been looking deeply at LogicApps for now (so if you have advices of what you are about to read let us now).

Here is the process setup :

When a new email is received, you first need to parse the mail content into a text variable.

As you can see we needed yo use some DEBUG variable but don’t pay attention to that.

Then, we have plugged the connection to LUIS with the Desired Intent. Even if we need to evaluate the top scoring intent, it’s not setup in that part.

The next step consists in parsing, extracting and converting variables. LUIS output is a JSON file, so you won’t be able to isolate so easily. The first parsing aim to delete from the JSON file what is not relevant in order to extract what is needed (next steps).

You can see an example here for extracting quantity. Now you understand why the role calculated by the pattern in the previous post is so important.

Then, the Top scoring intent is tested. As you can see, if the result is « CreerDevis », meaning Sales Quotation, the process goes on the Yes part (the left on the screenshot). If not, meaning it’s a Sales order, the process goes on the right part. As it’s a prototype scenario, the case in which the result is not one of the other situation has not been implemented.

The last step of the flow is to connect to MSDyn365FO, and retrieve the customer from the sender of the email. From that point you can initialize a new sales order and adding lines.

What is left to do and could take some times is to proceed with several lines. That is an good topic to focus on but for next time.

Testing the Flow

Now I will test it, and update the Flow in a testing mode.

I send the email. Let’s go.

The Flow has run without any issue. Good sign.

Here is the final result with the creation of a new sales order.

Can’t wait to see the new features of LUIS.

Yohann ROLLAND & Guillaume FAGES

4 comments

Leave a Reply

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.