Skip to main content

Technology. People. Progress.

← Back to Blogs

Account mapping

Create a provider message request handler for Quick Start Lab Scenario for Microsoft Intelligent order Management IOM tutorial

Microsoft Dynamics 365 Intelligent Order Management IOM Step by Step Tutorial

Follow Below Steps

Step 1 - COMPLETEDCreate the free 30 Days Trial Version Environment for the Microsoft Dynamics 365 Intelligent Order Management

Step 2 - COMPLETEDSet up an IOM environment / Configure platform connection references in Microsoft Dynamics 365 Intelligent order Management

Step 3 - COMPLETEDCreate a new solution for PROVIDER Customization in Microsoft Dynamics 365 IOM / Create a provider solution

Step 4 - COMPLETEDCreate RequestBin Custom connector (Power Platform) for Step by Step Microsoft IOM Tutorial

Step 5 - COMPLETEDCreate new intake provider definition for Step by Step IOM Tutorial Scenario- Microsoft Dynamics 365 Intelligent Order Management / Register a new Provider in Library

Step 6Create a provider message request handler for Quick Start Lab Scenario for Microsoft Intelligent order Management IOM tutorial

Step 7Create Fulfillment provider in Microsoft Dynamics Intelligent Order Management IOM – Order to Fulfillment in IOM

Step 8Add a provider definition logic definition to the Outlook Provider Definition in Microsoft Dynamics Intelligent Management IOM

Step 9Create a provider action - Power Automate Flow - to send a fulfillment Order payload to RequestBin

Step 10Activate the Intake, Fulfillment, & Internal Application Service provider created in Previous Step by Step IOM Tutorial

Step 11Create Orchestration policies and their associated rules for Quick Start Lab Scenario in Microsoft Dynamics 365 Intelligent Order Management IOM

Step 12Create Sales Order Orchestration flow in Microsoft Dynamics Intelligent Order Management IOM

Step 13Set up Customer(Account) and product mapping in Microsoft Dynamics Intelligent order Management IOM

Step 14Run a sample order orchestration flow in Microsoft Dynamics 365 Intelligent Order Management - END TO END DEMO IOM

Create a provider message handler for step by step IOM Tutorial STEP 6 - Quick Start Lab

To create a provider message handler, follow these steps.

  1. Go to the Power App Maker portal, navigate to Solutions, and create new Solution named IOM Lab Provider Workflows .
https://dvmske.com/wp-content/uploads/2023/06/2023-06-26_22-32-50-768x355.png

2. Select New > Automation > Cloud Flow > Automated,

https://dvmske.com/wp-content/uploads/2023/06/2023-06-26_23-54-53-768x352.png

3. Select Cloud Flow, and name it “IOM Lab Order Intake Message Request Handler”.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_11-58-37-768x349.png

4. Search for the trigger type as Outlook.com – When a new email arrives (V2), and click on Create then sign in with your outlook.com account credentials.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_12-04-06-768x338.png

5. Enter the required information in the field

  • For Folder, select Inbox.
  • For To, select Recipient email addresses separated by semicolons.
  • For CC, select CC recipient email addresses separated by semicolons.
  • For To or CC, select To or CC recipient email addresses separated by semicolons.
  • For From, select Sender email addresses separated by semicolons.
  • For Include Attachments, select Yes.
  • For Subject Filter, select IOMLabOrderIntakeOrder.
  • For Importance, select Any.
  • For Only with Attachment, select No.
https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_12-16-48-768x329.png
https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_12-18-37.png

6. Select New step .

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_12-22-03-768x186.png

7. Search for Data Operations Add “Parse JSON“.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_12-25-56-768x362.png

8. Paste the Code in the Content given below

{
"ProviderId": "00000000-0000-0000-0000-000000000000"
}
https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_13-12-23.png

9. In the Schema field click on Generate from Sample.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_13-19-20.png

10. Copy the same sample code that you paste it into the Content Field and click on done.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_13-26-06.png

