Dynamics 365 Project Service Automation: Setting Actuals to “Ready to Invoice”

Tested on:
Dynamics 365 CE version 9.1, PSA solution version 3.3, Unified Interface

On this blog post I’m covering the changes to how Actuals are invoiced in PSA V3.3. I have also included a small twist by recreating the OOTB functionality of setting Actuals to “Ready to Invoice” and “Not Ready to Invoice” with Flow.

Invoicing Actuals has changed slightly in version 3.3 of Dynamics 365 Project Service Automation. Before V3.3, all Actuals were pulled on an invoice when one was created either manually form a Project Contract or by using Batch Jobs. In V3.3, the Billing status (msdyn_billingstatus) of an Actual has to be set to “Ready to Invoice” before it is pulled on an Invoice.

The new way of invoicing Actuals is very straightforward and additional customizations aren’t mandatory to use the new functionality. Creating a couple of new views can help those responsible for Invoicing Project Contracts. Let’s go over the changes in V3.3.

Invoicing Actuals in PSA V3.3

Before anything is done to Actuals, I have navigated to a Project Contract and clicked on “Create Invoice”. A notification saying “There are no past dated transactions to invoice for this project contract. No invoice was created.” is displayed. This means that PSA doesn’t have any Actuals related to this Project Contract that can be picked up on an Invoice. Even if we have approved Time Entries, an Invoice isn’t created as the Billing status of your Actuals has not been set to “Ready to Invoice”.

If you see this notification, the Billing status of your Actuals has not been set to “Ready to Invoice”

Billing status can be changed for multiple Actuals on one go by selecting all the Actuals that you want to invoice and by clicking on “Ready to invoice” on the ribbon. The same goes for setting the Billing status to “Not ready to invoice”. Select the relevant Actual records and click on “Not ready to invoice” on the ribbon.

Select the desired Actuals and set them to either “Ready to invoice” or “Not ready to invoice”

Custom views to help you select the correct Actuals

As the OOTB view are a bit hard to read and interpret, a couple of custom views can tremendously help you select the correct Actuals. The first view seen below displays all Unbilled Sales Actuals with a quantity greater than or equal to 0 and a Billing status of Unassigned. These Actuals have not yet been processed for invoicing.

The second view displays all Unbilled Sales Actuals with a quantity greater than or equal to 0 and a Billing status of Ready to Invoice. This view can be used when setting Actuals to Not Ready to Invoice. Both views have columns for custom fields Resource Work Hours and Resource Work Location as my instance has Multidimensional Pricing configured.

View of Actuals not processed for invoicing
View of Actuals with a Billing stauts of “Ready to Invoice”
Columns used in views

Recreating the “Ready to Invoice” and “Not Ready to Invoice” functionality with Flow

After being struck with “Flow fever”, I’ve had a habitual need to create all async workflows with Microsoft Flow. My reason has primarily been to learn and get better at Flow and to prepare for the day when all async workflows in D365 CE will be based on Flow. As such, I’ve recreated the OOTB functionality of “Ready to Invoice” and “Not Ready to Invoice”. I picked up a few new things doing this exercise so if you are all about getting better at Flow, do read on. As always, these Flows can be downloaded from the TDG Power Platform Bank.

“Ready to Invoice” with Flow

I spent some time on the condition with this one. I wanted the Flow to “Terminate as Cancelled” if the defined condition is not met. When quantity is greater than or equal to 0, Transaction Type is Chargeable and Billing status is Unassigned, an Actual’s Billing status will be updated to Ready to Invoice. The condition in this Flow is:

@and(greaterOrEquals(body(‘Get_Actual_record’)?[‘msdyn_quantity’], 0),
equals(body(‘Get_Actual_record’)?[‘msdyn_transactiontypecode’], 192350005),
not(equals(body(‘Get_Actual_record’)?[‘msdyn_billingstatus’], 192350004)), not(equals(body(‘Get_Actual_record’)?[‘msdyn_billingstatus’], 690970000)),
not(equals(body(‘Get_Actual_record’)?[‘msdyn_billingstatus’], 192350000)),
not(equals(body(‘Get_Actual_record’)?[‘msdyn_billingstatus’], 192350001)),
not(equals(body(‘Get_Actual_record’)?[‘msdyn_billingstatus’], 192350002)),
not(equals(body(‘Get_Actual_record’)?[‘msdyn_billingstatus’], 192350003)))

This Flow sets the Billing status of Actuals to “Ready to Invoice”

“Not Ready to Invoice” with Flow

This Flow sets the Billing status of Actuals to “Not Ready to Invoice” i.e the option set’s value is set to Unassigned. The Flow is terminated as cancelled if its condition is not met. The condition checks that quantity is equal to or greater than 0, Transaction Type is Chargeable and that Billing status is Ready to Invoice. As Unassigned is a value that can’t be chosen for an option set in a Flow’s action, the field’s value will be set to Null with a very simple expression. The condition in this Flow is:

@and(greaterOrEquals(body(‘Get_Actual_record’)?[‘msdyn_quantity’], 0),
equals(body(‘Get_Actual_record’)?[‘msdyn_transactiontypecode’], 192350005),
equals(body(‘Get_Actual_record’)?[‘msdyn_billingstatus’], 192350004))

This Flow sets the Billing status on Actuals to “Not Ready to Invoice”

I hope this blog post clarifies how Actuals are to be handled when it’s time to invoice approved Time Entries, Expense Entries, Milestones and Materials (Products) in PSA V3.3.

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

7 thoughts on “Dynamics 365 Project Service Automation: Setting Actuals to “Ready to Invoice””

  1. Hey Antti,

    Thanks for the great blog!
    I’m wondering if its possible to generate an invoice like a PDF or something with all informations automatically out-of-the-box?
    I’m using PSA 3.x

    Best regards,
    Gianluca Esposito

    1. Hi Gianluca,
      Thanks 🙂 The OOTB Word templates and the OOTB SSRS report are pretty basic but it is possible. In pretty much every implementation there is a need to either create a new Word template or an SSRS report though.

  2. Hi Antti. We are trying to connect the Actuals to the Invoices. The Actuals have an Invoice field (look up). However, there are no invoices in the field. Do you if that field is populated with the invoice, when invoiced. If yes, what are the config required to happen. Many thanks in advance.

    1. Hi Costin. The Invoice field on an Actual is populated when an Invoice is confirmed or when an Invoice is corrected. If you look at the Billing status field on an Actual and it says Customer Invoice Created, you will know that the Actual is on a draft invoice as an Invoice Line Detail.

  3. Hi Antti
    Long time now speak, hope you’re well. We have just upgraded to PSA 3 (3.10 in our case) and were caught out by this need to mark actuals as ready to invoice. Now we know, all good, but quetsion: do we just need to mark ‘unbilled sales’ actuals or all actuals? I imagine just the unbilled sales ones, so just making sure.

    Thanks!

    1. Hi Alister. You’re correct; only Unbilled Sales Actuals need to be marked. Remember to mark Milestones as well.

Comments are closed.