Workflow work item approvals in D365 F&O using Microsoft Power Automate/Flow

Workflow work item approvals in D365 F&O using Microsoft Power Automate/Flow

Possibilities of business processes automation and extension is limitless when you use Microsoft power platform. Use PowerApps to extend user interfaces and functionality of your CRM or ERP apps, use power automate to automate business process actions or use AI builder and RPA to reduce manual labor intensive work for your employees. Dynamics 365 and Power platform together provides the most comprehensive business applications and automation, analytics platform in the market today.

One simple example use case is exposing workflow work items that originate in Dynamics 365 F&O for various business documents such as purchase orders, vendor invoices, budgets, timesheets and expense reports to Microsoft Power automate and then build the required automation flow to take advantage of the Microsoft flow Approvals solution. This gives your employees the flexibility of taking action on critical business documents quicker within Microsoft Teams, or within the Teams app when they are on the go.

I have a very simple flow in place, which is subscribed to the expense report approval business event in Dynamics 365 F&O. Every time an expense report is submitted in F&O and it is ready for the reviewer to take action, the flow will extract the required information from the expense report approval work item using the JSON schema of the business event and then sends an approval action within Microsoft Teams to the approver of the expense report. After the approver takes action on the work item within Teams or on their phone, the work item is completed in real time back in Dynamics 365 F&O.

With this flow actively running, let’s submit an expense report in D365 F&O. The expense report number in this case is 000041.

As soon as the report is processed in the workflow engine of F&O and it gets assigned to the reviewer/approver, the business event is going to notify our Flow. The flow then runs and sends an approval notice to the approval using Flow approvals action.

The approver then gets notified via email as well as in Microsoft Teams regarding the expense report submitted for their review.

Nevertheless, if the approver is using either Power automate or Teams mobile app, they get notified within those apps as well.

The approver can then take the required action (Approve, Reject, Delegate etc.). Let’s assume they approve the expense report in this case.

Now if we go back to Dynamics 365 F&O and check the expense report status, it should be Approved. We can also view the history to validate that this was approved using Microsoft flow.

That was just a very simple demonstration of what is possible . You can apply this to your situation and make more complex business process automation and extensions.

Till next time!!!

How “Business Events” feature in Dynamics 365 for Finance and Operations enables you take optimum advantage of Microsoft power platform(Microsoft Flow)

How “Business Events” feature in Dynamics 365 for Finance and Operations enables you take optimum advantage of Microsoft power platform(Microsoft Flow)

One Version(Evergreen Application), Power Platform, AI, Mixed reality, Virtual agent (BOT), Machine learning, IoT. These are buzzwords that are not uncommon to hear these days, when you talk of any business application.

The landscape of ERP and business applications has changed significantly, faster than we all expected. If you really think about it, the core fundamentals of business process requirements are not changing that much, but how you implement and accomplish those business process automation is certainly changing in a big way. No code, Low code app building service like Microsoft PowerApps, business process workflow automation service like Microsoft Flow and data insights building service like Microsoft Power BI are big components of it.

These different services are part of the Microsoft Power Platform and these combined with features like AI builder, Portals and services like Common Data Service, Azure Data Lak etc. makes the overall Microsoft Business Applications platform one of the best business applications platform for companies of any size.

Today in this post, I wanted to pick on one of the newest features in Dynamics 365 for F&O called “Business Events” and explain my experience with it with a very simple business scenario.

So What are business events?

Business Events in D365 F&O is a mechanism which lets external systems receive notifications from D365 F&O. The external systems can then perform additional business actions in response to the business events.

When a business process such as a Purchase Order confirmation, Sales order invoice, payment posting or even a workflow approval is initiated, a business event automatically fires up and generates a data payload. Endpoint such as Microsoft Flow, Azure Service bus can subscribe to these business events and get the payload information to trigger additional automated actions, both within D365 F&O as well as in external systems.

There are several business events that are shipped out of the box with the standard D365 F&O, and you can always customize and create custom business events that are suitable for you. The main objective is to notify service end points and there by external systems when a certain business process is completed within D365 F&O, so that you can carry out further tasks automatically. Screenshot below shows the business event catalog.

To illustrate how this functionality works, I took a very simple requirement. I wanted to notify the requester of a purchase order when the items arrive at the warehouse, so that they can go and collect those.

I built a Microsoft Flow which triggers when a “Purchase order received” business event gets fired up. My flow listens to this business event and gets additional information about the requester and purchase order from D365 F&O and then does the following things automatically.

  1. Sends the requester an email. I used outlook for this.
  2. Sends the requester a text message on phone. I used Twillo for this.
  3. Posts a IM message in Microsoft Teams as a Flow BOT.

Screenshot below shows the Microsoft flow configuration.

I will now go ahead and create a Purchase Request and Purchase Order with me as the Requester and will receive the items on the PO.

Purchase Order Confirmed
PO Requester on PO Header
Requester Contact Info

Let us now go ahead and receive the goods and post the goods receipt note/product receipt document.

As as soon the Product receipt for posted, the business event was fired up in D365 F&O and Microsoft Flow was able to listen to those and automate the intended actions of notifying the requester via email, text and Teams IM message.

Screenshot below shows my flow was run successfully and also the different notifications i got automatically on my email, cell phone text and IM on Microsoft Teams.

Flow run
Microsoft Team BOT notification
Microsoft Team BOT notification
Email Notification
Text Notification

Now, that illustration was a very simple business requirement and scenario. I could take this further and automate complex task automation such as,

  1. Update a data record in F&O.
  2. Create new data in F&O.
  3. Initiate Microsoft Flow approvals for all workflow item approvals of F&O for richer email approval experience.
  4. Connect to other business apps such as SharePoint, Common Data Service, Dynamics 365 for Sales and more to automate further business tasks.
  5. Notify customer when their order is shipped with Tracking info
  6. And more…

I was able to do these without writing a single line of code. That is the Power of the Microsoft Power Platform. The amount of process and task automation you can do with the Power Platform are endless.

That’s it for now and we will take a look at a more complex scenario next time involving a workflow approval. Till next time!!!