Design a site like this with
Get started

How to design D365 Fin & Ops Asynchronous integration with Power Automate

I recently had issue with Power automate and D365 integration where 2 minutes gateway timeout issue with my custom OData action. The timeout was causing Power Automate to retry operation multiple times, which is not required result in integration.

There are some settings for the Fin & Ops connector execute action in Power Automate to set a timeout for the asynchronous pattern but from what I understood this is not supported by D365 Finance and operation 😦

To resolve this issue I have looked in REST API code to understand what is happening in import package RSET API.


OData and custom services are synchronous integration patterns and return 200 response when successful (not 202). By default the timeout for synchronous requests in Power Automate is 2 minutes and it cannot be changed

here you have some pros and cons between integration approach.

One of the key decisions to be made is whether integration should be real time (synchronous) or asynchronous. The following table analyzes both the messaging approaches and describes the scenarios when one should be selected over the other:

 TypeProsConsGood forExamples
Synchronous Fail-safe communicationError/exception handlingTight coupling between systemsBlock sender until receiver is finishedNetwork dependency must be available Transaction processing across multiple systemsMobile app/handheld for PO receiving, SO picking, Inventory onhand, and so on.
AsynchronousDecoupled systemsDoes not block senderNetwork need not be availableMessages can be queuedReliability …


Let’s start designing it.

First you have to design oData action which can be access directly from D365 power automate connector, I have design process to post sales order invoice.

I am getting sales order number and invoice Id from power automate to process sales order in D365 and to return I am creating JSON response which can be parse and get required output to check if request is success or not and get all required Infolog

Second setup you need to call invoice posting code from processSalesOrderOperationAsync using runAsync sequence.

Once you are done with design D365 part, you need to call same from power automate, make sure your data entity is publicly exposed.

If you have done with testing and other details in D365, Now you can design power automate flow to call this operation and check.

First part I have added to get manual input to test this flow and based on input I am calling my OData operation with required input.

Second and third step to get if Odata call request is successful or not. If odata process result is ok, I can check sales order status in do until and notify if sales order invoice is successfully done or not.

let me explain you each step here.

  1. declare sales invoice status variable.
  2. Add do until control and set limit based on your requirement.

3. use Dynamics connector to get sales order record based on sales order number and company, I have added expression here as well.

Expression: dataAreaId eq ‘@{triggerBody()[‘text_2′]}’ and SalesorderNumber eq ‘@{triggerBody()[‘text’]}’.

4. You have to set status from connector output and add delay before making any additional call to D365 to check status.

Run flow and test.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s