What is Salesforce Lightning Flows?
One can automate complicated business procedures and tedious data input using lightning flows (also known as salesforce flows). Flows enable you to work smarter, ensuring that the required task and actions are completed correctly.
Salesforce Flows may be reached via the Setup menu. Flows may be reached via the Setup menu. You can create a new Flow by typing “Flows” into the Quick Find box.
Main Building Blocks of Salesforce Flow
Elements – The various components that make up the Flow are known as elements. These carry out logical operations like assignments, choices, or loops. There are data components as well that may commit record updates or query the database.
Connectors – Using connectors, you can tell which element links to another. Winter ’21 activates Auto-Layout and automatically joins the Elements.
Resources – Resources are the specific pieces of data that will be utilized in a flow; they might be collections, records, formulas, records of numbers, or strings of text.
These may be observed in action in Flow Canvas down below. The sample flow below shows a declarative alternative for a “before” trigger. In the ‘Start’ element at the top, You will notice that the trigger occurs whenever a record is generated or changed and needs to execute before the record is created.
How Many Types of Flows are there
Screen Flows: These flows have a UI element and require user input. These flows are launched as an action or embedded as an element on a Lightning page.
Schedule-Triggered Flows These autolaunched flows launch at a specified time and frequency for each batch record, running in the background.
Autolaunched Flows: Run automated tasks with this flow type. Autolaunched flows can be invoked from other flows (subflow), process builder, from within an Apex class, from a set schedule, record changes, or from platform events.\
Record-Triggered Flows: These autolaunched flows run in the background either before a record is saved or after the record is saved when a record is created, updated, or deleted.
Platform Event-Triggered Flows: When a platform event message is received, these autolaunched flows run in the background.
Why Should One Use A Flow?
Flow is an on-the-go tool if you want to create a new automated business process or user-guided experience, but it doesn’t need to be as sophisticated as Apex Code. When altering one created using Process Builder or workflow, there are many things to consider while considering whether to change an existing process or migrate it to Flow.
How to Create Flows in Salesforce
To create the flow, follow these steps:
Go to Setup -> Quick Find Box -> Search for “Flows” -> Click on Flows -> Then Click New Flow
It will open below screen
Any of the four flows can be created. The Autolaunched Flow we are constructing here will send an email to the chosen people once a lead is produced. To do that, we’re establishing a flow:
First, we will retrieve the record from any object utilizing any source of flow; to do this, we must first establish a new resource with the data type record:
ToolBox > Manage > New Source
Then you need to go to the elements tab:
Now create an Action Send Email:
Click Done >Run The Flow, and it is complete.
Do you require salesforce consulting? Hire qualified salesforce developers to help you reach your company’s objectives.
Related Post: How To Use Database.Stateful In Batch Apex In Salesforce