Try Microsoft Edge
A fast and secure browser that's designed for Windows 10
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 :
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.
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
L’article IA applied to MSDyn365FO thanks to LUIS and Flow (2/2) est apparu en premier sur D365Tour.