Saturday, July 8, 2017

Analyze Costs and Gross Profit for Dynamics 365 Field Service Work Orders


Dynamics 365 Field Service solution automatically calculates the subtotal and total amount to be billed for the Work Order based on Products and Services used. However, it does not calculate the total cost at the Work Order level.
Field Service managers like to analyze costs and profitability by various dimensions such as:
  • Resources (technicians)
  • Equipment
  • Territories
  • Geography
  • Dates, etc.
This requirement can be addressed by creating rollup and calculated fields in the Work Order entity.
I created the following custom fields in the Work Order entity and added them to the Work Order form.
Field
Data Type
Field Type
Description
Total Product Cost
Currency
Rollup
SUM of Total Cost from related Work Order Product records where Line Status = “Used”
Total Service Cost
Currency
Rollup
SUM of Total Cost from related Work Order Service records where Line Status = “Used”
Total WO Cost
Currency
Calculated
Total Product Cost + Total Service Cost
Gross Profit
Currency
Calculated
Subtotal Amount - Total WO Cost
These fields can be added to views and may be used for reports and dashboards for better insights into Work Order costs and profitability.