[How to] Configure the Conditional Decision element and automatic approval of workflow in MsDynamics 365 FO
Dear Dynamics 365 Community,
Welcome to my next blog on Conditional decision element setup and manual/automation decision approach in workflow.
Business Scenario
There are plenty of scenarios, which business can follow, examples below.
- If the employee expenses claim invoice is submitted after 30 days of the expense, manager need to review the request and approve the same, if expenses claim submitted within 30 days, invoice will be auto approved.
- If amount more than some certain value, then those will be reviewed by some business level managers, if not, then it will be auto approved.
Let’s explore
Configurations
Navigate to Accounts Payable-> Setup-> Accounts payable workflow -> Create new-> Select the workflow (Invoice journal workflow for our case)
The workflow framework/editor will open in a separate screen
Now drag the ‘Conditional decision’ flow control from the flow controls section, it is required for adding conditions to instruct system if the invoice date is more than or less than 30 days older, see below screen shot
Add the condition as journal lines = on or before= today -30 days
Now create two approval ‘Approve vendor invoice recording journal’ workflow
1: For manual approval where invoice date is more than 30 days
2: If the invoice date is less than 30 days, it will be auto approved by system, no manual action.
Condition true workflow element- If the invoice date is more than 30 days, it will be true, for this case configure this as per the requirement for participant, hierarchy, workflow user, user.
Condition false workflow element- If the invoice date is less than 30 days, it will be false as per the condition set in conditional decision above, For this case we shall configure the automation action to allow system to auto approve the workflow
Select the approval journal workflow under ‘false’ node
Navigate the Automatic actions -> enable automatic actions-> add the condition for automation-> Journal Lines line= is on or after today -30 days.
If this condition is met, system will auto approve the workflow.
Now complete the 2 workflows to flow to end
Save the workflow and close
Add workflow to Journal
Now let’s add the workflow to Journal names for invoice journal and activate the workflow there
Journal Names- Enable approval workflow, add workflow which you have created.
The configurations are done
Let’s explore the functionality how this will work
We shall create two scenarios as follows
- If the invoice date is more than 30 days, system should assign the approver to approve the workflow.
- If the invoice date is less than 30 days. System should auto approve the workflow and it in ‘approved’ status
Created invoice which is more than 30 days old (today is 13th June and invoice selected as 12th may= more than 30 days)
Submitted to workflow
Workflow required manual approval
Scenario 1 requirement met
Now check the scenario 2 – Booked invoice with less than 30 days date (today is 13th June, invoice date used 9th June)
Now system will auto approve the workflow based on the automation actions given in the setup (on or after today – 30 days)
Now the workflow is automatically approved by the system as the invoice was within 30 days from today
Scenario 2 requirement met
Now user can post these invoices for two scenarios
Note- in this blog only one type of scenarios are shared, however there can be many requirement from companies, hence each scenarios might required different value criteria in the conditional decision.
This is it for this article, stay tuned for next blog
*This post is locked for comments