Dynamics 365 Finance & Operations with Power Automate
Hello Dynamics Community,
Update 1st December 2021 / I will really suggest to read my recent article (2 years after his one about a game changer on this topic !)
With version 10 of Dynamics 365 for Finance & Operations, fifteen (15) application events from Procure to Pay and Quote to Cash are now available out of the box in Dynamics 365 for Finance and Operations. They promise to be a powerful addition enabling self service for certain events, and better cloud integration by triggering an integration instead of periodically checking if something had been posted. Possible business scenarios are infinite and we will cover this with Power Automate (aka Microsoft Flow) in this article !
-
(Purchasing) Send me a push notification to my phone when a purchase order I submitted to workflow is approved.
-
(Sales) Send me an email whenever an invoice is posted for my customer
-
(Accounting/Credit) Track all customer write-offs in an Excel file on SharePoint online
-
(Manufacturing) Set up a mobile notification when a purchase order for an upset customer is received so that you can expedite the material to the work center
-
… the flexibility is amazing especially for an ERP
And a lot more can be done !! Yes, we can (as a developper in X++) do some customizations and add your OWN Business Events !
I like it because it will be great for Partner to propose their own solution with more Business Events, and it will be helpful to integrate it with other platforms or other systems to send events on behalf of a trigger in the ERP. You can add your own datacontract and it will available as JSON for further actions.
All informations can be seen here
So let’s cover this article with an example.
Let’s imagine, your company in D365 FinOps has setup a purchase order workflow. They have done also an email notification. But you want maybe to get a Push Notification instead of email if the amount is very large or maybe because you have been assigned to a Workflow Work Item and you have exceeded the deadline… damned !
Go to D365 FinOps first.
Since I hate to search Menu Item, let’s write it like in Google instead :)
You will see the Business Event Catalogs first.
Let’s pick this one for our use case of Workflow :
Schema here… Download it !
At the right corner you will see the Sample Data / DataContrat of this Business Event. It will be all informations that you will have for this particular event and can be useful for your integration / notification. Like maybe getting the URL (Link to Web field) of the Purchase Order related to the Workflow so that we can add it to the Mobile Push Notification when the user will be clicking it.
Or you will have also the WorkflowDueDate that you can grab it in PowerAutomate after to do some conditional purpose based on that.
So now you have the schema of your business Event. Now go to Microsoft Power Automate portal
Create a new instant Flow.
-
Pick this type of trigger : “When a HTTP request is received”
-
Copy/Past your schema that you download it before in there.
-
Add a step to send a Mobile Push Notification block
-
Save and get the URL of your FLOW that you just create.
Let’s go deeper here if you don’t mind :)
You can add in fact some part of your JSON to a Dynamic Content of your Mobile Push Notification in this way :
-
Introduce a new part of your Flow by adding a “Parsing JSON” between the HTTP Request and your Push Mobile Notification
-
Click to Generate from Sample to copy/past again the schema you have downloaded before in D365 FinOps.
-
This will look this :
After that you can add, like you want, dynamic content on your mobile notification, for this demonstration I will use the Field “Link to Web”
Or you can add also conditional split like this way based on the Due Date Workflow :
I use a function for that with : utcNow
And we can do more… but it’s on your side now ! Other conditional split, other integration, calling and adding all sort of connectors that Microsoft brings with Power Automate !
Now we have finished our Flow, return to D365 FinOps.
Go the Endpoint part in the Business Event Catalog of D365 FinOps and Click “new”
Here are all endpoints available at this time :
You can have of course Microsoft Flow (aka Power Automate) or maybe calling an HTTP API or in fact add your event to an Azure Service Bus (like TOPIC that I love because you can add some business logics, filters based on your subscription and receiver of this event. Maybe you want to change somehow your JSON Datacontrat depending of the subscriber that register your topic :
But here I will jump instead with Power Automate, since we just use it before for our example…
Copy/Paste the URL of your Flow that you have created earlier (it’s in the first block of your flow “ When a HTTP Request is received”)
Now go to the Business Catalog and Activate it !
Select your endpoint “Power Automate” and your Legal Entity.
posted on 2024-01-12 15:40 lingdanglfw 阅读(23) 评论(0) 编辑 收藏 举报