Purchase Order Approval Workflow with Dynamics 365

Workflow Overview

Workflow is a representation of a business process that defines who must complete a task, make a decision, or approve a document. Benefits of using workflows include consistent, to ensure documents are processed and approved in a consistent and efficient manner, processes visibility, which allows for tracking the status and history of a specific workflow.

Figure 1: Workflow History

Users can view a centralized work list to view all workflow tasks and approvals assigned to them. In the Dynamics AX client, users can access their work list from the Role Center. In D365 for Operations, users can view their work items on the Dashboard, or through the Common module (Common> Work Items).

Procurement and Sourcing Workflows

Procurement and Sourcing workflows allow for purchase requisitions and purchase orders to be approved by a user other than the person who created the transaction. They provide the ability to track/limit spending, such as requiring approval if an order total is above a set amount. Automatic Actions can be set to automatically complete an action (approve, reject) if a certain condition is set. For example, automatically approve purchase order lines if the net amount is under $50k.

To ensure workflow is enabled when submitting a purchase order two setup steps are required.

Purchase Order Workflow Scenario

For this example we will create a simple Purchase Order Workflow that requires review and approval if the total is $50,000 or more. If the purchase order is less than $50,000 the purchase order will be automatically approved. Purchase Orders that require approval will be routed to a specific user.

To create our workflow we will navigate to Procurement and Sourcing > Setup > Procurement and Sourcing Workflows. Select New > Purchase Order Workflow. When prompted sign in using your organization credentials. The Workflow editor will open.

Please note you may have to complete a onetime download of the workflow editor. Instructions for completing the download can be foundhere.

Workflow Editor

The workflow editor is a graphical user interface (GUI) that you can use to create Dynamics 365 Operations workflows by arranging workflow elements on a design surface. You can add, delete, and reposition elements that represent the tasks and approvals that make up the workflow. You can also add flow-controls, such as manual decisions, automated decisions, and parallel activities. As a result, you can create complex workflows that exactly model the business processes that you want to automate. ThisTechNetarticle can be review to understand the foundation of the workflow editor.

Figure 3: Workflow Editor

Workflow Properties

To configure the properties of a workflow, open the workflow in the workflow editor. Click the canvas of the workflow editor and then click Properties to open the Properties form. Give the workflow a name such as Purchase Order Workflow. Update the owner if necessary.

Workflow Elements

On the far left side of the workflow editor you will find a list of workflow elements. Dynamics 365 for Operations offers various workflow elements that can be used to create the workflow to match the organizations business process.

Workflow elements for the purchase order workflow include:

Approve Purchase Order– Workflow step that allows for approval of the entire Purchase Order

The Approve Purchase Order, editableelements offers the same properties as the approval step along with allowing the approver to make changes to the purchase order before approving the purchase order

Conditional Decision– Allows for a visible condition and breakout of multiple paths in the workflow

Manal Decision– Allows for a visible condition and breakout of multiple paths in the workflow that the user must select from outcomes selected in the workflow

Parallel Activity– Allows for Two workflow activities to occur at the same time

Sub Workflow– Allows for a workflow to be embedded into this workflow

Review Purchase Order– Task the requires workflow activity, but is not recorded as an approval

This step is sometimes used by accounting to verify the correct financial dimensions are selected on purchase order lines

The Review Purchase Order, editableelements offers the same properties as the review step along with allowing the reviewer to make changes to the purchase order before completing the review

For this workflow we will utilize the Review Purchase Order and Approve Purchase Order workflow elements.

Workflow Creation

To build the workflow start by dragging and dropping workflow elements to create the workflow process.

Click and hold theReview Purchase Orderstep and drop it under Start

Click and hold theApprove Purchase Orderstep and drop it under Review

Drag from Start to workflow element to End to connect all steps. Workflow should look like the picture.

You can utilize error pane to recognize additional configurations that are needed to configure the workflow. Errors will be removed as we complete the configuration of the workflow.

