Mastek Blog

Visual Workflow

25-May-2023 14:20:53 / by MST Admin

The main purpose of visual workflow is to automate complex business processes without any piece of code and to increase productivity. You can create a flow to navigate a user through a series of screens and provide branching based on input. You can also execute business flows and logic such as calculating complex formulae.

Elements of Visual Workflow
Elements are the building blocks of flows and each element represents an action such as collecting information from the flow user. You can just drag and drop these elements from the available palette tab and use it.

Below are few elements available in the flow:

vwf1.PNG

Fault can occur during the processing of flow and you can handle that exception using the Screen element. For example, when creating a new record using RecordCreate element (with missing required field), user will get a fault message (an unhandled fault message). Here, you can use Screen element to display the actual error message.

Resources
Resources are used to store and manipulate data and used throughout the flow. You can get those from the available Resource tab.

Below are few resources available in the flow:

vwf2.PNG

Use Case

Based on the user input (Email field), the flow will create a new case record, if the email id entered by the user is not existing in Salesforce cases; otherwise, it will create a sub case for that particular case.

In order to accomplish the above task, normally you need to write an APEX trigger and also a unit test class. Now, you can achieve this use case by simply using visual workflow without any piece of code.

Steps to create a workflow for the above user case
You can build the workflow for the above user case, using the elements Screen, Record Lookup , Record Create, and the Variable resource.

Below are the screenshots for the flow creation and steps for executing the above scenario.

vwf4.png
vwf5.png
vwf6.png
vwf7.png
vwf8.png

Conclusion
Salesforce Visual Workflow enables organizations to automate complex business processes, by eliminating the need for any type of custom coding in Salesforce and increasing the efficiency of organizations.

Topics: Salesforce

MST Admin

Written by MST Admin

Subscribe to Email Updates

Lists by Topic

see all

Posts by Topic

see all

Recent Posts