How to trigger Dynamics 365 Finance and Operations Business Events with Power Automate

May 30, 2024

Dynamics 365 Finance and Operations users often need to take action and send notifications based on certain system events. Allowing stakeholders to make timely, informed decisions. This functionality exists in the form of business events. These events provide a mechanism to alert or notify external systems about changes in the D365FO environment. This can be extremely useful for integrating Dynamics 365 Finance and Operations with other systems or triggering workflows based on specific conditions.

Through this blog, get familiar with the concept of business events and learn how to trigger Dynamics 365 business event with Power Automate.

What is a business event in Dynamics 365 Finance and Operations?

Dynamics 365 business events enable external systems to receive notifications from the F&O app, allowing for responsive business actions. A business event occurs during the execution of a business process, where users perform tasks to complete the process. External systems can act on these notifications by leveraging business events to enhance business workflows and operations.
To access business events, navigate to System Administration, select Set Up, and then click on Business Events. The business event catalog displays all available business events in your current instance. You can filter this catalog by category, business event ID, and name to easily find specific events.

How can a Dynamics 365 F&O business event with Power Automate be triggered?

Now that we understand the concept of business events, let’s explore how to trigger them. Before we begin, there are prerequisites to consider. Microsoft Power Automate and Azure messaging services consume Dynamics 365 Finance and Operations business events. Therefore, users must have a subscription to either of these platforms to trigger or utilize business events.
Power Automate is a cloud-based service that makes it practical and simple for end users to build workflows. That automates time-consuming business tasks and processes across applications and services.

Power Automate and D365FO’s Business Events can work together to create powerful, automated workflows. In fact, MD365 and Power Automate integration bring a powerful combination of ERP and automation capabilities to businesses. You can set up a business event in D365 F&O to trigger when a specific condition is met, like an invoice being posted. Power Automate can then pick up this event. Which can perform a series of actions like sending an email notification, updating a SharePoint list, or even triggering actions in other systems. This integration opens up a world of possibilities for automation and process improvement. There are several Dynamics 365 business events. Power Automate use cases that enable businesses to enhance efficiency, accuracy, and agility in their operations.

Ready to get started? Follow these steps:

Step 1: Go to the Power Automate environment dashboard and click the Create Flow button.

Step 2: Create a new Instant Flow named “D365 F&O business event flow” and select the “manually trigger a flow” option.

Step 3: Click the add step, search for the “Fin&Ops” connector, and select the “When a Business event occurs” trigger.

Step 4: Now set the value of the parameter. We are going to use the “Batch job started” business event, which lies under the “Batch” category, and set the legal entity, which is a company ID, as “DAT.”

Step 5: Now add the Parse JSON action. Power Automate’s JSON Parse action is a powerful tool for transforming the raw JSON output of an HTTP request into values that you can use as dynamic content in your flows. Select the content “body” dynamically from the above action.

Step 6: To pick the schema shown in the image above, Go to System Administration> Setup > Business event > Business event catalog. Search by business event ID “BatchJobStartedBusinessEvent” and click on download schema.

Step 7: After downloading the schema, copy it, click the “Generate from sample” button, and paste it as shown in Step 5.

Step 8: Add a compose action and map the values shown in the image below, but it’s optional. Here, we are filtering the output and making it more readable.

Step 9: Now click on the save button.

Step 10: For testing purposes, we have created a batch job named “Power Automate demo.” But before executing it, click on the Business event option above and enable the start parameter to Yes. Otherwise, your event will not trigger.

Step 11: Run your Power Automate flow and execute the batch job.

Step 12: Your flow will run successfully.

Step 13: To verify the output, you can expand the Compose node, check the Job ID value, and match it with your batch job number in the Fin&Ops environment, as shown in the image below.

Power Automate - Flow output value
Fin&Ops batch job form

Summing up

From posting an invoice to inserting a record in the database. Dynamics 365 Finance and Operations allows you to set business triggers to perform these events easily. You can also create custom triggers based on your specific business needs.
Contact us at marketing@Confiz.com to learn more about business events, creating custom triggers, and troubleshooting business event workflows with Power Automate.