Showing posts with label PowerAutomate. Show all posts
Showing posts with label PowerAutomate. Show all posts

Saturday, November 9, 2024

Configuring Dynamics 365 Finance and Operations Business Events












CONFIGURING DYNAMICS 365 FINANCE AND OPERATIONS BUSINESS EVENTS

CONTENT

Introduction
Business event catalog (D365FO)
Endpoint types
End-to-end automation solution (Power Automate)
Conclusion

INTRODUCTION

In the first article of this series, we explored the fundamentals of business events in Dynamics 365 Finance and Operations (D365FO), including event types, the business event catalog, and how to leverage Power Automate endpoints. Now, we will dive deeper into a practical scenario where we configure a business event using the Finance and Operations connector in Power Automate to automate workflows.

This article will guide you through creating a new flow in Power Automate, subscribing to a business event via the D365FO connector, and setting up an automated email notification. By harnessing the power of business events and the FinOps connector, you can streamline communication and automate notifications for key business processes, eliminating manual follow-ups and enhancing operational efficiency.

We will cover:

  • How to create a new flow in Power Automate
  • How to subscribe to a business event via the FinOps connector
  • How to set up an automated email trigger when a business event is raised

Let’s get started on configuring business events to automate actions and bring real-time notifications into your business processes.

BUSINESS EVENT CATALOG

This is a catalog that contains important business activities like new vendor application request approval, purchase requisition status change, vendor invoice posting, vendor payment posting, etc. 

Complete catalog content can be seen under System administration >> Setup >> Business events >> Business events catalog.

This page shows the list of actions that can be subject to external system notifications.


Posted/approved document triggers a business event that notifies external system(s).


One of the fundamental components of business events in Dynamics 365 Finance and Operations (D365FO) is the endpoint. An endpoint serves as a connection point that enables D365FO to interact with external systems, services, or applications when a business event is triggered. It represents the external destination or communication channel where event data is sent.

ENDPOINT TYPES

Endpoints define the target location for event notifications, facilitating integration and automated responses in connected systems. Setting up endpoints is a crucial first step in the configuration process.

System administration >> Setup >> Business events >> Business events catalog

Switch to endpoints tab, click on +New


When you add a new endpoint in Dynamics 365 Finance and Operations (D365FO), it is automatically synchronized with Dataverse. Additionally, endpoints can be created directly in Dataverse using the ServiceEndpoint table. If the service endpoint is set up through a subscription to a D365FO event, it will be available in D365FO and can be accessed from the Endpoints tab on the Business Events page. This synchronization process supports the following endpoint types:

  • Azure Service Bus Queue
  • Azure Service Bus Topic
  • Azure Event Grid
  • Azure Event Hub

Power Automate Endpoints: The Microsoft Power Automate endpoint type isn't made available for setup directly in finance and operations apps. This endpoint type is used for subscriptions that are created and sent directly from a flow in Power Automate.

The endpoint is created on the Endpoints tab of the Business events page in finance and operations apps when you subscribe to a finance and operations apps business event or data event in Power Automate.

In this article, we’ll set up a Power Automate endpoint.

Dataverse Endpoints: The Dataverse endpoint type also isn't available for manual setup in finance and operations apps. The endpoint is created when a plug-in or an SDK step is registered on a finance and operations apps business event or data event in Dataverse. When the step is registered, it becomes visible as an endpoint in the list on the Endpoints tab of the Business events page in finance and operations apps.

END-TO-END AUTOMATION SOLUTION

Scenario: An email is automatically sent when a purchase order is confirmed.

Solution components

  • Business event selection: In our example, we will use purchase order confirmation.
  • Business event schema: In Dynamics 365 Finance and Operations (D365FO), a business event schema is a structured data model that defines the format and content of a business event message.
  • Power automation platform: We will use a power automation endpoint in this scenario.
  • OData Query Language: The development language used for querying data in this context is OData (Open Data Protocol), specifically using OData Query Language. OData Query Language is used to filter and manipulate data from REST APIs, especially in services like Dynamics 365 Finance and Operations and Microsoft Dataverse. In Power Automate and D365FO integration scenarios, the queries often adhere to the OData v4 standard, which is widely used for accessing and interacting with data in RESTful APIs.