11. As you can see the sample code is converted into the Sample Schema Code in JSON format.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_13-30-59.png

12. Select the ellipsis (““) and then select Rename.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_13-35-50.png

13. Rename the action “IOM System Properties” and click on Save .

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_13-41-06-768x330.png

14. Select New step, add a Parse JSON action, and rename to “Initialize Provider Variables“.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_13-44-52.png

15. In the  Content, paste the below code

{
"SourceObjectName": "IOMLabOrderIntakeProvider",
"DestinationObjectName": "Dataverse Order"
}
https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_13-49-39.png

16. Copy the same sample code that you paste it into the Content Field and click on Done.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_13-53-54.png

17. As you can see the sample code is converted into the Sample Schema Code in JSON format.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_13-58-09.png

18. Select New step search for Variables Add  Initialize variable action,

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_14-03-47.png

19. Rename the action “Initialize Processing Execution Result” and click on  Save 

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_14-15-32-768x337.png

20. Enter the Name  “ExecutionResult” and for Type, select Boolean.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_14-21-53.png

21. Enter the Value, select true from the Expression and click on OK.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_14-24-20.png

22. Select New step, search for Control and add “scope

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_14-53-16-1.png

23. Rename the scope to ‘ Try ‘.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_14-58-44-1.png

24. In the Try scope, select Add an action then search for Microsoft Dataverse Connector select “perform an unbound action” .

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_15-03-11.png

25. Rename it “Acknowledge the Provider Message in IOM“.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_15-05-42.png

26. Enter the appropriate details in the respective fields.

  1. For Action Name, enter “msdyn_CreateProviderMessageRequestExecution”.
  2. For PowerAutomateWorkflowId, copy the given below expression
workflow()['tags']['xrmWorkflowId']

3.For PowerAutomateRunId, copy the given below expression

workflow()['run']?['name']

4.For ProviderExternalRequestId, copy the given below expression.

guid()

5.Select Save.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_15-09-08.png

27. Select Add an action, search for Control Connector and then add an Apply to each control.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_15-13-50.png

28. For Select an output from the previous steps, select Attachments.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_15-16-51.png

29. Select Add an action within the Apply to each loop

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_15-20-33.png

30. Search for  Flow connector and Add Run a child flow .

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_15-32-36.png

31. Rename it “Transform Message with Power Query Online“.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_15-36-14.png

32. Enter the appropriate details in required  fields.

  1. Select the child flow IOM Provider Transformer.
  2. For Provider Id, select the ProviderId variable.
  3. For Source Object Name, select the SourceObjectName variable.
  4. For Destination Object Name, select the DestinationObjectName variable.
  5. For Payload, copy the given below expression .
decodeBase64(items('Apply_to_each')?['ContentBytes'])

6.Select Save.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_15-40-47.png

33. After the transformation step, select Add an action, add Run a child flow from the Flow connector, and rename it “Create Order“.

  1. For Child Flow, enter “IOM Sales Order Creation”.
  2. For Payload, copy the given below expression
string(json(outputs('Transform_Message_with_Power_Query_Online')?['Body']?['result'])?[0][0])

3. Select Save.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_15-46-27.png

34. Collapse the Try scope by selecting its title bar.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_15-55-16.png

35. Select New step, add a scope and rename it “Catch“.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_15-57-57.png

36. In the Catch scope, select the ellipsis (““), and then select Configure run after.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_16-01-30.png

37. Select the has failed and has timed out checkboxes, and then select Done.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_16-10-09.png

38. In the Catch scope, select Add an action, search for Variable  and add a Set variable action.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_16-13-22.png

39. Rename it “Set the execution result to failed“.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_16-16-01.png

40. For Name, enter “Executionresult” and in the Value, select False.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_16-16-01.png

41. Collapse the Catch scope by selecting its title bar.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_17-46-06.png

42. Select New step, add a scope and rename it “Finally“.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_17-50-05.png

