Configuring Power Automate for the PO Confirmation Business Event in D365FO

In this example, we’ll create a simple Power Automate flow that listens to the Purchase Order Confirmation Business Event in D365FO and sends an email notification to the vendor.

This is a basic demo, but once you understand the structure, you can extend it to more advanced workflows.

 

Create a New Flow

  • Open Power Automate.
  • Click Create → Instant cloud flow.

 


 




 

 

Click Skip when asked to choose a trigger.

 

 

 

Add the Business Event Trigger 

  • Search for "When a Business Event occurs" trigger.
  • Sign in using the same credentials that you use for D365FO.
  • Select your environment and the specific Business Event (Purchase order confirmed) you want to listen to.

 







Parse JSON

  • Add Parse JSON action






Sample schema you download from the BE catalog in D365FO. Paste this schema above











Send an Email Notification

·       Add a Send an email (V2) action.

·       Configure it as follows:

 

Subject:

PO Confirmation – @{body('Parse_JSON')?['PurchaseOrderNumber']}

Body:

Hello Vendor @{body('Parse_JSON')?['VendorAccount']},
 
Your Purchase Order @{body('Parse_JSON')?['PurchaseOrderNumber']} 
has been confirmed on @{body('Parse_JSON')?['PurchaseOrderDate']}.
 
Amount: @{body('Parse_JSON')?['TransactionCurrencyAmount']} @{body('Parse_JSON')?['TransactionCurrencyCode']}
 
Thank you.




 
Save and Activate

·       Save the flow — this will register the endpoint in D365FO automatically.

·       In D365FO, activate the PO Confirmation Business Event.

 




 






Confirm a PO in D365FO to test — the flow should trigger and send the email.





What Else Can You Do After Receiving the Payload?

Once you get the payload from D365FO, you can trigger various actions in Power Automate, such as:

·       Push PO confirmation details to a supplier portal via API.

·       Send WhatsApp or Teams notifications to suppliers.

·       Update SharePoint with PO confirmation documents.

·       Store the event details in Dataverse or an Azure SQL Database.

·       Trigger approval workflows for high-value POs.

 

Best Practices for Power Automate with Business Events

·       Use Try-Catch Scopes: Wrap actions in Scope with Run After settings for error handling.

·       Log Errors: Send failed payloads to a logging system (SharePoint, Azure Blob, Dataverse) for troubleshooting.

·       Secure Connections: Ensure all connectors use secure authentication.

·       Limit Unnecessary Actions: Only extract and use the fields you need to avoid extra parsing overhead.


Post a Comment

0 Comments