Set up project invoice automation

Completed

Complete the following steps to set up an automated invoice.

  1. Go to Settings > Recurring Invoice Setup.

  2. Create a batch job and name it as Project operations create invoices. The name must include the phrase "create invoices."

  3. In the Job Type field, select None. By default, the Frequency Daily and Is Active options are set to Yes.

  4. Select Run Workflow. The Look Up Record dialog contains three workflows:

    • ProcessRunCaller

    • ProcessRunner

    • UpdateRoleUtilization

  5. Select ProcessRunCaller and then select Add.

  6. In the next dialog, select OK. A Sleep workflow will be followed by a Process workflow.

Screenshot of the Dynamics 365 Project Operations Recurring Invoice Setup page showing the Flow menu expanded to show the Project Service workflow that you can run.

ProcessRunner is the workflow that creates the invoices that go through all contract lines that you'll create invoices for. The workflow creates invoices for those lines, and it looks at invoice run dates for the contract lines to determine which invoices must be created. Contract lines that belong to one contract have the same invoice run date. The transactions will be combined into one invoice with two invoice lines. If no transactions are present, the job will skip invoice creation.

When ProcessRunner has finished running, it will call ProcessRunCaller, provide the end time, and then it will close. ProcessRunCaller starts a timer for 24 hours from the specified end time, and when the timer ends, ProcessRunCaller will close. You'll only need to start the batch process once, and you'll only need to restart it if it stops working. Otherwise, multiple instances of the job will be created and will cause errors.