Building Dynamics 365 Integration Between Field Service And Finance & Supply Chain Using Dual-Write

After multiple years of a natural yet sometimes painful growth, the Dual Write integration components between Dynamics 365 Customer Engagement and Finance & Supply Chain siblings hit the maturation stage.  This blog will focus on some of the basic details encountered during the last few years of customer engagements  implementing D365 Field Service along with D365 Finance & Supply Chain centered on demand management, inventory tracking, and visibility between the two systems on requests for service and parts.

What is Dual-Write? 

Dual-write provides tightly coupled, bidirectional integration between Finance and Operations apps and DataVerse. [I]

Dual-Write

System Requirements for Dual-Write:

  • Finance and Operations apps that have build version 10.0.9 (10.0.383.20013) (Quality update) and platform update 33 or later
  • Customer engagement apps that have platform version 9.1.0000.11732 or later
  • Install Core Solution and Application Orchestration Solution from AppSource.
Dual-write core solution

[i]

What integrations for Field Service?

Many mapping concepts exist between D365 Customer Engagement and D365 F&O already like Prospect to cash, Inventory, Unified Product Experience, Vendor management, etc. One of our clients wanted to integrate work orders from Field Service to D365 F&O.  Our choice was to integrate our work orders from D365 CE to D365 F&O as sales orders to allow their internal administrative service and sales departments to have visibility to service type orders in both systems.  We based this off the integration built by data integrator which was the method used to integrate field service and F&O before dual-write was available.

Data Integrator - Dual Write

Integration of Work Orders to Sales Orders

One of our requirements for the integration was not to dual-write over work orders from D365 CE unless they had been scheduled or Status = Scheduled.  This presented us with a challenge.  If we had directly integrated work orders to sales orders in D365 F&O without any filters, then this problem would be minimized, however, since we were not writing over work orders immediately, we had an issue.  As we add work order product lines or service lines, these would be written over immediately to D365 F&O as sales order lines however there would be no header sales order to associate.  For this reason, we needed to filter our order lines with the same filter logic as the header for it to be available in D365 F&O as a sales order.

Work Order - Dual Write

By adding a new header status field to our work order product and service lines table, we can then keep the statuses of the lines and header in synch using a Power Automate flow.  This along with our dual-write filter on the lines for Status = Scheduled will keep us from trying to synch over lines to sales order headers that are not present in F&O.

Power Apps - Dual Write
Finance and Operations - Dual Write

Keeping Work Order created Sales Orders separate in F&O

One challenge this presents is how to keep Sales Orders generated from the work order path separate from other sales orders in D365 Finance and Operations.  We solution for this problem two different ways.

The first method we used to keeps these types of sales orders distinct from actual sales orders entered directly in D365 F&O or possibly sales orders being dual-written over from D365 CE Sales was to format the unique work order number which is an auto-number field in Field Service to be applied as the sale order number in F&O.  We used this format:  W0000X as our work order/sales order number which is different than our other standard sales order numbers format:  S0000X.

The other method we used to distinguish sales order origin was the “sales order origin” field in D365 Finance & Operations.  We set this value to WorkOrderIntegration in our Dual-Write mapping, so we know sales orders that originated from D365 Field Service in F&O.

Sales Ordering Type - Dual Write

In summary, the integration of Dynamics 365 Field Service and Finance & Supply Chain elements has many intriguing data points – levering the data integrator’s pattern of work order to sales order allows to successfully drive the business demand through the ERP system for field service requests.  This propagates the proper inventory management and production controls in both systems.


[i] https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/dual-write/dual-write-overview#top-reasons-to-use-dual-write

[i] https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/dual-write/dual-write-system-req

  Microsoft Unveils October 2018 Release Notes for Dynamics 365 Finance and Operations