
MH508 – Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App
Introduction
In this article, we provide a step-by-step guide on how to consolidate Sales Pick, Sales Put, Outbound Pick, and Outbound Put lines into a single, cohesive workflow using Azure Logic Apps. By integrating these key MHAX processes into one streamlined workflow, you can enhance the efficiency of your outbound operations in Dynamics 365FO. This guide will help you configure a single Logic App to manage and automate these processes, ensuring that outbound events are delivered to the external WMS smoothly and effectively.
Goal
Goal is to create following workflow
Note – In Azure Logic Apps, the Switch branch is used to evaluate a single variable or expression against multiple possible values, directing the workflow down a specific path based on the match. It’s like a streamlined way to handle multiple conditions at once. As we have multiple alerts, we can retrieve all alerts in single logic app and redirect them to their corresponding actions using switch action.

Prerequisites
Setup Workflow parameters
Logic Apps parameters are variables that are defined at the start of workflow to store values that can be reused throughout the app. They make workflows more flexible and easier to maintain by allowing you to change these values in one place without having to update multiple actions. Parameters are useful for settings like API keys, Secret Keys, file paths, or other data that might change throughout the life of logic app or for security reasons.


Setup Azure Blob Storage Container for Put lines
In our use case, the External WMS does not accept put line data as it is considered an instruction. Therefore, we will store put line outbound transactions in blob storage as JSON files. These messages will be retrieved based on the transaction completion messages sent by the External WMS to Dynamics.
1. Create Storage account and wait for deployment

2. Create two containers – one for picklist put and second is for putaway-put

3. Upload test json schema file under both container.
This is to map container to Logic app.
Create a Json file with following content, save it and upload same file under both container.
[ { "$id": "1", "OutboundQueueId": "OUT-0000000000001", "TransactionType": "WorkCreation", "InventLocationId": "ADD YOUR WAREHOUSE ID HERE", "Payload": "", "SubscriptionId": "PickList-Put", "data01": "Work-0000002", "data02": "SO381342", "data03": "1", "data04": "5637599076", "data05": "5651549076", "data06": "", "data07": "1", "data08": "TestProduct-1", "data09": "1", "data10": "Pick" } ]

Collect Azure Blob Storage Container information for creating connection
1. Copy Access Key and save it offline

2. Copy Endpoint and save it offline

Payload schema for parsing Json data for each switch branch
{ "items": { "properties": { "$id": { "type": "string" }, "InventLocationId": { "type": "string" }, "OutboundQueueId": { "type": "string" }, "Payload": { "type": "string" }, "SubscriptionId": { "type": "string" }, "TransactionType": { "type": "string" }, "data01": { "type": "string" }, "data02": { "type": "string" }, "data03": { "type": "string" }, "data04": { "type": "string" }, "data05": { "type": "string" }, "data06": { "type": "string" }, "data07": { "type": "string" }, "data08": { "type": "string" }, "data09": { "type": "string" }, "data10": { "type": "string" } }, "required": [ "$id", "OutboundQueueId", "TransactionType", "InventLocationId", "Payload", "SubscriptionId", "data01", "data02", "data03", "data04", "data05", "data06", "data07", "data08", "data09", "data10" ], "type": "object" }, "type": "array" }
Logic app Configuration
Configure Switch action
1. Run on Rule ID

2. Subsequent actions
Add cases by Alert rules created in Dynamics above. Name them appropriately. Event will fall under default only if none of other conditions met.

Configure Putaway-Pick switch branch
We will be utilizing app parameters for all HTTP actions to keep things tidied
1. HTTP action

Authentication

2. Parse Json

Configure Putaway-Put switch branch
1. HTTP Call action

Authentication

2. Parse Json data
Use the payload schema from requisition section.

3. Add action: Create blob (V2)
This is to store put line message

Create a new connection

Configure create blob (V2) parameters

Configure PickList-Pick switch branch
Http Call

Authentication

Configure PickList-Put switch branch
Http Call

Authentication

Add action: Parse Json

Add action: Create Blob V2

Run and Test
1. Save logic App

2. Generate a New Transaction for Picklist and Putaway
A batch job will send an alert to Logic for each new transaction. The Logic app will subscribe to all transactions with a “Ready” status and update their status to “Sent.”

- Verify Logic app run

- Verify upload of Picklist Put json content in blob storage

- Verify upload of Putaway Put json content in blob storage

Expand Your Knowledge: See More Material Handling Blogs
Share this content:
Post Comment