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 6 - COMPLETEDCreate 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
PREVIOUS STEP 6 - COMPLETEDCreate a provider message request handler for Quick Start Lab Scenario for Microsoft Intelligent order Management IOM tutorial
Create New Provider Defination
Create new provider definition:
For Creating a provider, we should follow these steps:
- Go to Providers > Library.
- Select New Provider Definition.
- For Display Name, enter “IOMLabFulfillmentProvider”.
- For Logical Name, enter “msdyn_IOMLabFulfillmentProvider”.
- For Description, enter “IOM lab fulfillment provider”.
- For Logo, select “IOMLab.png”.
- For Service Type, enter “Fulfillment”.
- Skip next tabs (Logical definition and transformation) by Clicking Next.
- Select Save and close on summary.
Add provider definition to solution
To add a provider definition to the solution, follow these steps.
- Go to the Power App Maker portal and navigate to the newly-created solution IOMLabProviders.
- Select Add existing > Provider Definition.
- Select IOMLabFulfillmentProvider and then select Add to add it to the solution.
To create a provider action to send a fulfillment payload to Outlook, follow these steps.
- Go to the Power App Maker portal and navigate to Solutions.
- Open the Default Solution or you can create a new Solution.
- Then Click on Create.
- Select New.
- Select Cloud Flow> automated and then name it “IOM Lab Send To Fulfillment (Outlook)”.
-
-
- Select the trigger action type as When an http request is received and then do the following:
- Copy the code given below and paste it into your Request Body JSON Schema section.
-
{
"type": "object",
"properties": {
"text": {
"title": "ProviderActionExecutionEventId",
"type": "string",
"x-ms-dynamically-added": true,
"description": "Please enter your input",
"x-ms-content-hint": "TEXT"
},
"text_1": {
"title": "EntityRecordId",
"type": "string",
"x-ms-dynamically-added": true,
"description": "Please enter your input",
"x-ms-content-hint": "TEXT"
}
},
"required": [
"text",
"text_1"
]
}
- Then click on +New Step.
- Create a variable initialization action:
-
- For Name, enter “ExecutionResult”.
- For Type, select Boolean.
- For Value, enter “true”.
- You Can rename it too with a suitable name for understanding.:
Create a second variable initialization action:
- For Name, enter “ProcessedSaleOrderLines”.
- For Type, select Array.
Create a third variable initialization action:
- For Name, enter “ProcessedFulfillmentOrderLines”.
- For Type, select Array.
- Add a Try scope.
- Within the Try scope, add a Perform an unbound action action as follows:
- ProviderActionExecutionEventId: Under Dynamic content, select ProviderActionExecutionEventId.
- PowerAutomateRunId: Specify the following as an expression:
workflow()['run']?['name']
.
Add a Get a row by ID action and then do the following:
- For Table name, enter “Fulfillment Orders”.
- For Row ID, select EntityRecordId under Dynamic content.
Add a Send an email action from the Outlook.com connector, as follows. There are couple of email connectors, make sure to select Outlook.com since that’s the connection set up earlier.
- On the To line, “placeholder@placeholder.com” is used as placeholder text. This will be replaced by a provider parameter in later steps.
- On the Subject line, “name” is obtained from the Get fulfillment order step under Dynamic content.
- For Body, specify the following as an expression:
outputs('Get_fulfillment_order')['body']
Add a List rows action as follows:
- For Table name, enter “Fulfillment Order Products”.
- For Fetch Xml query enter the following:
<fetch> <entity name="msdyn_fulfillmentorderdetail"> <all-attributes /> <filter> <condition attribute="msdyn_fulfillmentid" operator="eq" value="@{triggerBody()['text_1']}"/> </filter> </entity> </fetch>
Add an Apply to each control with a Send an email action as follows:
- value is obtained from the Get fulfillment order line step under Dynamic content.
- name is obtained from the Get fulfillment order line step under Dynamic content.
- Current item is selected from under Dynamic content.
Within the loop, add an Append to array variable action as follows:
- For Name, enter “ProcessedFulfillmentOrderLines”.
- For Value, select Fulfillment line ID from under Dynamic content.
Within the loop, add another Append to array variable action as follows:
- For Name, enter “ProcessedSalesOrderLines”.
- For Value, select Sales line ID from under Dynamic content.
- Collapse the Try scope by selecting its title bar.
- Select New step and add another scope named “Catch”.
- On the Catch scope, select the ellipsis (“…“), select Configure run after, and configure as follows:
- Select the has failed checkbox.
- Select the has timed out checkbox.
- In the Catch scope, select Add an action and add a Set variable action, and rename it “Set the execution result to failed”.
- Configure the properties as follows:
- For Name, enter “ExecutionResult”.
- For Value, enter “false”.
- Select New step, and add another scope named “Finally”.
- On the Finally scope, select the ellipsis (“…“), select Configure run after, and configure as follows:
- Select the is successful checkbox.
- Select the has timed out checkbox.
- Select the is skipped checkbox.
- Select the has timed out checkbox.
- In the Finally scope, add a “condition” step and compare the ExecutionResult variable to true as follows:
- In the first field, select the ExecutionResult variable.
- In the second field, select is equal to.
- In the third field, select true.
- In the If yes branch, add a Run a child flow action and rename it “Raise Business Events for processed fulfillment order lines”.
- Configure the properties as follows:
- For Child flow, enter “IOM Raise Business Event”.
- For BusinessEventDefinitionId, enter “063d85c8-60a4-eb11-9443-000d3a313675”.
- For EntityRecordId, specify the following as expressions:
string(variables('ProcessedFulfillmentOrderLines'))
- In the If yes branch, add another Run a child flow action and rename it “Raise Sales Order Aggregated Events”.
- Configure the properties as follows:
- For LineBusinessEventDefinitionId, enter “ccf64002-61a4-eb11-9443-000d3a313675”.
- For LineRecordId, specify the following as an expression:
string(variables('ProcessedSalesOrderLines'))
. - For OrderBusinessEventDefinitionId, enter “48688716-61a4-eb11-9443-000d3a313675”.
- Collapse the condition step.
- Add a Perform an unbound action action as follows:
- For Action name, enter “msdyn_CompleteProviderActionExecution”.
- For ExecutionResult, select the ExecutionResult variable from under Dynamic content.
- For ProviderActionExecutionEventId, select ProviderActionExecutionEventId from under Dynamic conten