Business process flows(BPFs) are great if you want to ensure that people enter data consistently and follow the same steps every time they work with a customer. For example, you might want to create a business process flow to have everyone handle customer service requests the same way, or to require that people get approval for an invoice before submitting an order. You can also automate the processes with business process flows and update or validate the record in real time. They are easy to create and activate. You can add fields and conditions to it and they are ready to go.
In this tutorial i am going to show you how to use a business process flow and update the record Status with it. While updating the status also i will add a validation so if there is missing fields, the user won’t be able to proceed to next step with flows.
In our scenario, we want users to fill all the necessary Account Fields before closing the Opportunities as Won by using the flow. Normally you can make fields as required in BPFs but you can not add error messsages or pop ups. But by adding workflows to where needed, we can overcome this problem.
I will use the Opportunity Sales Process BPF that comes built in with CRM. I will create a sync on demand workflow to Update and Validate the record. Sync is needed because we want to show error message in real time. On demand is needed because in order to use the workflow in BPFs, you need to make your workflows on demand.
After you create your workflow, insert to the BPF step you want to trigger in. So in our case this will be Close step and we will choose trigger as Stage Entry. So when we are completing the BPF, the workflow will be triggered.
Save and Activate the BPF then head to the Opportunity entity to test it.