Configuration

We will start with downloading business event schema in D365FO.

Go to System administration >> Setup >> Business events >> Business events catalog

Find the purchase order confirmation event and download the schema.


Downloaded file looks like below.


I asked ChatGPT to format it nicely for your information.


Next step is power platform configurations.

Go to make.powerautomate.com

Click on +Create then 'Automated cloud flow'.


Enter a flow name and select the trigger.

Flow name: POconfirmation_BusinessEventDemo

Trigger: Fin & Ops Apps (Dynamics 365)


Click on Create.

Now, system automatically adds business event element.

Select your D365FO environment.

Select category of the business event. You can see that it should be 'Purchase orders' according to business event catalog.

Select the business event. We are selecting 'Purchase order confirmed' here.

Select legal entity.


OK, we are done with this business event element.

Click on + to add a new flow action. 

Find Parse JSON and add it to the flow.


Configure the Parse action.

Click on Content's lightning icon.


then select Body.



Click on schema generation from the sample payload.


Paste business event schema into the screen.



Click on Done. Note that Power Platform automatically creates the schema on the left side of the screen.


This step captures Dynamics 365 Finance and Operations' response and translates it to a readable message in Power Platform.

Next step is about finding the vendor that comes from the message. We will use data entities for that purpose.

Click on + to add a new flow action.


Search for 'Fin & Ops Apps (Dynamics 365) ' and select 'Lists items present in table' for data entities.


Fill in the required fields.


Select the connected D365FO environment.

Select 'Vendors' entity.

Add a filter and use the below query.


As result, this action item should look like below.


Next step is about sending purchase order as email. We will use 'Send email' operation for that purpose.

Click on + to add a new flow action.




Let's do the configuration of email action.



The flow is ready to be tested.


Demo

Let's confirm a purchase order in the company where we indicated in the automation.

Confirming purchase order: Navigate to the purchase order and proceed to confirm it, which will trigger the automation process.


Reviewing Power Automate Flow: Open the Power Automate interface to observe the flow in action. Here, we can view historical runs and monitor the progress of the current execution.


Once the flow is completed, the status will update to 'Succeeded', confirming a successful run. 

Receiving email: As configured, the system sends an automated email upon completion of the purchase order confirmation. The email serves as a notification to the stakeholders.

Reading email: Open the received email to verify its contents. The details should reflect the expected purchase order information, indicating that the automation is working correctly.


CONCLUSION

In summary, this configuration demonstrates how to effectively leverage Dynamics 365 Finance and Operations business events in conjunction with Power Automate to automate standard processes. By integrating these tools, you can enhance the responsiveness of business workflows, reduce manual interventions, and ensure timely notifications for critical actions, such as purchase order confirmations. This solution illustrates a practical approach to optimizing operational processes using existing platform capabilities.

Wednesday, May 15, 2024

Dynamics 365 Finance and Operations Business Events












DYNAMICS 365 FINANCE AND OPERATIONS BUSINESS EVENTS

CONTENT

Introduction
Business event types
Business event catalog
Power automate endpoints
Summary

INTRODUCTION

In Dynamics 365 Finance and Operations, a business event represents a significant action or change in the system that can be captured and sent to external systems or processes. Business events help facilitate integration by allowing external systems to be notified of specific occurrences in real time. For example, an event might be triggered when a customer invoice is posted, a purchase order is confirmed, or a workflow status is updated.

Business events are beneficial for automating workflows, integrating with external applications, or triggering notifications and actions in other systems. Key points include:

  • Event Types: Events are predefined for standard actions, like changes in status for sales orders, purchase orders, or journal postings. Custom events can also be created.
  • Event Handling: Business events can be managed and routed through different platforms, such as Microsoft Power Automate, Microsoft Azure Event Grid, or custom event handlers.
  • Real-Time Data: Since business events are raised as soon as a transaction occurs, they enable real-time data sharing and action across systems without the need for frequent data polling.
  • Scenarios: Business events could trigger automated notifications, initiate follow-up workflows, or start external processes, such as sending alerts to a supplier when a purchase order is confirmed.

