Tag Archives: F&O
How a Leading North American Commercial Vehicle Manufacturer Prevented Incorrect Purchase Prices on Purchase Orders Using Dynamics 365 Finance & Operations
Summary A leading North American commercial vehicle manufacturer was experiencing incorrect purchase prices on Purchase Orders in Dynamics 365 Finance & Operations. The root cause: overlapping trade agreement records in the PriceDiscTable that were never closed when new prices were introduced. CloudFronts diagnosed the issue and implemented a single rule – close the active trade agreement record before creating a new one – enforced through automation on both inbound integrations and manual entry workflows. The result: deterministic price resolution, clean audit trails, and procurement teams that trust the system again. Table of Contents 01Summary 02Customer 03Why it matters 04Our perspective 05Price logic 06Problem 07Fix 08Example 09Automation 10Edge cases 11Conclusion About the Customer Customer Overview Our customer is one of North America’s leading manufacturers of heavy-duty commercial vehicles, operating an extensive network of manufacturing and logistics facilities. As part of its supply chain operations, the organization manages high-volume production, component manufacturing, and distribution processes that require seamless integration across enterprise systems. For growing businesses running Dynamics 365 Finance & Operations, procurement accuracy is non-negotiable. As order volumes climb and vendor pricing evolves, even a small gap in how purchase prices are managed can quietly erode margins, trigger invoice disputes, and undermine trust in the system. One of the most common and most overlooked causes of pricing errors on Purchase Orders is something surprisingly simple: outdated trade agreement records that were never closed. Have you ever updated a vendor’s price in D365 FO, only to find that Purchase Orders raised the next week still show the old price? If you’re nodding, this article is for you. Consider this: organisations that leave overlapping trade agreement records unmanaged often find hundreds, sometimes thousands, of duplicate active price records for the same Item x Vendor combination in their PriceDiscTable. Each one is a potential pricing conflict waiting to surface on a Purchase Order. The cumulative effect on procurement accuracy, AP reconciliation time, and vendor relationships is significant. By the end of this article, you will understand exactly why this happens, how D365 FO’s price engine actually resolves trade agreements, and the single rule that eliminates the problem entirely. Why This Matters Incorrect Purchase Prices Create Real Business Risk Incorrect purchase prices on POs are not just a data nuisance. They lead to overpayments that chip away at margins, invoice mismatches that clog up Accounts Payable, and worst of all, procurement teams who stop trusting the system and start overriding prices manually on every order. Once that happens, the entire value of centralized pricing governance is gone. Why We’re Writing This A Pattern We See Across D365 F&O Implementations At CloudFronts, we’ve implemented and supported Dynamics 365 F&O procurement modules across manufacturing, distribution, and services organisations. This specific issue, stale trade agreements causing wrong PO prices, has come up in nearly every engagement where vendor prices are managed through the Trade Agreement Journal. We’ve seen the pattern, diagnosed the root cause repeatedly, and built the automation to prevent it. This article distils that experience into something actionable. How D365 F&O Resolves Purchase Prices The Price Comes From Trade Agreements, Not the Item Master The price on a Purchase Order line does not come from the item master. It is resolved from a Trade Agreement, a dated record that says: “For this item, from this vendor, in this currency, starting from this date, the unit price is X.” These records are created through the Trade Agreement Journal, posted, and stored in the PriceDiscTable. When a PO line is created, the price search engine finds every posted record whose date window, from From Date to To Date, covers the PO date. It then filters by matching keys such as item, vendor, currency, site, warehouse, and quantity break, and selects the price. Critically, the system does not prefer the most recently posted record. It looks at date windows. If two records both cover today, the engine has two valid candidates. Its tie-breaking behaviour is not something you should rely on for pricing accuracy. The Problem Overlapping Records Create Pricing Conflicts Here’s how the issue plays out. A vendor price is loaded into D365 FO, either from a legacy system integration or manually by a buyer. The record is created with an open-ended To Date, the sentinel 1900-01-01 or a far-future date, meaning it never expires. Months later, a new negotiated price arrives. A fresh trade agreement line is added for the same Item x Vendor. But nobody closes the original record. Both records now have date windows that include today. The price engine finds two matches, and sometimes the older, stale price wins. Root Cause There is no closure step. Every new price is layered on top of the old one instead of replacing it in time. The Fix Close Before You Create The rule is simple: whenever a new price record is created for an Item x Vendor combination, the currently active record must have its To Date set to Today – 1. The new record’s From Date is set to Today. This produces two non-overlapping windows: old price valid up to yesterday, new price effective from today. Why Today – 1? If both dates include the same day, the engine still finds two candidates. One day’s difference makes the price resolution deterministic. Worked Example One Item, One Vendor, One Clean Price Timeline Item purchased from Vendor A, USD, quantity break of 1: Event Action From Date To Date Price 22 June – Initial load Create Record A 22 June 2026 Open-ended $7.00 24 June – New price Close Record A 22 June 2026 23 June 2026 $7.00 24 June – New price Create Record B 24 June 2026 Open-ended $6.50 After posting, any PO dated 24 June or later picks $6.50. Historical POs on or before 22 June still resolve to $7.00. Clean, unambiguous, audit safe. Where to Enforce This Rule Automation Should Handle the Closure Inbound Integration If prices flow from a legacy system via OData, build a custom API endpoint in D365 FO that … Continue reading How a Leading North American Commercial Vehicle Manufacturer Prevented Incorrect Purchase Prices on Purchase Orders Using Dynamics 365 Finance & 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
