Dynamics 365 Field Service: Time Entries in Field Service by using Flow and PSA

Tested on:
Dynamics 365 version 9.0.2 and 9.1, Field Service solution version 7.x and 8.x, PSA solution version 2.x and 3.x, classic web client and UI, Microsoft Flow

One of the most frequent questions I face when doing Dynamics 365 Field Service presales is “How do we submit time entries?“. OOTB Field Service doesn’t offer Time and Expense Entries the way Dynamics 365 Project Service Automation does. Field Service has Booking Journals, which are based on applied resource booking statuses. While some customers are happy with Booking Journals, many need more versatile Time and Expense Entry functionalities. This is where PSA can help.

The goal

The goal in this example is simple: Allow field technicians using Field Service to submit Time Entries for work and other activities related to a Work Order. Field technicians and back office staff shouldn’t have to create new records or spend extra time in Dynamics 365 CE excluding creating, submitting and approving Time Entries.

To achieve the goal, PSA’s Time Entries are leveraged. The process in this example is simple and straightforward: A created Work Order fires off a Flow that creates all the records required for Time Entries. The idea of this blog post is to pitch a no-code solution about what’s possible with PSA and Flow. As every company has different needs for the devil in the details, you can freely take this concept and tweak it to fit your business specific needs.

The process is:
Create Work Order -> Create PSA Order -> Create Project -> Create Project Tasks -> Create PSA Order Line -> Submit Time Entries -> Approve Time Entries.

Invoicing is something this blog post doesn’t cover. There are plenty of variables with Time Entries without speculating on an approach to invoicing. A good point to understand and remember is that where as in Field Service a Closed-Posted Work Order usually creates a Field Service Invoice, in PSA approved Time Entries create Actuals. These Actuals are then invoiced from an Order’s (Project Contract) context and the formed invoice is a PSA Invoice. You can always create a nice document using SSRS reports with data from both Invoices, however if you are integrating Dynamics 365 CE to an ERP, your approach will most likely have to be different.

The Flow and its steps

The images of the Flow’s steps include annotations to point out specific fields that need clarification. As this blog post covers a fairly straightforward approach where only OOTB fields are used, your own Flow may look different. When using Dynamic content, be sure to choose a field’s value from the correct step of your Flow.

Step 1 – Create PSA Order

The first step is fired off when a Work Order is created. Considerations:

  • This step could also be fired off when a record in updated.
  • Choose a value to the Customer field based on your processes. In this example the value is of a Service Account from the related Work Order. Billing Account would be another option.
  • Name equals Work Order Number for the majority of records throughout the Flow for a straightforward approach.
  • Organizational Unit lookup could be placed on Work Order and the value then pulled to the Flow’s first step. In this example the Org Unit value is fixed thus the GUID on the Contracting Unit field.

Step 2 – Create Project

A Project is created after a PSA Order (Project Contract). A field technician will submit Time (and possibly Expense) Entries against a Project. As the Name field equals Work Order Number, it’s easy to distinguish the correct Project for Time Entries. Considerations:

  • If a Project Template is used, set its GUID to the Project Template field. If a template is used, skip the steps to create Project Tasks.
  • The msdyn_calendarid field on the Project entity may need to be set to Optional or Business Recommended for the Flow to work.

Step 3 – Create Project Tasks (optional)

If a Project Template is not used, Project Tasks can be created in this step. In this example I’m creating four tasks which represent different options a field technician can submit Time Entries against. Unique fields on the tasks are Project Task Name and WBS ID. The image at the bottom of this chapter illustrates a WBS with four tasks on PSA V2. Considerations:

  • Estimated Effort, Start Date and Due Date can be set according to your requirements as longs as the fields have a value.
  • If you’re running PSA V3: IsLineTask. In PSA V3 a Project Task relates to a Resource Assignment directly so Line Tasks are not used in this context anymore.
  • A WBS ID must be unique on each Project Task on a WBS.

Project WBS and Project Tasks – made with Flow

Step 4 – Create PSA Order Line

The fourth step is to create an Order Line for the Order from step 1. As a Project will be associated with an Order Line, it’s easier to first create an Order, then a Project and leave an Order Line for last. As field technicians are submitting Time Entries for a Project and we may want to invoice those entries, it’s important to set the Billing Method as Time and Material and to set Include Time (as well as Expense) to Yes. Considerations:

  • Project Contract Line Details, Invoice Schedules etc. are not created in this example.
  • The Name field in this step doesn’t equal the name of an Order Line. The name of the Order Line will be based on what is populated on the Write-In Product Field in this step. Go figure.

PSA Order and Order Line – made with Flow

Step 5 – Submit Time Entries

The final step is to submit Time Entries either with the Dynamics 365 for phones and tablets app or the Dynamics 365 Field Service Mobile (truck app) which leverages the Resco Woodford solution. The “truck app” is more versatile and is also more straightforward for field technicians as they can use a single app for both Fields Service related work (such as Work Orders) and Time Entries. Before you can use Time Entries on the “truck app” you have to customize your Resco Woodford mobile project and enable Time Entries on it. More information on installing the Field Service Mobile App can be found here.

Time Entries on the “truck app”
Project Approvals

I hope this post helps you take more out of both Field Service and PSA and gives you ideas on how to leverage PSA’s Time and Expense Entries with Field Service. There are many ways this concept can be taken even further. I challenge you to experiment with Flow! If you want to grab this Flow and edit it for your environment, grab it from the Those Dynamics Guys PowerApps Bank here.

My personal thanks to MVP Elaiza “What The Flow” Benitez for giving me the (All)Spark to this article and Flow!

All my blog posts reflect my personal opinions and findings unless otherwise stated.

4 thoughts on “Dynamics 365 Field Service: Time Entries in Field Service by using Flow and PSA”

  1. Hi Antti, thanks for the detailed example! I am sure going to reproduce this although I am not sure if this would be a real workable situation for Field Service. Especially in scenario’s where you have large number of work orders, this will duplicate each work order in a project contract and project (task) not to mention that I don’t think you want to invoice ‘hours’ from a project and ‘materials’ from a work order. Still, I agree there is a need for time registration against work orders in Field Service and it would be a big opportunity for Microsoft to pick that up for the standard Field Service Product.

    1. Time Entries are always a tough subject. This is something I’m hoping the FS PG will develop together with the PSA PG so that we would have a joint Time Entry. That coupled with both apps leveraging Actuals would make the most sense. To me at least. I’m thinking this would also simplify integration scenarios.

  2. Antti, nice post on a great topic. Question for you. When you defined values in options sets (such as the Contract Status Reason) were you able to define the option set value within the Flow interface or did you need to go the D365 customizations solution, copy the value, and enter/paste into Flow? Same question for defining lookup values.

    I am hoping there is a way to do this within flow but I am not seeing it and I have not found anything posted which explains this.

    Appreciate any insight. Thanks

    1. Hi Brian. Thanks for the feedback. I went to customizations and copied the option set values from there. Same for lookups: went in and the the record GUID and copy pasted it. There are different types of D365 triggers for updating/creating records. A couple of them are in preview and state: “Triggers a flow when an object is created in Dynamics 365 (with option sets exposed as strings)”.

Comments are closed.