Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Salesforce Visual Workflow and Process Builder

You're reading from   Learning Salesforce Visual Workflow and Process Builder Flows and automation for enhanced business productivity

Arrow left icon
Product type Paperback
Published in May 2017
Publisher
ISBN-13 9781787284999
Length 448 pages
Edition 2nd Edition
Arrow right icon
Author (1):
Arrow left icon
Rakesh Gupta Rakesh Gupta
Author Profile Icon Rakesh Gupta
Rakesh Gupta
Arrow right icon
View More author details
Toc

Table of Contents (9) Chapters Close

Preface 1. Getting Started with Visual Workflow FREE CHAPTER 2. Creating Flow through Point and Click 3. Manipulating Records in Visual Workflow 4. Debugging and New Ways to Call a Flow 5. Developing Applications with Process Builder 6. Building Efficient and Performance Optimized Processes 7. Building Applications without Code 8. Enabling Flows to Work with Lightning Experience

An overview of the building blocks of Visual Workflow

Flow has three major building blocks known as Element, Connector, and Resource. With the help of these blocks, you can easily develop Flows.

The Element block represents an action that Flow can use to display or collect information from the Flow user, create or update records, delete records, or loop logic. The Element block is used to manipulate the data. The Connector block is used to establish the path between the elements. A Resource block is used to hold the data that you can reference in your Flow.

Flow elements

Flow elements represent actions that Flow can execute such as Record Update, Record Lookup, Fast Lookup, Loop, Screen, and Decision. This is used to read, write, or delete data. Using the element (Screen), you can also display data and capture input from users. Use the Palette tab to drag and drop new elements onto your canvas. Once you add elements, it will be available on the canvas and Explorer tabs.

There are several types of elements available under the Palette tab. They are as follows:

Flow element Description
Step You can use this as a placeholder while designing your Flow. Later, you can convert Step elements into Screen elements.
Screen This will display a screen to the user who is running the Flow. The Screen element contains input or output fields. The Screen element is mainly used to take input from users or display guided information.
Decision This is used to evaluate conditions to determine which Flow path to take.
Assignment This is used to set or change values of variables, collection variables, SObject variables, and SObject collection variables.
Loop This iterates through an SObject collection variable and assigns an item's value to an SObject variable.
Wait If you want your Flow to wait for one or more defined events to occur, then use this element.
Record Create This is used to create one record using the field values that you specify separately. You can assign these values from Flow resources such as variables, SObject variable, and the screen fields.
Record Update This is used to update records using the field values that you specify separately. You can assign these values from Flow resources such as variables, SObject Variable, and the screen fields.
Record Lookup This is used to extract one record that meets the filter criteria you specify, and then assign the record's field values to separate, individual Flow variables or individual fields on SObject variables.
Record Delete This is used to delete records from Salesforce that meet the filter criteria you specify in your Flow.
Fast Create This is used to create records using the fields' value from an SObject collection variable or to create one record using the field's value from an SObject variable.
Fast Update This is used to update records using the field's value from an SObject collection variable or to update one record using the field's value from an SObject variable.
Fast Lookup This is used to extract records to assign their field values to an SObject collection variable or query one record to assign its field values to an SObject variable.
Fast Delete This is used to delete records using the ID value from an SObject collection variable or to delete one record by using the ID value from an SObject variable.
Apex Plug-in This is used to call an Apex class that implements the Process.Plugin interface. If you used the tag property in the PluginDescribeResult class, the Apex class appears under a customized section. Otherwise, it appears under the APEX PLUG-INS section.
Subflow This is used to invoke another Flow in the organization.
Quick action This calls an object-specific or global action, such as NewTask and LogACall.
E-mail Alerts This is used to send an e-mail using a Workflow e-mail alert to specify e-mail template and recipients.
Post to Chatter Using this element, you can post a message to the feed for a specific record, user, or Chatter group.
Send Email This is used to send an e-mail using Flow with the specific subject, body, and recipients.
Submit for Approval This is used to auto submit one record for approval.

From Chapter 2, Creating Flow through Point and Click, we will start using these elements.

Flow resources

Resources are used to hold the data that you can refer in your Flow. The Explorer tab displays the resources that you added to the Flow. To create new resources, double-click on this tab. Global constants and system variables are automatically provided by the system. There are several types of resources available under the Resource tab. They are as follows:

Flow resource Description
Variable This is used to store a value that can be updated as the Flow is executed. It can be referenced throughout the Flow and can be used as the value of a field in a record.
Global variable These are system-provided variables that can be referenced as resources, such as an organization ID ({!$Organization.Id}) or running user ID ({!$User.Id}). Visual Workflow global variables are only available in flow formulae.
Collection variable This is used to store values with a single data type. You can use a collection variable as a container in the Flow to store and reference multiple values at once.
SObject Variable This is used to store a record for a specified object. Use an SObject variable as a container in the Flow to store, update, and reference field values for a record.
SObject Collection Variable This is used to store multiple records for a specified object. Use an SObject collection variable as a container in the Flow to store, update, and reference field values for multiple records.
Constant This is used to store a fixed value.
Formula This is used to calculate a value from other resources in the Flow.
Text templates This is used to store formatted text with merge fields that refer to resources.
Choice This represents an individual value that can be used in a variety of screen fields.
Dynamic record choice This looks up data from an object's record and dynamically generates a set of choices for screen fields at runtime. When referenced as a resource, a dynamic choice value is determined by the most recent user selection of a choice within the generated set. For example, display all contacts from an account if a user entered a valid account ID.
Element Any element that you add to the Flow is available as a resource with the visited operator in outcome criteria. An element is considered to be visited if the element has already been executed in the Flow interview.
Global constant This is used to store fixed system-provided values, such as EmptyString, true, and false, that can be assigned as the values of Flow resources.
Outcome For the Decision element you have added to the Flow, its outcomes are available as Boolean resources. If an outcome path has already been executed in the Flow interview, the resource's value is true.
Picklist values These are system-provided values that are available as resources only in Assignment and Decision elements when selecting values for or to compare against picklist fields in SObject variables and SObject collection variables.
Picklist Choice This is used to store picklist or multi-select picklist values, those are generated from standard or custom object picklist or multi-select picklist field.
Screen field This is the field that you add to the Flow is available as a resource.
System variable These are system-provided values that can be referenced as resources, such as {!$Flow.CurrentDate}, {!$Flow.CurrentDateTime}, and {!$Flow.FaultMessage}.
Wait element Wait element events are always available as Boolean resources. If an event's waiting conditions are met, the resource's value is true. If the event has no waiting conditions set, the resource's value is always true.

From Chapter 2, Creating Flow through Point and Click, we will start using these resources.

Flow connectors

A connector is used to establish the path between the Flow elements. A connector looks like an arrow that points from one element to another. There are several types of connectors available. They are as follows:

Label Sample Description
Unlabeled
This is used to identify which element to execute next.
Decision outcome name This is used to identify which element to execute when the criteria of a decision outcome are met.
Wait event name This is used to identify which element to execute when an event that's defined in a wait element occurs.
Fault This is used to identify which element to execute if the previous element results in an error.
Next element This is used to identify the first element to execute for each iteration of a loop element.
End of loop This is used to identify which element to execute after a loop element finishes iterating through a collection.

From Chapter 2, Creating Flow through Point and Click, we will start using these connectors.

You have been reading a chapter from
Learning Salesforce Visual Workflow and Process Builder - Second Edition
Published in: May 2017
Publisher:
ISBN-13: 9781787284999
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime