Trends

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.

image-17 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App

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.

image-18 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App
image-19 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App

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

image-20 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App

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

image-21 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App

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"   } ]
image-22 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App

Collect Azure Blob Storage Container information for creating connection

1.  Copy Access Key and save it offline

image-23 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App

2.  Copy Endpoint and save it offline

image-24 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App

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

image-25 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App

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.

    image-26 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App

    Configure Putaway-Pick switch branch

    We will be utilizing app parameters for all HTTP actions to keep things tidied

    1. HTTP action

    image-27 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App

    Authentication

    image-28-929x1024 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App

    2. Parse Json

    image-29 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App

    Configure Putaway-Put switch branch

    1. HTTP Call action

    image-30 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App

    Authentication

    image-31 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App

    2. Parse Json data

    Use the payload schema from requisition section.

    image-32 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App

    3. Add action: Create blob (V2)

    This is to store put line message

    image-33 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App

    Create a new connection

    image-34 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App

    Configure create blob (V2) parameters

    image-35 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App

    Configure PickList-Pick switch branch

    Http Call

    image-36 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App

    Authentication

    image-37-893x1024 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App

    Configure PickList-Put switch branch

    Http Call

    image-38 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App

    Authentication

    image-39-772x1024 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App

    Add action: Parse Json

    image-40 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App

    Add action: Create Blob V2

    image-41 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App

    Run and Test

    1. Save logic App

    image-42 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with 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.”

    image-43 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App
    • Verify Logic app run
    image-44 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App
    • Verify upload of Picklist Put json content in blob storage
    image-45 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App
    • Verify upload of Putaway Put json content in blob storage
    image-46 MH508 - Streamlining MHAX Workflows: Consolidating Sales and Outbound Pick/Put Lines in Dynamics 365FO with Logic App

    Expand Your Knowledge: See More Material Handling Blogs

    Share this content:

    I am Yogeshkumar Patel, a Microsoft Certified Solution Architect and ERP Systems Manager with expertise in Dynamics 365 Finance & Supply Chain, Power Platform, AI, and Azure solutions. With over six years of experience, I have successfully led enterprise-level ERP implementations, AI-driven automation projects, and cloud migrations to optimise business operations. Holding a Master’s degree from the University of Bedfordshire, I specialise in integrating AI with business processes, streamlining supply chains, and enhancing decision-making with Power BI and automation workflows. Passionate about knowledge sharing and innovation, I created AI-Powered365 to provide practical insights and solutions for businesses and professionals navigating digital transformation. 📩 Let’s Connect: LinkedIn | Email 🚀

    Post Comment

    Table of Content