Trends

MH507 – Monitoring MHAX Alerts and Retrieving Outbound Events: Leveraging Azure Logic Apps and REST API in Dynamics 365FO

Introduction

In this article, we’ll dive into how you can use Azure Logic Apps to monitor MHAX alerts and retrieve outbound queue events in Dynamics 365FO. I’ll walk you through setting up Logic App triggers to capture and process alerts from the MHAX module, as well as using the REST API to retrieve outbound events.

Note – following are two Rest endpoints for Outbound and Inbound messages in Dynamics

Outbound – https://base_environment_URL/api/services/WMHEServices/WMHEService/readOutboundSubscriptionQueue

Inbound https://base_environment_URL/api/services/WMHEServices/WMHEService/executeInboundTransaction


Step-by-Step Instructions

Create an Azure Logic App (consumption)

1.1 Access the Azure Portal:

1.2 Create a New Logic App:

  • In the Azure Portal, click on Create a resource.
  • Search for Logic App and select it from the list.
  • Click Create to start the setup process.

1.3 Configure Basic Settings:

  • Subscription: Select your Azure subscription.
  • Resource Group: Choose an existing resource group or create a new one.
  • Logic App Name: Enter a unique name for the Logic App.
  • Region: Select the Azure region where you want to deploy the Logic App.
  • Click Review + Create, review your settings, and then click Create.
image MH507 - Monitoring MHAX Alerts and Retrieving Outbound Events: Leveraging Azure Logic Apps and REST API in Dynamics 365FO

Configure Logic App Trigger

2.1 Open the Logic App Designer:

  • Once the deployment is complete, go to the Logic App you created.
  • In the Logic App’s overview page, click on Logic App Designer.
image-1 MH507 - Monitoring MHAX Alerts and Retrieving Outbound Events: Leveraging Azure Logic Apps and REST API in Dynamics 365FO

2.2 Add a Trigger for the Logic App:

  • Click on + New step to add a trigger.
  • Search for Fin & Ops App Events in the connector list.
  • Select the When a Business Event Occurs connector.
image-2 MH507 - Monitoring MHAX Alerts and Retrieving Outbound Events: Leveraging Azure Logic Apps and REST API in Dynamics 365FO

Create an OAuth Connection

  • Click Sign in
  • This will prompt you to sign in (Make sure you have right permissions)
image-3 MH507 - Monitoring MHAX Alerts and Retrieving Outbound Events: Leveraging Azure Logic Apps and REST API in Dynamics 365FO

2.3 Configure the Business Events Trigger:

  • Instance: Choose Your Dynamics environment
  • Category: Alerts
  • Business Event: Choose When an alert rule is triggered.
  • Advanced parameter (optional): Choose legal entity
image-6 MH507 - Monitoring MHAX Alerts and Retrieving Outbound Events: Leveraging Azure Logic Apps and REST API in Dynamics 365FO

2.4 Add action – Parse Json from Trigger

  • Content – Select Body Output of trigger
  • Schema – Select Use sample payload to generate schema and upload (Use schema content downloaded from Business events – see previous article of this series)
image-7-773x1024 MH507 - Monitoring MHAX Alerts and Retrieving Outbound Events: Leveraging Azure Logic Apps and REST API in Dynamics 365FO

2.5 Setup a condition to retrieve specific alters based on RuleID

image-8 MH507 - Monitoring MHAX Alerts and Retrieving Outbound Events: Leveraging Azure Logic Apps and REST API in Dynamics 365FO

2.6 Configure True branch

URI – https://base_environment_URL/api/services/WMHEServices/WMHEService/readOutboundSubscriptionQueue

Body: Zero indicates all and SubscriptionID indicates name of subscription ID set in Dynamics.

image-9 MH507 - Monitoring MHAX Alerts and Retrieving Outbound Events: Leveraging Azure Logic Apps and REST API in Dynamics 365FO
  • Configure Authentication of above HTTP call action
image-10-817x1024 MH507 - Monitoring MHAX Alerts and Retrieving Outbound Events: Leveraging Azure Logic Apps and REST API in Dynamics 365FO

2.7 Configure False branch

  • I will leave this section empty as additional alerts are not required for our case.
image-11 MH507 - Monitoring MHAX Alerts and Retrieving Outbound Events: Leveraging Azure Logic Apps and REST API in Dynamics 365FO

Test Trigger and action

  • Click ‘reset status’ of existing outbound events
image-12 MH507 - Monitoring MHAX Alerts and Retrieving Outbound Events: Leveraging Azure Logic Apps and REST API in Dynamics 365FO
  • Wait for batch job ‘Change Base alert’ to run in Dynamics
image-13 MH507 - Monitoring MHAX Alerts and Retrieving Outbound Events: Leveraging Azure Logic Apps and REST API in Dynamics 365FO
  • Logic app triggers
image-14 MH507 - Monitoring MHAX Alerts and Retrieving Outbound Events: Leveraging Azure Logic Apps and REST API in Dynamics 365FO
  • Verify HTTP Call action
image-15 MH507 - Monitoring MHAX Alerts and Retrieving Outbound Events: Leveraging Azure Logic Apps and REST API in Dynamics 365FO

HTTP Action Output

image-16 MH507 - Monitoring MHAX Alerts and Retrieving Outbound Events: Leveraging Azure Logic Apps and REST API in Dynamics 365FO

We have successfully retrieved the outbound event from Dynamics. The event is now ready to be transmitted to the External WMS system for consumption

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