By using business events, organizations can improve operational efficiency and streamline processes that rely on external integrations with Dynamics 365 Finance and Operations.

Business events must not be considered a mechanism for exporting data. By definition, business events are supposed to be lightweight and nimble. They aren't intended to carry large payloads to fulfill data export scenarios.

BUSINESS EVENT TYPES

Business events can be categorized based on 3 main trigger types:

  • Application business events: Business events can be triggered based on a completed business activity like below
    •  Vendor invoice matched: This event is triggered when invoice matching validation is completed for a vendor invoice as part of the Procure to pay process.
    • Vendor invoice posted: This event business event is triggered when a user posts a vendor invoice as part of the Procure to Pay process.
    • Purchase order confirmed: This event is triggered when a purchase order is confirmed.
    • Free text invoice posted: This event is triggered when a user posts a free text invoice as part of the Quote to Cash process.
  • Workflow business events: Workflow business events are generated at various points in the processing of a workflow.
  • Alerts as business events: User-configured alerts can serve as business events, offering two main types: change-based alerts and due date alerts. These alerts can be set to issue a business event, providing notifications or triggers for external systems or applications. This setup enables both sophisticated user notifications and cross-system business process integration. To configure an alert as a business event, select Send externally as Yes in the "Create alert rule" dialog. To ensure alerts function as intended, the batch processes for change-based or due date alerts must be enabled for batch processing. Additionally, the business event must be active for either alert type to send notifications externally.

BUSINESS EVENT CATALOG

The business events catalog can be accessed from System administration > Set up > Business events. The business event catalog lists the business events that are available in your system.


A business event’s category reflects its source. Events originating from the workflow system are categorized under "Workflow," while those from other modules use the respective module name as their category. The business event catalog is built during database synchronization at the time of deployment. Therefore, users should see the complete list of business events in the catalog. However, if an explicit update of the catalog is required, you can select Manage > Rebuild business events catalog.

The business event catalog provides a description for each event, helping you understand its role and context within the business process. It also displays the list of data fields that will be included in the event.

In scenarios where external integration systems require the schema of the payload for a business event during development, you can select Download schema to download the JavaScript Object Notation (JSON) schema.

In summary, the business event catalog helps identify the business events that are required for an implementation. It also helps identify the schema for each business event.

The next step is to create and manage Endpoints.

POWER AUTOMATE ENDPOINTS (BUSINESS EVENT ENDPOINTS)

Endpoints let you manage the destinations that business events are sent to.


A finance and operations app doesn't provision the endpoints. The endpoints must be created separately and provided to the app. The app then sends events to the endpoints that are provided. Customers might incur additional costs if they use these endpoints in their Azure subscription.


The Microsoft Power Automate endpoint type isn't made available for setup directly in finance and operations apps. This endpoint type is used for subscriptions that are created and sent directly from a flow in Power Automate. The endpoint is created on the Endpoints tab of the Business events page in finance and operations apps when you subscribe to a finance and operations apps business event or data event in Power Automate.


SUMMARY

There are three types of business events: Application, workflow and alert business events. 

The Microsoft Power Automate endpoint type isn't made available for setup directly in finance and operations apps. This endpoint type is used for subscriptions that are created and sent directly from a flow in Power Automate.

Business event catalog is the starting point of the configuration. You go to make Power automate  page after downloading the business event schema from the business event catalog. Created endpoint will be automatically seen in the finance and operations apps.

Understanding Telemetry Pricing for Dynamics 365 Finance & Operations (D365FO)

UNDERSTANDING TELEMETRY PRICING FOR DYNAMICS 365 FINANCE AND OPERATIONS (D365FO) CONTENT Introduction D365FO Telemetry Capabilities Key Pric...