Element Properties

Now that we have our workflow elements selected we need to configure additional settings for each element. You’ll notice that the review element has a red x in the upper right corner. This signals that there are additional configurations that need completed. Once all configurations are set the red x will be removed.

Basic Settings

In this tab you can update the name of the element and insert work item subject and instructions. Work item subject and instructions can be viewed by users who submit requisitions for processing.

Click the Review step and then click properties in the ribbon. The properties window will open

Participant– allows for Step to be assigned to users that carry specific security role or members of a user group

Hierarchy– utilizes the management hierarchy (if configured) to direct workflow from the originator through the management structure

Workflow users– allows for assignment to the originator or the owner of the workflow

User– allows the workflow step to be assignment to a specific user

None– default entry, must be updated to run the workflow (not valid for all workflow elements)

Select the Assignment tab

Select User in the assignment type tab

Select the User tab and use the arrows to select the user that should complete the review

Accept the defaults on the Time Limit tab

Figure 8: Properties - User Assignment

Escalation

Escalations are user Used when a document is overdue (the time allotted for the user to act on the document expires) and the document needs to be assigned to another user for approval. Escalations will not be configured for this workflow.

Automatic Actions

You can configure Dynamics 365 for Operations to automatically act, reject or approve, on the document if specific conditions are met. For our workflow, we want Operations to automatically approve the purchase order if the total amount is less than $50,000.

Close the Accounting Review Properties window.

Select the Approve Purchase Order Step and open the properties window

If desired, select the Basic Setting Tab to updated the Name of the step

Select the Automatic Actions tab

Select the enable automatic actions checkbox

Select Add Condition

Update the condition to match the screenshot below.

In the Auto complete action field select Approve

Figure 9: Automatic Approval

Notifications

Notifications allow alerts or emails to be sent to the recipient when the enabled event occurs on the purchase order. For our workflow we will enable the approve notification to be sent to the workflow originator, the user who submits the purchase order for approval.

Click the Notifications Tab

With the Approve workflow element selected, click the Level Down button

Select Step 1

Click the Basic setting tab if needed

Updated the Work Item Subject and Work tem Instructions

Figure 10: Notifications

Select the Assignments Tab

For Assignment Type select User

Click the User tab and select the user that will be responsible for approving the purchase order

Conditions

Condition are used to specify when the approval step is required. Conditions can be set on the workflow or workflow element. Conditions are not needed for this workflow.

Click on the conditions tab to review the options

Save and Close the workflow. When asked to make the version active select yes.

Submit Purchase Order to workflow

Now that our workflow is created and activated users can begin to submit purchase orders for approval. A user creates a PO with an amount greater than $50,000 and submits the purchase order to workflow. Since the purchase order is less than $50,000 the purchase order will be automatically approved.

Figure 11: Submit Purchase Order

When a user is assigned to review and approve the PO. The work items show up in the user’s Work Item list:

Figure 12: Work Items List

The user can approve the PO from the Work Item list, or from the PO form.

Figure 13: Complete Review

The Workflow History shows the different workflow activities the PO went through.

Figure 15: Workflow History

Appendix:

Workflow Editor in D365

Workflow editor is now a program that requires a 1-time download.

When you select a workflow to edit, a .NET component downloads and a separate window opens (Microsoft.Dynamics.AX.Framework.Workflow.WorkflowEditorHost).

This is easily cleaned up by running a Command Prompt:rundll32 dfshim CleanOnlineAppCache

The next time you click on a workflow, the extension will re-download.

Welcome to the User Group for Dynamics 365 & AX [D365UG|AXUG], we’re so glad you’re here! While we realize you may be here to troubleshoot a technical issue or simply learn new tips and tricks, we’d love the chance to share with you the incredible benefits the User Group has to offer [and don’t forget, if you’re interested in an incredible in-person learning opportunity don’t forget tojoin us in Nashville for our Summit event]!