Tag Archives: logic apps
How a Top North American Commercial Vehicle Manufacturer Connected D365 F&O with Legacy Systems Without Disrupting Operations
What happens when a global manufacturing giant needs to modernize its operations without grinding critical business processes to a halt? The answer is not a rip-and-replace approach – it is a carefully engineered integration strategy that lets modern and legacy systems co-exist, communicate, and complement each other. Are you planning an ERP upgrade but worried about what happens to the legacy systems your operations depend on? If so, this is for you. One of North America’s leading commercial vehicle manufacturers faced exactly this dilemma. With decades of investment in legacy financial and warehouse management systems, a hard cutover to a new ERP was not an option. Yet the need for a modern, scalable platform was undeniable. Their solution? Introduce Microsoft Dynamics 365 Finance & Operations (D365 F&O) as the new operational backbone – while keeping their legacy systems in play for financial control – and build robust, bi-directional integrations to bridge both worlds. At CloudFronts, we had the privilege of architecting and implementing those integrations. This blog walks you through three core data flows: Spot Purchase Orders, Advance Shipment Notices (ASN), and Goods Receipt Notes (GRN) – and what it really takes to make a modern ERP talk to a legacy system without missing a beat. Why Replace When You Can Integrate? Legacy systems in large manufacturers are not just old software. They carry years of financial logic, vendor relationships, and compliance configurations that are too risky to discard overnight. Replacing them introduces enormous operational and compliance risk. Doing nothing, however, is not an option either. The approach our client took – and one we increasingly recommend for manufacturers, distributors, and large enterprises – is a co-existence model: This means the business gets the agility of a modern ERP on day one, without putting financial operations at risk. The three integrations do the heavy lifting. Architecture at a Glance Before diving into each integration, it helps to understand the overall data flow pattern and the Azure services involved: Component Role D365 F&O System of record for purchasing and receiving operations Legacy System Retains financial control, inventory management authority Azure Logic Apps Parent-child middleware: orchestrates, transforms, and routes data Azure Blob Storage Checkpoint management for reliable incremental processing Azure Table Storage Full execution logs for traceability, audit, and failure replay The three integrations work in concert: Integration 1: Spot Purchase Orders — D365 F&O to Legacy Business Problem A Spot Purchase Order is an ad-hoc purchase order raised outside of long-term contracts — often for urgent material procurement. Spot POs are created and managed in D365 F&O by procurement teams. However, the legacy system is the system of financial record, meaning every Spot PO created in D365 must be reflected in the legacy system for financial commitment tracking and vendor payment processing. Without integration, this would require manual re-entry – a process prone to error, delay, and duplication. How the Integration Works Parent Logic App – Spot PO Orchestrator The primary Logic App runs on a scheduled recurrence and uses a checkpoint mechanism stored in Azure Blob Storage to fetch only incremental changes – purchase orders created or modified since the last successful run. This ensures efficiency and prevents reprocessing of already-handled records. The workflow determines the operation type required for each PO: For each scenario, the Logic App fetches enriched data from multiple D365 F&O OData entities and constructs a structured JSON payload tailored for the legacy system’s API. ⚙ Tech Note: OData Entities Used PurchaseOrderHeaders, PurchaseOrderLinesV2, PurchaseLineDataEntities, WHSPurchLines, StatusCustomDatas Child Logic App – SendRequest (Reusable) Rather than embedding API communication logic directly in the orchestrator, we separated it into a reusable child Logic App. This child app receives the constructed payload, retrieves an OAuth 2.0 Bearer token, and executes the HTTP POST call to the legacy system’s API endpoint. This modular design pays dividends during maintenance: any change to authentication logic or API communication is made once in the child app and automatically applies to all parent integrations. Failed Record Handler Every enterprise integration needs robust failure recovery. When an API call fails: Sample Payload – Spot PO Create Sample JSON Payload: { “userId”: “JSMITH”, “order”: “456789”, // Last 6 digits of D365 PO number “vendor”: “VEND001”, “receiptLoc”: “SITE01”, “vendorOvrdCd”: “14”, “lineItems”: [{ “orderLine”: “001”, “item”: “ITEM001”, “openQty”: 10, “deliveryDate”: “061526”, // MMddyy format for legacy compatibility “comment”: “MPSSYS order – JSMITH” }] } } ✓ Business Impact: Zero manual re-entry of purchase orders between systems. Every Spot PO created or changed in D365 F&O is automatically reflected in the legacy system within minutes. Integration 2: Advance Shipment Notices — Legacy to D365 F&O Business Problem An Advance Shipment Notice (ASN) is a notification sent by the legacy WMS to the receiving system, informing it of an incoming shipment before it physically arrives. D365 F&O needs to receive ASNs to create Inbound Load Headers and Load Lines – enabling warehouse teams to prepare for receiving. Without this integration, receiving teams in D365 would be blind to incoming shipments until trucks arrived at the dock – eliminating any opportunity for advance dock scheduling, labor planning, or inventory pre-positioning. The Hybrid Integration Approach This integration presented an interesting technical challenge: the standard D365 F&O Inbound ASN V5 API supports a well-defined XML format, but the business required additional fields beyond what the standard API supports. The solution was a two-step Hybrid ASN Integration approach: ⚙ Tech Note: API Endpoint Pattern Insert: POST {{BASE_URL}}/api/connector/enqueue/{{ACTIVITY_ID}}?entity=Inbound ASN V5 Enrich: PATCH on InboundLoadHeaders and WHSASNWorkData Smart Insert vs. Update Determination To handle scenarios where an ASN might be re-sent for corrections or resynchronization, the integration includes a check before processing: This idempotent design prevents duplicate inbound loads from being created when the legacy system re-sends an ASN. One nuance worth noting: in D365’s standard ASN structure, the LoadId, ShipmentId, and LicensePlateNumber must carry the same value. The legacy system’s outbound ASN payload is configured to honour this requirement – ensuring clean data entry … Continue reading How a Top North American Commercial Vehicle Manufacturer Connected D365 F&O with Legacy Systems Without Disrupting Operations
Real-Time Integration with Dynamics 365 Finance & Operations Using Azure Event Hub & Logic Apps (F&O as Source System)
Most organizations think of Dynamics 365 Finance & Operations (D365 F&O) only as a system that receives data from other applications. In reality, the most powerful and scalable architecture is when F&O itself becomes the source of truth and an event producer. Every financial transaction, inventory update, order confirmation, or invoice posting is a critical business event – and when these events are not shared with other systems in real time, businesses face: So, the real question is: What if every critical event in D365 F&O could instantly trigger actions in other systems? The answer lies in an event-driven architecture using Azure Event Hub and Azure Logic Apps, where F&O becomes the producer of events and the rest of the enterprise becomes real-time listeners. Core Content Event-Driven Model with F&O as Source In this model, whenever a business event occurs inside Dynamics 365 F&O, an event is immediately published to Azure Event Hub. That event is then picked up by Azure Logic Apps and forwarded to downstream systems such as: In simple terms: Event occurs in F&O → Event is pushed to Event Hub → Logic App processes → External system is updated This enables true real-time integration across your entire IT ecosystem. Why Use Azure Event Hub Between F&O and Other Systems? Azure Event Hub is designed for high-throughput, real-time event ingestion. This makes it the perfect choice for capturing business transactions from F&O. Azure Event Hub provides: This ensures that every change in F&O is captured and made available in real time to any subscribed system. Technical Architecture Here is the architecture with F&O as the source: Role of each layer: Component Responsibility D365 F&O Generates business events Event Hub Ingests & streams events Logic App Consumes + transforms events External Systems Act on the event This architecture is:✔ Decoupled✔ Scalable✔ Secure✔ Real-time✔ Fault tolerant How Does D365 F&O Send Events to Event Hub? Using Business Events F&O has built-in Business Events Framework which can be configured to trigger events such as: These business events can be configured to push data to an Azure Event Hub endpoint. This is the cleanest, lowest-code, and recommended approach. Logic App as Event Consumer (Real-Time Processing) Azure Logic App is connected to Event Hub via Event Hub Trigger: Once triggered, the Logic App performs: Example downstream actions: F&O Event Logic App Action Invoice Posted Push to Power BI + Send email Sales Order Create record in CRM Inventory Change Update eCommerce stock Vendor Created Sync with procurement system This allows one F&O event to trigger multiple automated actions across platforms in real time. Real-Time Example: Invoice Posted in F&O Step-by-step flow: All of this happens automatically, within seconds. This is true enterprise-wide automation. Key Technical Benefits Why this Architecture is important for Technical Leaders If you are a CTO, architect, or technical lead, this approach helps you: Instead of systems “asking” for data, they react to real-time business events. To conclude, by making Dynamics 365 Finance & Operations the event source and combining it with Azure Event Hub and Azure Logic Apps, organizations can create a fully automated, real-time, intelligence-driven ecosystem. Your first step: ➡ Identify a critical business event in F&O➡ Publish it to Azure Event Hub➡ Use Logic App to trigger automatic actions This single change can transform your integration strategy from reactive to proactive. We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com
Connecting Application Insights Logs and Query Through Logic Apps
Application Insights is a powerful monitoring tool within Azure that provides insights into application performance and diagnostics. Logic Apps, on the other hand, enable workflow automation for integrating various Azure services. By combining these tools, you can automate querying Application Insights logs and take actions based on the results. This blog explains how to set up this connection step-by-step. Prerequisites Before proceeding, ensure you have the following: Step 1: Enable Logs in Application Insights To ensure Application Insights data is accessible: Step 2: Create a KQL Query KQL (Kusto Query Language) is used to query Application Insights logs: Step 3: Set Up a Logic App Create a Logic App that will query Application Insights: Step 4: Configure Logic App Actions To execute and process the query: 2. Add a Body for the request: “`json { “query”: “traces | where timestamp >= ago(1h) | summarize Count=count() by severityLevel” } 3. Add actions to handle the response, such as sending an email or creating an alert based on the query results. Step 5: Test the Workflow Use Cases Conclusion Integrating Application Insights logs with Logic Apps is a straightforward way to automate log queries and responses. By leveraging the power of KQL and Azure’s automation capabilities, you can create robust workflows that monitor and react to your application’s performance metrics in real-time. Explore these steps to maximize the synergy between Application Insights and Logic Apps for a more proactive and automated approach to application monitoring and management. We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfonts.com.
