What are Flows?
In Salesforce, a flow is an application that automates complex business processes. Simply put, it collects data and then does something with that data. Flow Builder is the declarative interface used to build individual flows. Flow Builder can be used to build code-like logic without using a programming language.
Different types of flows :
The Salesforce Flow can be classified into five subtypes-
- Screen flows -: It can be called using a button or an action or displayed in a Lightning Page or the Utility Bar. It appears as a screen for the user to interact with. Screen flow cannot be automatically triggered.
- Schedule-triggered flows -: It runs automatically on a recurring schedule. It is helpful for jobs performed frequently or on a schedule (once, daily, weekly). It will run on the defined particular time on the particular Schedule (once, daily, weekly).
- Autolaunched flows -: These can be called Apex, Process Builder, or another Flow. They can perform actions automatically behind the scenes.
- Record-triggered flows -: It begins when a record is created or updated. Its functionality is similar to Process Builder. Record Triggers Flows calls when :
- Platform Event-triggered flow -: These are called when a platform event is received.
Type of Flows
Flow Building Blocks
Flows use three building blocks: elements, connectors, and resources.
- Elements are nodes on the canvas that makes things happen. To add an element to the canvas, click Add element.
- Connectors are lines on the canvas that define the path the flow takes when it runs. They tell the flow which element to execute next.
- Resources are containers that don’t appear on the canvas but are referenced by the flow’s elements. Each resource contains a value or a formula that resolves to a value. For example, your flow can search for an account’s ID, store that ID in a variable, and later use that variable to tell the flow which accounts to update.
Types of Elements -:
- Interaction – Flows can interact with users by presenting questions and information on a screen, or by sending various types of communications. The Screen element and the Action element make these interactions possible.
- Data – Data elements instruct the flow to interact with records in the Salesforce database. Use data elements to look up, create, update, and delete Salesforce records. You can work with one record at a time, or many records all at once.
- Logic – With logic elements, you can evaluate that data and manipulate it according to your business requirements.
Connectors -: Connectors define the path that the flow takes as it runs. They tell the flow which element to execute next. There are different types of connectors that tell the flow to take a different path in certain circumstances, but most of the time, the flow follows its connectors from one element to the next.
What Is a Variable?
In a flow, a variable is a container that holds a piece of information. Flow stores values in variables, but those values can be changed by the flow.
Why Do I Need Variables?
- In a screen flow, store the ID of the record that the flow is displayed on, so you can tell the flow which records to update at the end of the flow.
- Store a number value that can be higher or lower depending on user choices.
- Store the result of joining two text strings together.
- Retrieve record values to use in calculations, copy to another record, or display to a user.
- Assemble a collection of values that you can use to create a record.
- Make changes to every record that meets certain criteria.
- Delete every record that meets certain criteria.
- Keep a running tally of how many times a loop has run.
What Can I Store in a Variable?
- Text: A string of letters, numbers, and characters. If you just need to store a Salesforce ID, and not a whole record, use a text variable.
- Number, Currency: A numerical value. Don’t include any currency symbols, such as $ or €.
- Boolean: A true or false value. These variables can only contain the True, False, or Empty String global constants.
- Date, Date/Time: A specially formatted value that indicates a specific date, or a specific time on a specific date. See Valid Date and DataTimes Formats for info on how to format date and date/time data.
- Record: All of the values in a Salesforce record, are stored together in a single variable. Each value maintains its own data type, just like in a Salesforce record. The flow can retrieve or update each value individually.
Advantages of Flows -:
- Admin maintainability
- Built-In version control
- Custom components
- Collections variables
- User-friendly debugging
Disadvantages of Flows -:
- Learning curve (as a developer)
- Code is less complicated for some use cases
- Missing capabilities that code has:
- Maps
- Upserts
- Partial DML Operations
Please follow this module for Hands-On Experience.
11 Responses
Thanks a lot for sharing this with all of us you actually know what you are talking about! Bookmarked. Kindly also visit my site =). We could have a link exchange arrangement between us!
Great V I should definitely pronounce, impressed with your website. I had no trouble navigating through all tabs and related info ended up being truly simple to do to access. I recently found what I hoped for before you know it at all. Reasonably unusual. Is likely to appreciate it for those who add forums or something, website theme . a tones way for your customer to communicate. Nice task..
I?¦ve recently started a site, the info you provide on this website has helped me tremendously. Thank you for all of your time & work.
I’d should examine with you here. Which isn’t something I usually do! I take pleasure in reading a submit that may make individuals think. Additionally, thanks for permitting me to comment!
Hello there, just became alert to your blog through Google, and found that it’s really informative. I am gonna watch out for brussels. I will appreciate if you continue this in future. Numerous people will be benefited from your writing. Cheers!
Nice post. I was checking constantly this blog and I am impressed! Very useful information specifically the last part 🙂 I care for such info a lot. I was seeking this certain info for a long time. Thank you and good luck.
We’re a gaggle of volunteers and starting a new scheme in our community. Your site offered us with useful info to work on. You’ve performed an impressive task and our entire group can be grateful to you.
This is a very good tips especially to those new to blogosphere, brief and accurate information… Thanks for sharing this one. A must read article.
You got a very superb website, Gladiola I detected it through yahoo.
I reckon something genuinely interesting about your web site so I saved to bookmarks.
Good – I should certainly pronounce, impressed with your website. I had no trouble navigating through all the tabs and related information ended up being truly simple to do to access. I recently found what I hoped for before you know it at all. Quite unusual. Is likely to appreciate it for those who add forums or anything, web site theme . a tones way for your customer to communicate. Nice task..