43. In the Finally scope, select the ellipsis (““), and then select Configure run after.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_17-53-37-768x331.png

44. Select the is successfulhas failedis skipped, and has timed out checkboxes, and then select Done.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_17-57-16.png

45. In the Finally scope, select Add an action, add a Perform an unbound action and rename it “Save Provider message request execution result”.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_18-00-31.png

46. For Action Name, enter “msdyn_UpdateProviderMessageRequestStatus”.and For ProviderMessageRequestExecutionId, copy the given below expression

@outputs('Acknowledge_the_Provider_Message_in_IOM')?["body/ProviderMessageRequestExecutionId']
https://dvmske.com/wp-content/uploads/2023/06/2023-06-27_18-00-31.png

47. Click on Save.

https://dvmske.com/wp-content/uploads/2023/06/MicrosoftTeams-image-13-768x433.png

Add provider definition logic definition to the provider definition for Quick Start Lab Scenario

To add a provider definition logic definition to the provider definition, follow these steps.

  1. In your Intelligent Order Management application, go to Providers > Catalog.
https://dvmske.com/wp-content/uploads/2023/06/2023-06-28_13-35-17-768x351.png

2. Select the newly-created IOMLabOrderIntakeProvider and click on See details.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-28_13-38-14-1-768x351.png

3.  Select the Logic definitions tab.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-28_13-49-20-768x348.png

4. Select + New IOM Provider Definition Logic Definition.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-28_13-51-40-768x351.png

5.In the  New Provider Definition Logic Definition dialog box, do the following:

  • For Display Name, enter “IOM Lab Order Intake Message Request Handler”.
  • For Logical Name, enter “msdyn_LabOrderIntakeMessageRequestHandler”.
  • For Provider Definition, enter “IOMLabOrderIntakeProvider”.
  • For Logic Type, enter “Provide Message Handler”.
  • For Workflow Name, enter “IOM Lab Order Intake Message Request Handler”.
  • For Timeout Minutes, enter “2”.
  • For Max Retry Attempts, enter “3”.
  • For Description, enter “IOM Lab Order Intake Message Request Handler”.
  • Select Save.
https://dvmske.com/wp-content/uploads/2023/06/2023-06-28_14-00-49-1.png

6. After click on Save button will generates a JSON representation of the message handler cloud flow and fills in the Client Data field and Select Save & close.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-28_14-16-35-768x386.png

7. Select Connections. You should see both the Microsoft Dataverse and Outlook.com connection reference definitions listed.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-28_14-24-28-768x358.png

Add provider definition logic definition and connection reference to IOMLabProviders solution

To add a provider definition logic definition and connection reference to the IOMLabProviders solution, follow these steps.

  1. Go to the Power App Maker portal and navigate to the newly-created solution IOMLabProviders.
https://dvmske.com/wp-content/uploads/2023/06/2023-06-28_14-31-58-768x347.png

2. Select Add existing  >  More  >  Other  >  Provider Definition Logic Definition.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-28_14-38-01-768x349.png

3. Select IOM Lab Order Intake Message Request Handler and then select Add to add it to the solution.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-28_15-34-39-768x348.png

3. Select IOM Lab Order Intake Message Request Handler and then select Add to add it to the solution.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-28_15-34-39-1-768x348.png

4. Select Add existing  > More > Other >  Provider Connection Reference.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-28_16-55-27-768x351.png

5. Select the Microsoft Dataverse and Outlook.com connection reference definitions and then select Add to add them to the solution.

https://dvmske.com/wp-content/uploads/2023/06/2023-06-28_16-55-27-768x351.png

6. As you can see all three are added into the solution.

https://dvmske.com/wp-content/uploads/2023/06/MicrosoftTeams-image-2-768x353.png

CLICK HERE FOR STEP 7Create Fulfillment provider in Microsoft Dynamics Intelligent Order Management IOM – Order to Fulfillment in IOM

Talk to an Expert