As we all know that Salesforce has introduced us to many automation tools which automate our business processes with Process Builder, Workflow, Approvals, and Flows. In Salesforce functionality, every tool comes with its own specification and features.
“Flow”, is one of the types of Automation tools in Salesforce.
Flow is a tool that automates complex business processes. Basically, it is the declarative interface used to create different types of flows.
Previously, we used the Process Builder to automate any business process but as the flow has defined its additional features so it supports mostly all same functions.
Let’s take a simple example of flows – Creating a new Lead with four field input form that we will later add to our Home page.
Quick Lead (build with Flow Builder)
- From Setup, enter Flows in the Quick Find box, then select Flows, and then click New Flow.
- From the Palette on the left, drag the Screen element to space on the right (the canvas).
- Give it a label as New Lead.
- Next, scroll the screen components on the left until you find Text.
- Drag four of the text fields to the middle panel.
- Now, Create fields for First Name, Last Name, Company, and Phone.
- Click on [Text] on each field and name them as shown.
- Click in the footer area and untick the Previous and Pause buttons then click Done.
- Next, drag the Create Records element to the canvas.
- We will use the values collected from that Screen element to create the new lead record. Drag the Record Create element onto the canvas. Enter Create Lead as the label then Select one record to create Select Use separate variables, resources and literal values to set the record fields and Select the Lead object.
- Next, populate the lead fields with the fields from the input form we created.
- Click Done when finished.
- Next, we need to join the three elements together. Click the circle at the bottom of the Start element and drag down to join to the New Lead screen. Do the same from New Lead to the Create Lead element.
- Finally, we can Save our new Quick Lead -1 flow. Click Save and Provide a name, description.
- Now, Click Save and Activate the flow.
- To be able to use this flow in Lightning, we have to Enable Lightning runtime for flows as follows.
- First, go Quick Find box – Process Automation – Process Automation Settings.
- Click Enable Lightning runtime for flows and Save your changes.
Add Your Flow to the Home Page
- Quick find – Builder – Lightning App Builder.
- Click New.
- Click Home Page, and click Next.
- Give the page a name as Quick Lead -1, and click Next.
- Click Clone Salesforce Default Page, select Home Page Default, and click Finish.
- Drag a Flow component to the top of the right column.
- Select your new Quick Lead flow.
- Save and Activate your new Home Page.
- Return to your App (ex. Sales) and refresh the page. Your new home page with the Quick Lead Flow component will be displayed.
Test your new flow by entering a new lead via the Flow you have just created.