Professional Documents
Culture Documents
names and marks. Other marks appearing herein may be trademarks of their respective owners.
Table of Contents
Table of Contents
Chapter 1: About Visual Workflow.......................................................................................................3
Chapter 2: About the Flow Designer.....................................................................................................4
What's Supported in the Cloud Flow Designer........................................................................................................................5
Understanding the Flow Designer User Interface.....................................................................................................................8
Creating a Flow.......................................................................................................................................................................10
About Saving a Flow...............................................................................................................................................................10
Table of Contents
Index.................................................................................................................................................79
ii
Chapter 1
About Visual Workflow
Available in: Enterprise, Unlimited, and Developer Editions
Visual Workflow allows administrators to build applications, known as flows, that step users through screens for collecting and
updating data. For example, you can use Visual Workflow to script calls for a customer support center or to generate real-time
quotes for a sales organization.
Visual Workflow has three different aspects: flow design, flow management, and runtime. As an administrator, you create the
flows using the Flow Designer, which has a drag-and-drop user interface that lets you diagram flow structure and configure
how it runs, without writing any code. Once you create a flow, you can manage it in Salesforce, edit its properties, activate,
deactivate, delete, or run it at will. Flow users can then run the activated flow from a custom button, tab, link, or directly from
the flow URL.
Chapter 2
About the Flow Designer
In this chapter ...
The Cloud Flow Designer is native to Salesforce. With it, you can create new
flows and manage their content directly from the flow list and detail pages.
The legacy desktop version of the Flow Designer is a standalone application
which you can download from the flow list page and install on your computer.
Flows created with this designer are saved as files which you then upload into
Salesforce. For more information about how the desktop Flow Designer
works, see the desktop Flow Designer user guide.
Important: You may install and use the legacy desktop version of the
Flow Designer for Visual Workflow (the Legacy Flow Designer)
during your subscription term. The Legacy Flow Designer software is
delivered along with the software programs listed in the Supplemental
Terms and Conditions for Salesforce Visual Workflow. Those software
programs are licensed to you under the license terms referenced in those
Supplemental Terms and Conditions and are not deemed part of the
Services for purposes of your Master Subscription Agreement.
System Requirements
To use the Cloud Flow Designer, we recommend:
Supported Elements
Elements
Desktop
Flow
Designer
Cloud Flow
Designer
Comments
Allocator
Y changed
Apex Plug-in
Choice
Y changed
Choice Lookup
Y not for
forms
Constant
Data Lookup
Data Source
Data Target
Data Update
Decision
Dynamic Choice
Flare
Y changed
Flow Summary
Form
Y changed
Formula
Lead Convert
Question
Y changed
Question/Choice Prompt Y
Y changed
Record Create
Known as Step in the Cloud Flow Designer. Not valid for active
flows.
Elements
Desktop
Flow
Designer
Cloud Flow
Designer
Comments
Record Lookup
Record Update
Record Delete
Resource
Y changed
Screen
Statement
Y changed
Step
Subflow
Text Template
Valuetable
Variable
Supported Functionality
Functionality
Desktop
Flow
Designer
Cloud Flow
Designer
Comments
Close
Convert
Y (limited)
Copy Element
Cut
Delete Element
Not in button bar, but mouse over element in the Cloud Flow
Designer and either click or press DELETE.
Dependencies for
Elements
Export flow
Flow Summary
Flow Spec
Functionality
Desktop
Flow
Designer
Cloud Flow
Designer
Grouping elements
Help
Open Recent
Paste
Procedure
New
Redo
Refresh
Run
Save/Save As
Select All
Send Email
Setting follow
highlightpath when
running
Setting Summary on
hover
SFDC settings
Undo
Validate
Comments
Desktop has a PDF. The Cloud Flow Designer has online help.
Functionality
Desktop
Flow
Designer
Cloud Flow
Designer
Comments
). You
Note: When you copy and paste an element, the new copy has the unique name of the original, appended with
_x, where x is a number. The first copy of an element has _0 appended to its unique name, and the number
increments from there with subsequent copies of the same element.
Flow Properties (
)
Shows you information about your flow, such as its name, unique name, description, version, and created and modified
dates. You can edit the name and description of your flow any time, but you can only change its unique name when
saving it for the first time.
Creating a Flow
Creating a Flow
User Permissions Needed
To open, edit, or create a flow in the Cloud Flow Designer
To create a flow in the Cloud Flow Designer, go to Your Name > Setup > Create > Workflow & Approvals > Flows and
click New Flow.
Have a draft flow in mind before you start creating your flow in the Cloud Flow Designer.
If you're not sure what kind of element you need for a node in your flow, use a Step element as a placeholder until you
figure it out. You can always replace it later.
If you need to delete a group of elements and connectors, you can left-click and drag to select an area containing them.
Then press DELETE to remove all of them at once.
If you're new to the Cloud Flow Designer, we recommend walking through one or more of the sample flow tutorials in the
Visual Workflow Implementation Guide. They're a great way to introduce yourself to the tool and discover how things work.
10
Initial saveWhen you save a new flow for the first time, a dialog box appears. Enter a flow name, unique name and
description. Once you save the flow, the unique name can't be changed.
Note: A unique name is limited to underscores and alphanumeric characters. It must be unique, begin with a
letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.
Quick saveAfter you've saved a flow once, the Save button works as a quick-save, overwriting your previous work.
However, the Save button doesnt work when editing active flows. You must use Save As to save your changes as a new
version or new flow.
Save AsOnce you've saved your flow for the first time, this button is enabled, with two options:
Save as new flow opens a dialog box where you can input a new name, unique name and description, then save your
changes as an entirely new flow.
Save as new version saves the flow you're working on as a new version of the current flow. This is a useful option if
you want to make changes to a flow and keep the old configuration as a backup in case you need to refer back to it later.
Each flow can have up to 10 versions. You can update the flow name and description when you save a new version, but
not the unique name.
If you have the flow detail page open in one browser tab, then open a flow version in a new browser tab to edit it, after
saving and closing it, you must refresh the first flow detail page before you can successfully run the flow version you just
edited.
If you've changed the flow properties and for some reason the save fails, the flow properties don't revert to the previous
values.
11
Chapter 3
Flow Designer Elements
In this chapter ...
Elements are the building blocks of flows. Each element represents an action,
such as presenting information to, or collecting information from, flow users, or
even querying, creating, updating, and deleting information in Salesforce. By
connecting elements together in the Flow Designer, you can create a flow, which
is a series of screens, inputs, and outputs through which users navigate.
The following elements are available in the Cloud Flow Designer:
Step
Screen
Decision
Assignment
Record Create
Record Update
Record Lookup
Record Delete
Subflows
Apex Plug-In
Connector
Note: Every time you add an element or resource to a flow, it's also
added to the Explorer Tab.
12
Use the Step element as a placeholder when you're not sure what kind of element you need. Using Step elements, you can
sketch out a draft of any new flow or make conceptual changes to an existing flow.
To add or edit a Step element in the Flow Designer:
1.
2.
3.
4.
5.
Go to Your Name > Setup > Create > Workflow & Approvals > Flows and open a new or existing flow.
From the Palette, drag the Step element into the main area of the canvas.
Enter a name for the Step.
If you havent already added a description, click Add Description to do so.
Click OK to accept your changes or Cancel to discard them.
Steps aren't valid elements for active flows. You can have a draft flow with Steps in it and can run it in the draft state as an
administrator, but you must replace the Steps with other elements before you can activate the flow and let users run it.
Upon conversion, a Step's incoming connectors are preserved, but any outgoing connectors assigned to it are deleted.
After conversion, you can no longer use the Step's original unique name.
13
The Screen element can be used to set up a form to capture user input, provide choice selections, and display information to
your users. It combines functionality from several different elements in the desktop Flow Designer, such as Form, Statement,
Choice, and Question.
1.
2.
3.
4.
Go to Your Name > Setup > Create > Workflow & Approvals > Flows and open a new or existing flow.
From the Palette tab, drag the Screen element onto the canvas.
Set up your Screen by configuring fields on the General Info, Add a Field, and Field Settings tabs.
Click OK to accept your changes or Cancel to discard them.
Note: Every time you add an element or resource to a flow, it's also added to the Explorer Tab.
As you progress through the Screen overlay, you can see a preview of what you're building in the right pane.
The Screen element overlay in the Flow Designer has three tabs: General Info, Add a Field, and Field Settings. To configure
the General Info tab:
1. Enter a Screen Name, then press TAB. The Unique Name field should auto-populate.
2. You can enter a different unique name for the screen.
Note: The requirement for uniqueness applies only to elements within the current flow. You can have two elements
with the same unique name, provided they are used in different flows. A unique name is limited to underscores
and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore,
and not contain two consecutive underscores.
3. If you havent already added a description, click Add Description to do so.
4. To provide flow users with help for the screen:
a. Click the arrow to expand the Help Text section.
b. Enter the text that you want flow users to see when they click Help for this form.
c. Click to switch between the plain text editor and the rich text editor.
If you use the rich text editor, the content is saved as HTML.
14
Inputs
Textbox
Long Text Area
Number
Currency
Date
Password
Choices
Radio Buttons
Drop-down List
Outputs
Display Text
Add an input, output, or choice field to a Screen either by double-clicking or dragging it to the preview pane. Remove a field
from the Screen overlay by hovering over it and clicking
them up and down.
The Screen element overlay in the Flow Designer has three tabs: General Info, Add a Field, and Field Settings.
On the Field Settings tab, configure the field you've added to the form by clicking it in the right-hand preview pane of the
overlay. The options available on the Field Settings tab vary based on which type of field you're configuring.
15
Configuring User Input Fields on the Screen Element's Field Settings Tab
Configuring User Input Fields on the Screen Element's Field Settings Tab
User Permissions Needed
To open, edit, or create a flow in the Cloud Flow Designer
The Screen element overlay in the Flow Designer has three tabs: General Info, Add a Field, and Field Settings.
On the Field Settings tab, configure the field you've added to the form by clicking it in the right-hand preview pane of the
overlay. The options available on the Field Settings tab vary based on which type of field you're configuring. Heres how to
set up user input fields on a Screen overlay, including textbox, long text area, number, currency, date, and password.
1. In the Screen overlays preview pane, click an input field to configure its settings.
2. In the General Info section, enter a Label to display text to the left of the field.
3. If you want to use the rich text editor to format your field label, click the rich text editor icon ( ) to the right of the Label
field.
a. Once youre done editing the text, click OK. The Label field display changes to indicate that it is now a rich text field.
If the formula statement evaluates to TRUE, the input is valid. If the formula statement evaluates to FALSE, the
error message is displayed to the user.
If the user leaves the field blank, and the field is not required, no validation is performed.
16
The Screen element overlay in the Flow Designer has three tabs: General Info, Add a Field, and Field Settings.
On the Field Settings tab, configure the field you've added to the form by clicking it in the right-hand preview pane of the
overlay. The options available on the Field Settings tab vary based on which type of field you're configuring. Heres how to
set up choice fields on a Screen overlay, including radio buttons and drop-down lists.
1. In the Screen overlays preview pane, click a choice type field to configure its settings.
2. In the General Info section, enter a Label to display text to the left of the field.
3. If you want to use the rich text editor to format your field label, click the rich text editor icon ( ) to the right of the Label
field.
a. Once youre done editing the text, click OK. The Label field display changes to indicate that it is now a rich text field.
17
c. To create a new dynamic choice, select CREATE NEW > Dynamic Choice. Use a dynamic choice to create a lookup
to automatically populate the choice options during runtime. See Adding and Configuring a Dynamic Choice on page
39.
d. Click Add Choice to add another choice option.
e. Click
to remove a choice.
Note: Once created, the only way you can edit a choice or dynamic choice is by double-clicking it from the Explorer
tab.
9. To provide flow users with help for the field:
a. Click the arrow to expand the Help Text section.
b. Enter the text that you want flow users to see when they click next to the field.
c. Click to switch between the plain text editor and the rich text editor.
If you use the rich text editor, the content is saved as HTML.
10. Click OK.
Note: You can't rearrange choice list items.
The Screen element overlay in the Flow Designer has three tabs: General Info, Add a Field, and Field Settings.
On the Field Settings tab, configure the field you've added to the form by clicking it in the right-hand preview pane of the
overlay. The options available on the Field Settings tab vary based on which type of field you're configuring. Heres how to
set up a Display Text field on a Screen overlay.
1. In the Screen overlays preview pane, click the Display Text field to configure its settings.
2. Enter a Unique Name. A unique name is limited to underscores and alphanumeric characters. It must be unique, begin
with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.
3. Enter the text you want to display to the flow user. For example, you could use a display text field to show flow users a
welcome message, a terms and conditions statement, or a description of a product or service.
Click to switch between the plain text editor and the rich text editor. If you use the rich text editor, the content is saved
as HTML.
4. Click OK.
18
Use the Decision element to evaluate a set of conditions and route users through the flow based on the outcomes of those
conditions.
You can use a Decision element to drive your flow without explicit end-user input. For example:
In a customer self-help portal, a Decision element could determine whether a customer is given a return shipping address
and information (because an item is definitely faulty), or given information on how to resolve their problem themselves.
Within a banking flow, a Decision element could determine if a customer should be offered a loan or not (based on results
of a credit scoring formula).
Tip: If you ask a user to make a choice in a screen with a drop-down list or radio buttons, hook up a Decision element
directly after the Screen element to create the branches of the flow based on the choices. You should represent each
drop-down list or radio button option in your Decision element and connect it to a branch of your flow.
was selectedAvailable only for choices. Lets you track whether a specific choice on a screen was selected
by the user. To learn more about how was selected works, see Visual Workflow Considerations on page
55.
was visitedAvailable for any main canvas element. Lets you track whether an element in the flow was
visited by the user.
Selecting either of these operators makes the Value of the condition statement Boolean. You can then set the
Value to true or false by clicking the arrow button, expanding the GLOBAL CONSTANT section, and
selecting either $GlobalConstant.True or $GlobalConstant.False. For more information, see About
Global Constants in the Cloud Flow Designer on page 41.
19
c. Click Add Condition to add another condition or click to remove a condition. At runtime, the conditions are
evaluated in the order you specify.
d. Choose under which conditions the outcome evaluates to true:
All conditions must be true (AND)The outcome will evaluate to true overall if all the conditions you specified
evaluate to true.
One condition must be true (OR)The outcome will evaluate to true overall if at least one of the conditions
you specified evaluates to true.
6. Click Add Outcome to add more outcomes. You can drag outcomes up and down to reorder them.
7. Click [Default Outcome] to set up a path to which users will be routed if none of the other outcome conditions are met.
8. Click OK to accept your changes or Cancel to discard them.
When youre done setting up your outcomes, you can then draw connectors from your Decision element to other elements on
the canvas and assign an outcome to each connector.
Use a Record Lookup element to find a Salesforce record and store the values from its fields into your flow. For example, you
could use a Record Lookup element to:
Input (or read) a bar code from a product tag and use the code to read data from the database to find out the product name
or description.
Look up item details to check for stock availability.
Look up a customer record to verify a caller's identity.
Description
Name
Unique Name
The requirement for uniqueness applies only to elements within the current flow. You can
have two elements with the same unique name, provided they are used in different flows.
A unique name is limited to underscores and alphanumeric characters. It must be unique,
begin with a letter, not include spaces, not end with an underscore, and not contain two
consecutive underscores.
Description
20
to remove a row.
Column Header
Description
Field
Operator
The available filter operators depend on the data type selected for the Field and Value.
Value
The Field and Value in the same row must have the same data type.
Options:
Make sure your filter criteria sufficiently narrows the search. The Record Lookup element ultimately returns only the first
record from the filtered results, which arent retrieved from the database in any particular order.
6. To sort the filtered results before the first record is selected:
a. Select Sort results by.
b. Select the field to sort by. Only sortable fields appear in the drop-down list.
c. Select the sort order, either ascending or descending.
7. Assign the values of fields in the returned record to variables in the flow.
Click Add Row to enter more field assignments. Click
to remove a row.
Column Header
Description
Field
Variable
Select an existing flow variable, or select CREATE NEW to create a new variable.
8. Click OK.
Note: If the record lookup fails for some reason, the fault connector path will be taken if youve defined one.
See Also:
About the Fault Connector
Flow Designer Elements
21
Use the Record Create element to create a new record in Salesforce using values from your flow. For example, you could
capture the name and address that a user enters into the flow, use the Record Lookup element to see if they exist in Salesforce,
and if they don't, use the Record Create element to create a new record for that user.
1. Go to Your Name > Setup > Create > Workflow & Approvals > Flows and open a new or existing flow.
2. From the Palette, drag the Record Create element onto the canvas.
3. Enter a Name and Unique Name for the element.
Note: The requirement for uniqueness applies only to elements within the current flow. You can have two elements
with the same unique name, provided they are used in different flows. A unique name is limited to underscores
and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore,
and not contain two consecutive underscores.
4. If you havent already added a description, click Add Description to do so.
5. Select the object for which you want to create a record.
6. Select the field or fields from the object that you want to populate, then assign a value or resource to the field. The data
types must match.
In the Value column, you can manually enter literal or merge field values. You can also select pre-defined flow values
(from variables, constants or user inputs, for example). Use the CREATE NEW section of the drop-down list to create
new resources, if necessary. When entering a date value, you must use the MM/DD/YYYY format.
7. Click Add Row to set the value of another field.
8. Click to remove a line.
9. Optionally, assign the new record's ID to a variable so you can use it or refer to it later in the flow. The variable you choose
must be of type text. If you havent created the variable yet, you can do that by expanding the CREATE NEW section
of the drop-down list.
10. Click OK to accept your changes or Cancel to discard them.
Important: Check your object definition to ensure that all required fields are populated with values; otherwise the
record create will fail at runtime. If the record create does fail, the fault connector path will be taken if youve defined
one.
See Also:
About the Fault Connector
Flow Designer Elements
22
Use a Record Update element to update a set of records in Salesforce with variable, constant, input, or other values from your
flow. You can update a single record, or multiple records, depending on how you set your filter criteria.
If you're using flows in a call center, for example, you can use a Record Update element to automatically update Salesforce
with data collected from callers, such as new addresses, phone numbers, or product preferences.
1. Go to Your Name > Setup > Create > Workflow & Approvals > Flows and open a new or existing flow.
2. From the Palette, drag the Record Update element onto the canvas.
3. Enter a Name and Unique Name for the element.
Note: The requirement for uniqueness applies only to elements within the current flow. You can have two elements
with the same unique name, provided they are used in different flows. A unique name is limited to underscores
and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore,
and not contain two consecutive underscores.
4. If you havent already added a description, click Add Description to do so.
5. Select the object for which you want to update a record.
6. Set criteria to select which records get updated. The data types of the values in the Field and Value columns must match.
In the Value column, you can manually enter literal or merge field values. You can also select pre-defined flow values
(from variables, constants or user inputs, for example). Use the CREATE NEW section of the drop-down list to create
new resources, if necessary. When entering a date value, you must use the MM/DD/YYYY format.
Important: You must configure at least one filter, or you will update all the records for the object.
to remove a field.
23
Note: If the record update fails for some reason, the fault connector path will be taken if youve defined one.
See Also:
About the Fault Connector
Flow Designer Elements
Use a Record Delete element to delete records in Salesforce. You can delete a single record or multiple records, depending on
how you set your filter criteria.
1. Go to Your Name > Setup > Create > Workflow & Approvals > Flows and open a new or existing flow.
2. From the Palette, drag the Record Delete element onto the canvas.
3. Enter a Name and Unique Name for the element.
Note: The requirement for uniqueness applies only to elements within the current flow. You can have two elements
with the same unique name, provided they are used in different flows. A unique name is limited to underscores
and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore,
and not contain two consecutive underscores.
4. If you havent already added a description, click Add Description to do so.
5. Select the object whose records you want to delete.
6. Add rows of filter criteria to determine which records will be deleted. You must configure at least one filter.
In the Value column, you can manually enter literal or merge field values. You can also select pre-defined flow values
(from variables, constants or user inputs, for example). Use the CREATE NEW section of the drop-down list to create
new resources, if necessary. When entering a date value, you must use the MM/DD/YYYY format.
7. Click Add Row to add another filter.
8. Click to remove a line.
9. Click OK to accept your changes or Cancel to discard them.
Caution: Things to note when using a Record Delete element:
Be careful when testing flows that contain Record Delete elements. Even if the flow is inactive, running it will
trigger the delete operation.
To prevent deleting records by mistake, be as specific in your filter criteria as possible.
Records are deleted from your organization the moment the flow executes the Record Delete element.
Deleted records are sent to the Recycle Bin and remain there for 15 days before they are permanently deleted.
24
About Subflows
Note: If the record delete fails for some reason, the fault connector path will be taken if youve defined one.
See Also:
About the Fault Connector
Flow Designer Elements
About Subflows
Reduce the complexity of your flow by reusing other flows.
A subflow element references another flow and calls that flow at runtime. When a flow contains a subflow element, we call it
the master flow to distinguish it from the referenced flow.
With subflows, you can simplify your overall flow architecture. Build reusable flows to perform common tasks. For example,
you can build reusable flows to capture address and credit card information, and authorize a credit card purchase amount.
Then you can have multiple product-ordering flows call the reusable flows as needed.
At runtime, the master flow calls the active version of each referenced flow by default. If a referenced flow has no active version,
then the master flow calls the latest version of the referenced flow. To run only the latest version of each referenced flow, use
one of the following methods:
Open the master flow in the Cloud Flow Designer, and click Run with Latest in the button bar.
Run the master flow from the flow URL appended with ?latestSub=true.
Note: Only flow administrators can run inactive flows. For other users, the flow will fail at runtime if a subflow
element tries to call a flow with no active version.
The Palette lists the other flows in your organization. If you select a flow in the Palette, the following information appears in
the Description pane:
25
A subflow element references another flow and calls that flow at runtime. When a flow contains a subflow element, we call it
the master flow to distinguish it from the referenced flow. Use subflow input and output assignments to transfer data between
the master flow and the referenced flow.
1. Click Your Name > Setup > Create > Workflow & Approvals > Flows and open a new or existing flow.
2. From the Palette, drag the flow that you want to call onto the canvas.
3. Enter the general settings for the subflow element.
Field
Description
Name
Unique Name
The requirement for uniqueness applies only to elements within the current flow. You can have
two elements with the same unique name, provided they are used in different flows. A unique
name is limited to underscores and alphanumeric characters. It must be unique, begin with a
letter, not include spaces, not end with an underscore, and not contain two consecutive
underscores.
Description
to remove a row.
Column
Header
Description
Target
Source
5. On the Outputs tab, assign values from the referenced flows variables to the master flows variables.
These variable assignments occur when the referenced flow finishes running.
Click Add Row to enter more variable assignments. Click
to remove a row.
26
Column
Header
Description
Source
Referenced flows variable whose value you want to assign to the target.
By default, the subflow overlays drop-down lists for selecting the referenced flows variables are populated
with the variables of the currently active version of the referenced flow. If the referenced flow has no
active version, the drop-down lists are populated with the variables of the latest version of the referenced
flow. You can, however, view or select from the inputs and outputs of other versions of the referenced
flow.
Target
6. Click OK.
Description
The Inputs and Outputs tabs display the variables in the selected version
of the referenced flow.
Click OK.
The subflow overlays drop-down lists for selecting the referenced flows
variables are populated with the variables of the selected Version of the
referenced flow.
27
When you configure subflow input and output assignments, you can specify variables from any version of the referenced flow.
This enables you to develop both the master flow and referenced flow in parallel, while keeping another version of the referenced
flow active for its users. When you save the master flow, however, the subflow validations are performed only against the
currently active versionor if there is no active version, then against the latest versionof the referenced flow. You may see
informational validation messages about the variables that couldnt be found or that were configured differently in the referenced
flow, but those messages wont block you from saving the flow. Nevertheless, be sure to resolve all validation errors before you
activate the master flow.
The Apex Plug-in element represents a piece of Apex code that you can include in a flow. It lets you call an Apex class with
the Process.Plugin interface and pass data between your organization and a flow.
When you open it, the Cloud Flow Designer discovers any Process.Plugin classes you created and displays them as elements
on the Palette. Select a plug-in on the Palette to view its tag, class name, inputs, and outputs in the Description pane. Required
inputs are listed with an asterisk (*).
Important: Before you can use an Apex Plug-in element in a flow, you must first write the Apex class that implements
the interface. Be sure your describe method is implemented correctly so the Flow Designer can pull the input and
output information. For more information about how to do that, see Using the Process.Plugin Interface in the
Force.com Apex Code Developer's Guide
To add or configure an Apex Plug-in element:
1. Go to Your Name > Setup > Create > Workflow & Approvals > Flows and open a new or existing flow.
2. From the Palette, drag an Apex Plug-in element onto the canvas. The class name and plug-in description are taken from
the plug-in code.
3. Enter a name for your new plug-in element.
4. If necessary, enter a different unique name.
Note: The requirement for uniqueness applies only to elements within the current flow. You can have two elements
with the same unique name, provided they are used in different flows. A unique name is limited to underscores
and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore,
and not contain two consecutive underscores.
5. If you havent already added a description, click Add Description to do so.
6. On the Inputs tab, assign values to the Apex parameters.
Required parameters are automatically listed as targets. Click Add Row to set an optional parameter. Click
a row.
Column Header
Description
Target
to remove
28
Column Header
Description
Source
7. On the Outputs tab, assign values from Apex parameters to variables in the flow.
Click Add Row to enter more output assignments. Click
to remove a row.
Column Header
Description
Source
Target
Select an existing flow variable, or select CREATE NEW to create a new variable.
8. Click OK.
Note: If the Apex plug-in fails for some reason, the fault connector path will be taken if youve defined one.
See Also:
About Apex Plug-ins in Flows
About the Fault Connector
Flow Designer Elements
Add a tag string to your Apex plug-in to group your plug-ins in the Flow Designer Palette. If you don't add a tag string
to a plug-in, it shows up at the root level of the Apex Plug-ins section.
Apex primitive data types Blob and Time aren't supported for flow plug-ins.
If you don't provide a name for your plug-in, it displays in the Palette using the class name.
If you make code changes to an Apex plug-in while the Cloud Flow Designer is open, you won't see the changes in the
plug-in elements until you close and re-open the Designer.
29
Use the Assignment element to make changes to the value of a variable. For example, you could dynamically change the value
of a customer's credit score depending on how they answer certain questions in the flow.
1. Go to Your Name > Setup > Create > Workflow & Approvals > Flows and open a new or existing flow.
2. From the Palette, drag the Assignment element onto the canvas.
3. Enter a Name and Unique Name for the element.
Note: The requirement for uniqueness applies only to elements within the current flow. You can have two elements
with the same unique name, provided they are used in different flows. A unique name is limited to underscores
and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore,
and not contain two consecutive underscores.
4. If you havent already added a description, click Add Description to do so.
5. In the Assignments section, select the variable you want to change. If you havent created the variable yet, you can do that
by expanding the CREATE NEW section of the drop-down list.
6. Select an operator.
7. Enter a value or select an element to adjust the variable you selected. Use the CREATE NEW section of the drop-down
list to create new resources, if necessary.
Note: When you add or subtract a number from a date value, the date adjusts in days, not hours.
8. Click Add Assignment to add another line. Click and drag assignment line items to reorder them.
9. Click to remove a line.
10. Click OK to accept your changes or Cancel to discard them.
Note: Every time you add an element or resource to a flow, it's also added to the Explorer Tab.
30
Tip:
When you select a connector, its color changes from black to red.
You may find it easier to select a connector by clicking and dragging an area on the canvas that includes both ends
of the connector.
When you click and drag an element around the canvas, each end of the connector stays stuck to its element and stretches
to accommodate the new element position. If you move the element into a new position in the flow, you must manually
adjust any connections and outcomes.
Deleting a connector doesn't delete the outcome associated with it, but deleting an element's outcome does delete the
associated connector.
Only Decisions, Steps and data elements can have more than one outgoing connector.
Some elements also support an outgoing fault connector.
The source and destination elements for a connector can't be the same.
See Also:
About the Fault Connector
Flow Designer Elements
Apex Plug-In
Record Create
Record Update
Record Lookup
Record Delete
By default, if executing one of these elements results in an error, the flow displays a generic error message to the flow user.
Also, the user cant proceed with the flow. Use fault connectors to gracefully handle such errors. For example:
Suppose an Apex plug-in element calls an external Web service to validate user-entered addresses. If the Web service call
fails for any reason, the flow can proceed along the fault connector to a screen where the user can verify the entered address,
make any corrections, and proceed with the flow.
If the flow is used only internally, for example by call center users, each fault connectors target screen can display a system
fault message that flow users can give to the IT department. For example, you can set up a Display Text field on the screen
as follows:
Sorry, but you cant update records at this time.
Please open a case with IT, and include the following error message:
{!$Flow.FaultMessage}
31
You can ignore the errors completely, and have the flow proceed along the normal path. To do this, add a fault connector
on top of the connector element.
Add and delete a fault connector just as you would add and delete a connector element, only you need to add the connector
element first. The connector element properties and expected behavior also apply to fault connectors.
See Also:
About the Connector Element
Flow Designer Elements
32
Chapter 4
Flow Designer Resources
In this chapter ...
Constant
Variable
Formula
Text Template
Choice
Dynamic Choice
Global Constants
Though they dont appear on the Resources tab, global constants are
considered to be resources. Global constants have fixed values, while the other
resources can be created and customized as needed.
Note: Every time you add an element or resource to a flow, it's also
added to the Explorer Tab.
33
In order to assign constants to your flow using the Assignment element, you first need to create them. The Constant resource
allows you to a define a fixed value that can be used throughout your flow. Every time you create a new constant, it is added
to the Explorer tab by its unique name.
1. Go to Your Name > Setup > Create > Workflow & Approvals > Flows and open a new or existing flow.
2. From the Resources tab, double-click Constant.
3. Enter a Unique Name for the constant.
Note: The requirement for uniqueness applies only to elements within the current flow. You can have two elements
with the same unique name, provided they are used in different flows. A unique name is limited to underscores
and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore,
and not contain two consecutive underscores.
4.
5.
6.
7.
Enter a description.
Set the Data Type for the constant.
Enter a value for the constant. When entering a date value, you must use the MM/DD/YYYY format.
Click OK to accept your changes or Cancel to discard them.
In order to assign variables to your flow using the Assignment element, you have to first create them. The Variable resource
allows you to create updatable values to use in your flow. Every time you create a new variable, an item representing that
variable is added to the Explorer tab.
1. Go to Your Name > Setup > Create > Workflow & Approvals > Flows and open a new or existing flow.
2. From the Resources tab, double-click Variable.
3. Fill out the fields.
Field
Description
Unique Name
The requirement for uniqueness applies only to elements within the current flow. You can
have two elements with the same unique name, provided they are used in different flows.
A unique name is limited to underscores and alphanumeric characters. It must be unique,
34
begin with a letter, not include spaces, not end with an underscore, and not contain two
consecutive underscores.
Description
Helps you determine when to assign or use this variable as you set up your flows.
The description appears in the Description pane when the variable is selected in the Explorer
tab. Depending on the Input/Output Type, the variables description may be viewed
from another flows subflow element.
Data Type
Scale
Input/Output Type
Private for a variable created in Summer 12 and later or in API version 25.0 and later.
Input and Output for a variable created in Spring 12 and earlier or in API version
24.0.
Caution: Disabling input or output access for an existing variable may impact the
functionality of applications and pages that call the flow and access the variable via
URL parameters, Visualforce controllers, and subflows.
Default Value
Enter a default value for the variable, or use the drop-down list to assign the value of a flow
resource as the default. Use the CREATE NEW section of the drop-down list to create
new resources, if necessary. If you leave this field blank, the variable value is set to null.
When entering a date value, you must use the MM/DD/YYYY format.
35
Use the Formula resource to calculate a value using numeric elements in your flow. Every time you create a new formula, its
added to the Explorer tab by its unique name.
1. Go to Your Name > Setup > Create > Workflow & Approvals > Flows and open a new or existing flow.
2. From the Resources tab, double-click Formula.
3. Enter a Unique Name for the formula.
Note: The requirement for uniqueness applies only to elements within the current flow. You can have two elements
with the same unique name, provided they are used in different flows.A unique name is limited to underscores and
alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore,
and not contain two consecutive underscores.
4. Enter a description.
5. If needed, set the Scale for the formula. The scale is the maximum number of digits allowed to the right of the decimal
point. This number can't exceed 17. If you leave this field blank or set to zero, only whole numbers are displayed when
your flow runs.
6. Enter your formula. Use the arrowhead to select resources from your flow. Use the CREATE NEW section of the
drop-down list to create new resources, if necessary. See the Formulas Quick Reference Guide for a complete list of formula
operators and functions supported in Salesforce.
Note: Some formula operators are not supported in the Cloud Flow Designer and will result in your formula
returning a null value. See About Formulas in Flows for the complete list.
7. Click OK to accept your changes or Cancel to discard them.
In a Formula resource
In a Screen element, specifically to validate user input for a field
You can use pure text functions in your formula, but the formula output must be numeric. Any formula that doesn't resolve
to a number or that contains an unsupported function returns null.
If you display the result of an invalid formula to a user using a Display Text element, the formula result is displayed as an
empty string and the user sees nothing.
You can't activate a flow that contains an invalid formula.
36
GETRECORDIDS
IMAGE
INCLUDE
INCLUDES
ISCHANGED
ISNEW
ISPICKVAL
PARENTGROUPVAL
PREVGROUPVAL
PRIORVALUE
REQUIRE SCRIPT
VLOOKUP
To learn more about how formulas work in Salesforce, see About Formulas in the online help.
Use the Text Template resource to create text to use in your flow. For example, if you have a flow that registers people for an
event, you could create a text template that includes a registrant's name, address, and other information, then use the template
in an email confirmation sent out when the flow finishes. Every time you create a new text template, it is added to the Explorer
tab by its unique name.
1. Go to Your Name > Setup > Create > Workflow & Approvals > Flows and open a new or existing flow.
2. From the Resources tab, double-click Text Template.
3. Enter a Unique Name.
37
Note: The requirement for uniqueness applies only to elements within the current flow. You can have two elements
with the same unique name, provided they are used in different flows.A unique name is limited to underscores and
alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore,
and not contain two consecutive underscores.
4. Enter a description.
5. In the text box, type the text for your template. Use the Select resource drop-down to insert content from your flow
(variables, constants, user input, and so on), or type it manually. Use the CREATE NEW section of the drop-down list
to create new resources, if necessary.
Click to switch between the plain text editor and the rich text editor. If you use the rich text editor, the content is saved
as HTML.
6. Click OK.
A Choice resource is a standalone choice option that you can reference or reuse throughout your flow. For example, if you
have a flow asking users to choose a particular service level, you could create separate choice options for Gold, Silver, and
Bronze. Each one becomes a unique choice resource on the Explorer tab. You could then set up a Screen later on in the flow
with a display text field that includes the choice resource with a description of the features included.
You can create a choice resource in two ways:
38
If the formula statement evaluates to TRUE, the input is valid. If the formula statement evaluates to FALSE,
the error message is displayed to the user.
If the user leaves the field blank, and the field is not required, no validation is performed.
8. Click OK.
After you create a choice, it shows up on the Explorer tab, where you can edit it as needed.
A dynamic choice looks up data from an objects records and dynamically generates a set of choices at runtime. Throughout
your flow, you can reuse a Dynamic Choice resource for choice fields, and you can reference the stored value of a Dynamic
Choice resource. The stored value is determined by the most recent user selection of a choice within the generated set.
As an example, let's say you're setting up a flow for all employees of Acme Inc. and need them to identify which Acme division
they work in. Instead of manually entering each division name as a separate radio button, you could set up the dynamic choice
to look up all instances where Acme appears in the division name. Then, when the employees step through the flow, they
can select from a dynamically generated list of all division names containing Acme.
1. Go to Your Name > Setup > Create > Workflow & Approvals > Flows and open a new or existing flow.
2. Create a dynamic choice using one of the following methods:
39
From any resource-selecting drop-down list, select CREATE NEW > Dynamic Choice.
Description
Unique Name
The requirement for uniqueness applies only to elements within the current flow. You can
have two elements with the same unique name, provided they are used in different flows.
A unique name is limited to underscores and alphanumeric characters. It must be unique,
begin with a letter, not include spaces, not end with an underscore, and not contain two
consecutive underscores.
Description
4. Select the object whose records contain the data for the generated choices.
5. Specify the filter criteria for retrieving records from the database.
Click Add Row to enter more filters. Click
to remove a row.
Column Header
Description
Field
Operator
The available filter operators depend on the data type selected for the Field and Value.
Value
The Field and Value in the same row must have the same data type.
Options:
If you remove all filter rows, all records of the selected object are retrieved and a choice is generated for each record.
6. Select the records fields whose values you want to use in the generated choices.
Field
Description
Choice Label
Records field whose value is stored when the user selects this choice at runtime.
The available options depend on the Value Data Type of the Dynamic Choice resource.
If you dont fill out this field, the stored value is set to null.
40
For example, let's say you're setting up a support flow for a computer hardware manufacturer, and you want to let users
identify a product to find its latest drivers. You could set up a dynamic choice that displays all products whose product ID
starts with a specific string of characters. However, since the flow users are more likely to know the product's name than
its ID, you would select a field containing the product name for the Choice Label.
7. To sort the generated choices:
a. Select Sort results by.
b. Select the records field to sort by. Only sortable fields appear in the drop-down list.
c. Select the sort order, either ascending or descending.
8. To limit the number of generated choices:
a. Select Limit number of choices to.
b. Enter the maximum number of choices (up to 200) to include in the generated set.
9. Set up field assignments that occur at runtime when the user selects a choice from the generated set. Use flow variables to
store field values from the record associated with the user-selected choice.
Click Add Row to enter more field assignments. Click
to remove a row.
Column Header
Description
Field
Variable
Select an existing flow variable, or select CREATE NEW to create a new variable.
Lets return to our example where the flow user selects a product name from the generated set of choices. If, elsewhere in
the flow, you want to refer to or display the associated product ID and product description, you would assign flow variables
to store the relevant field values from the user-selected record.
10. Click OK.
After you create a dynamic choice, it shows up on the Explorer tab, where you can edit it as needed.
In any value or resource drop-down list in the Cloud Flow Designer, you may see a section called GLOBAL CONSTANT.
Global constants are system values that, depending on the context of the drop-down list, let you assign EmptyString, True,
or False as the value for that field.
41
For example, when creating a variable of type Boolean, if you click on the arrow button to the right of the Default Value
field and expand the GLOBAL CONSTANT section, youll see $GlobalConstant.True and $GlobalConstant.False.
However, when creating a variable of type Currency, the GLOBAL CONSTANT section isnt available. Visibility of this
section depends on the data type of the resource youre working with.
The global constants possible are:
42
Chapter 5
Flow Administration
In this chapter ...
A flow starts out as a process or decision diagram created in the Flow Designer.
Once uploaded and run in Salesforce, it becomes an application for navigating
users through a series of screens.
To get started using flows, click Your Name > Setup > Create > Workflow &
Approvals > Flows. From the list page, you can:
43
Flow Administration
To run a flow as a user directly from the flow URL, or from Run Flows
a custom Web tab, link, or button pointing to the flow URL:
OR
Force.com Flow User field enabled on the user detail page
To run a flow from the flow detail page, list page, or from
Manage Force.com Flow
within the Cloud Flow Designer, or to run an inactive flow:
You can have several different versions of a single flow in Salesforce, but only one version of each flow can be active at a time.
To manage a flow, go to Your Name > Setup > Create > Workflow & Approvals > Flows and click a flow name.
On the flow detail page you can:
View a list of all versions of the flows that youve uploaded. By default, flow versions are sorted by Created Date.
Activate a version of the flow.
Note: When you activate a new version of a flow, the previously activated version (if one exists) is automatically
deactivated. Flow processes currently running continue to run using the version with which they were initiated.
Open a flow or flow version created in the Cloud Flow Designer. Only users with the Manage Force.com Flow permission
can open flows.
Important: The Cloud Flow Designer cant open flows created in the desktop Flow Designer. The reverse is also
true.
Click the Open button to open the active version of the flow. If there is no version of the flow activated, Open launches
the latest version.
44
Flow Administration
Click the Open link in the Flow Versions list to open a specific version of the flow.
Note: You cant make direct changes to an active flow. If you open an active version of a flow, you can make
edits, but you cant save those edits unless you save as either a new flow or new flow version.
45
Flow Administration
To run a flow as a user directly from the flow URL, or from Run Flows
a custom Web tab, link, or button pointing to the flow URL:
OR
Force.com Flow User field enabled on the user detail page
To run a flow from the flow detail page, list page, or from
Manage Force.com Flow
within the Cloud Flow Designer, or to run an inactive flow:
The name and description of a flow in Salesforce make up the flow properties. The properties of a flow and its flow versions
are separate. Depending on which Flow Designer you used to create the flow, you can change this information in different
ways.
Note: If you created your flow using the desktop Flow Designer, upon upload of a new flow file, its name and
description in Salesforce are taken from the name and description fields within the file.
On the flow list page, click Edit next to a flow name. To go to the flow list page, click Your Name > Setup > Create >
Workflow & Approvals > Flows.
On the flow detail page, click the Edit button.
If you haven't yet edited the flow properties in Salesforce, the name and description field contents can fluctuate. Here's how:
If you haven't edited the name and description, and you activate a version of your flow, the name and description fields
update to reflect those of the active version.
If you haven't edited the name and description, and there is no version activated, the flow name and description reflect
those of the most recently-uploaded version, if your flow was created in the desktop Flow Designer.
Important: Once you edit the name and description of your flow in Salesforce, those fields no longer automatically
update when you upload or activate a new version.
46
Flow Administration
47
Flow Administration
Give users access to the flow URL, either directly or through a custom button, link or web tab
Use this method when the people wholl be using your flow are all users in your organization and you dont need to
customize its look and feel.
You can find the direct URL of a flow on its detail page at Your Name > Setup > Create > Workflow & Approvals >
Flows. Include the namespace prefix in the flow URL when pointing users to a flow installed from a managed package.
If the flow contains subflow elements and you want to call the latest version of each referenced flow, append
?latestSub=true to the URL.
Users running flows this way must have the Run Flows permission or have Force.com Flow User enabled on their
user detail page. For more information, see User Fields in the online help.
To customize a flow's look and feel or enhance its functionality you can embed it as a component in a Visualforce page. If
your organization has flows enabled for sites and portals, you can then deliver the flow to your Force.com site, Customer
Portal, or partner portal users.
Note: Users can only run flows that have an active version. If the flow you embed doesn't have an active version, users
see an error message. If the flow you embed includes a subflow element, the flow that is referenced and called by the
subflow element must have an active version.
To add a flow to a Visualforce page, embed it using the <flow:interview> component:
1. Find the flow's unique name:
a. Go to the flow list page at Your Name > Setup > Create > Workflow & Approvals > Flows.
b. Click the name of the flow you want to embed.
2. Define a new Visualforce page or open one that you want to edit.
3. Add the <flow:interview> component, somewhere between the <apex:page> tags.
4. Set the name attribute to the unique name of the flow. For example:
<apex:page>
<flow:interview name="MyUniqueFlowName"/>
</apex:page>
Note: If the flow is from a managed package, then the name attribute must be in this format:
namespace.flowuniquename.
48
Flow Administration
5. Restrict which users can run the flow by setting the page security for the Visualforce page that contains it.
If the Visualforce page containing the flow is delivered externally to site or portal users, any of those users with access to
the Visualforce page can run the embedded flow.
If the Visualforce page containing the flow is delivered to users within your organization through a custom Web tab, link,
or button, users must have access to the page. They must also have the Run Flows permission or have the Force.com
Flow User field enabled on their user detail page.
In addition to the other flow customizations available with Visualforce, you can also shape what happens when a user clicks
Finish on the final screen. For a simple example, see Setting Flow Finish Behavior on page 49.
For more examples of using flows in Visualforce, including how to customize the runtime user interface or make a flow interact
with other components on the page, see the Visualforce Developer's Guide.
Because flows are rendered using Visualforce, you can use the finishLocation attribute to redirect users to another screen
in Salesforce when they click Finish.
Note:
If finishLocation isn't specified, users that click Finish are routed back to the first screen of the flow.
If you use a standard controller to display a record on the same page as the flow, users that click Finish are routed
back to the first screen of the flow, without the record. This is because the id query string parameter isnt preserved
in the page URL. If needed, configure the finishLocation to route users back to the record.
You can't redirect flow users to a URL thats external to your Salesforce organization.
Embed the flow as a component in a Visualforce page and configure finishLocation manually.
Here's a simple example, using the URLFOR function. You can use URLFOR to:
Route users to a relative URL, such as the Salesforce home page.
<apex:page>
<flow:interview name="flowname" finishLocation="{!URLFOR('/home/home.jsp')}"/>
</apex:page>
Route users to a specific record or detail page using its ID. For example, if you wanted to route users to a detail page
with an ID of 001D000000IpE9X:
<apex:page>
<flow:interview name="flowname" finishLocation="{!URLFOR('/001D000000IpE9X')}"/>
</apex:page>
For more examples, see "Configuring the finishLocation Attribute in a Flow" in the Visualforce Developer's Guide.
49
Flow Administration
Note:
If you deliver a flow to your users from a custom button, link, or Web tab that points to the flow URL, we
recommend against using retURL in the URL path to redirect them. Using retURL can cause the destination
page you specify to be rendered with top and side navigation bars nested within the existing Salesforce top and
side navigation bars.
You can't redirect flow users to a URL thats external to your Salesforce organization.
50
Chapter 6
Running Flows
Available in: Enterprise, Unlimited, and Developer Editions
To run a flow as a user directly from the flow URL, or from a Run Flows
custom Web tab, link, or button pointing to the flow URL:
OR
Force.com Flow User field enabled on the user detail page
To run a flow from the flow detail page, list page, or from
within the Cloud Flow Designer, or to run an inactive flow:
Flows are a collection of scripted screens that you can step through to collect and update data. For example, as a support
representative in a call center, you can use flows to capture information as you help troubleshoot customer issues. Or as a
salesperson, you can use flows to generate real-time quotes. You can even use flows to manipulate your organization's data in
new ways.
Depending on how flows are set up in your organization, you can run them directly from the flow URL in your browser, or
from a custom Web tab, link, or button pointing to the URL.
If your administrator hasn't defined custom Web tabs, links, or buttons for flows, you can find the direct flow URL by going
to Your Name > Setup > Create > Workflow & Approvals > Flows and clicking on the name of the flow you want to run.
Consider the following when running flows:
Don't use your browser's Back or Forward buttons to navigate through a flow. This may result in inconsistent data between
the flow and Salesforce.
A single flow may have up to 50 different versions. When you run a flow, you see the active version, which may not necessarily
be the latest version.
Flow administrators can also run flows directly from the flow detail page.
51
Chapter 7
Flows in Change Sets and Packages
In this chapter ...
Flows created in the Cloud Flow Designer can be included in both change sets
and packages. The recipient organization of either the change set or package
must have Visual Workflow enabled.
52
The Cloud Flow Designer cant open flows installed from managed packages.
You cant delete a flow from an installed package. To remove a packaged flow
from your organization, you must first deactivate it, wait 12 hours, then
uninstall the package.
In a development organization, you cant delete a flow or flow version once
youve uploaded it to a released or beta managed package.
You cant delete flow components from Managed - Beta package installations
in development organizations.
Flows cant be included in package patches.
If you have multiple versions of a flow installed from multiple unmanaged
packages, you cant remove only one version by uninstalling its package.
Uninstalling a packagemanaged or unmanagedthat contains a single
version of the flow removes the entire flow, including all versions.
53
Chapter 8
Flow Limits
Available in: Enterprise, Unlimited, and Developer Editions
50
2000
500
1000
3 MB
If you exceed your organization's site usage limits or Visualforce usage limits, you can't run flows.
54
Chapter 9
Visual Workflow Considerations
Available in: Enterprise, Unlimited, and Developer Editions
When creating, managing, and running flows, consider the permissions, use limits, and data issues.
Be careful when testing flows that contain Record Delete elements. Even if the flow is inactive, running it will trigger the
delete operation.
When entering a date value, you must use the MM/DD/YYYY format.
The Flow Designer doesn't support UTF-8 encoding for text in user input fields.
The Flow Designer uses the permissions and locale assigned to the current user.
The Cloud Flow Designer contains embedded fonts for all locales it supports. The supported locales are:
English (US)
French (France)
German (Germany)
Spanish (Spain)
Japanese (Japan)
Chinese (Traditional)
Chinese (Simplified)
If you enter unsupported characters for a supported locale, theyre displayed using system fonts instead of the embedded
fonts.
In unsupported locales, your system font settings are used to display all characters in the Cloud Flow Designer.
If the Cloud Flow Designer doesn't show a custom object or field that was recently created, close and reopen it.
If a user leaves a choice blank or unselected, its stored value is set to null.
If you have the same choice option used in more than one place on different screens in your flow, a was selected query on
that choice option will always resolve to the most recent one.
If you have the same choice option with a user input used in more than one place on the same screen, a was selected query
on that choice option will always resolve to the first one.
Dont enter the string null as the value of a text field in the Cloud Flow Designer. If you do this, you may not be able to
save the flow.
The Cloud Flow Designer cant open flows installed from managed packages.
If you open a flow from Winter 12, any Boolean decision it contains is converted to a multi-outcome Decision element
that:
Uses the same name as the old decision.
Takes the unique name of the old decision, appended with _switch.
55
Has an outcome labeled True. This outcomes unique name matches that of the old decision, and its conditions are
migrated from the True outcome of the old decision.
Has a default outcome labeled False.
Flow Administration
Only files with the .flow extension can be uploaded into Salesforce. To convert .spark files into .flow files, download
the latest version of the Flow Designer from the flow list page, open your file, and save it with the .flow extension.
Note: Desktop Flow Designer files with the .flow extension are different from and are incompatible with the
.flow files that are generated by the Metadata API for flows created from the Cloud Flow Designer.
If you exceed your organization's site usage limits or Visualforce usage limits, you can't run flows.
Once you edit the name and description of your flow in Salesforce, those fields no longer automatically update when you
upload or activate a new version.
When you activate a new version of a flow, the previously activated version (if one exists) is automatically deactivated. Flow
processes currently running continue to run using the version with which they were initiated.
You cant delete an active flow. Once deactivated, you must wait 12 hours to delete a flow or flow version. This ensures that
flows in progress have time to complete. Flows that have never been activated can be deleted immediately.
Flow Runtime
Don't use your browser's Back or Forward buttons to navigate through a flow. This may result in inconsistent data between
the flow and Salesforce.
A single flow may have up to 50 different versions. When you run a flow, you see the active version, which may not necessarily
be the latest version.
56
Chapter 10
Visual Workflow Accessibility Overview
Available in: Enterprise, Unlimited, and Developer Editions
Clicking the next or previous buttons doesn't change the title of the screen, so you may not realize you're on a new page.
There are no labels on radio buttons. Screen readers can't distinguish between questions.
Questions without defined prompts may not read correctly.
Errors are not noted when reading the fields.
57
Chapter 11
Visual Workflow Terminology
Available in: Enterprise, Unlimited, and Developer Editions
58
APPENDICES
Appendix
A
Tutorial #1: Creating a Tip Calculator
If you're new to flows and the Flow Designer, this tip calculator tutorial is a simple introduction to the basic elements of a flow
and how they work together.
59
From the users perspective, all we need are two screens, representing input (bill amount, service quality) and output (tip
amount). However, at least one thing needs to happen that the user will never see: the calculation of the tip amount. Well
use a Formula resource for that later on.
Note: Steps aren't valid elements for active flows. You can have a draft flow with Steps in it and can run it in the draft
state as an administrator, but you must replace the Steps with other elements before you can activate the flow and let
users run it.
Go to Your Name > Setup > Create > Workflow & Approvals > Flows.
Click New Flow.
From the Palette in the left pane, click and drag a Screen element onto the canvas.
Enter Bill Information into the Name field.
Press TAB, and the Unique Name field should automatically fill in.
If you did the optional step to pre-configure your flow with Step elements, we need to convert the Step into a Screen.
1. Hover over the Bill Information Step and click .
2. Remove Step from the Name field. It should just read Bill Information now.
3. Remove _Step from the Unique Name field. It should just read Bill_Information now.
The first thing we want to gather on the screen is the bill amount, so we need to add an input field for it.
1.
2.
3.
4.
5.
In the Choice Settings section, we need to set up four service level choices for the user. Choices are resources, and we can
create them here in the Screen overlay.
60
1.
2.
3.
4.
5.
6.
Click the arrow button to the right of the first Choice field, expand the CREATE NEW section, and select Choice.
In the Label field, type Excellent.
Set the Value Data Type to Number.
For Stored Value, enter 20, representing a 20% tip.
Click OK.
Click Add Choice to repeat these steps three more times, adding new choices with the following values.
7. Verify that your Screen overlay looks like this, then click OK.
61
5. Click the arrowhead button, expand the SCREEN INPUT FIELDS section and select Bill_Amount. You should see
{!Bill Amount} appear in the text box.
6. We want to multiply the bill amount by the service quality value, so after {!Bill Amount}, type an asterisk.
7. Put your cursor directly after the asterisk, click the arrowhead button, expand the SCREEN CHOICE FIELDS section,
and select Quality_of_Service.
8. Since we want to represent the service quality as a percentage, type /100 after {!Quality_of_Service}, then enclose
both in parentheses, like so: ({!Quality_of_Service}/100).
9. Your final formula should look like this: {!Bill Amount}*({!Quality_of_Service}/100).
62
8. Click OK.
If you click over to the Explorer tab again, you should now see TipAmount and TotalBill in the Formulas section.
63
d.
e.
f.
g.
Click the arrowhead again, expand the FORMULAS section, and select TipAmount.
Replace the Y in the sentence with {!TipAmount}.
Click the arrowhead again, expand the FORMULAS section, and select TotalBill.
Replace the Z in the sentence with {!TotalBill}.
The final text in the preview pane of the overlay should look like this:
You say the quality of service was {!Quality_of_Service}, so you should leave a tip of
{!TipAmount} for a total bill of {!TotalBill}.
6. Verify your Screen overlay looks like this, then click OK.
7. If you didnt already do it in the optional first step, click and drag an arrow connector from the Bill Information screen
element onto the Show Tip Summary screen element.
Tip: If you accidentally delete a selected element or connector from the canvas, dont panic! Go up to the button bar
and click Undo (
).
Your Flow Designer main canvas should contain two Screen elements, as shown here.
64
All flows must have an element designated as the start point. Let's do that now.
1. If you didn't already, click OK to close the save dialog box.
2. Hover your mouse over the Bill Information screen element and you'll see three icons appear in the upper right corner.
3. Click to set the Bill Information screen as the starting point for the flow.
4. Click Save again to save this change.
5. Click Close. You should be taken to the flow detail page.
65
4. Click Next.
5. The next screen should read: You say the quality of service was Excellent, so you should leave a tip of 20.00 for a total bill
of 120.00.
6. Click Finish.
7. Close the flow window.
66
Appendix
B
Tutorial #2: Creating a Sustainability Survey
This tutorial is slightly more complex than the Tip Calculator. This time well create a flow for a company that wants to find
out the commute habits of its employees. Using a combination of display text, textboxes, and radio buttons, well capture
employees regions, commute hours, and email addresses. Were going to ask them to identify their region in the first screen,
then well use a Decision element and a series of Screen elements to route them through the flow based on which region they
choose.
The first thing we want to do on this screen is to welcome the user and tell them a little bit about the survey.
1.
2.
3.
4.
5.
Next, well ask users to identify which region they work in.
67
1.
2.
3.
4.
5.
Click the arrow button to the right of the first Choice field, expand the CREATE NEW section, and select Choice.
In the Label field, type AMERICAS.
For Stored Value, enter AMERICAS.
Click OK.
Click Add Choice
Click the arrow button to the right of the new Choice field, expand the CREATE NEW section, and select Choice.
In the Label field, type EMEA.
For Stored Value, enter EMEA.
Click OK.
6. Verify that your Screen overlay looks like this, then click OK.
68
1. From the Palette tab, click and drag a Decision element onto the canvas directly below the Screen you just created.
2. Enter Route based on region for Name.
3. In the Outcomes section, well configure the conditions for each outcome.
a.
b.
c.
d.
e.
5. Click and drag an arrow connector from the Screen element onto the new Decision element.
69
1.
2.
3.
4.
5.
6.
Click the arrow button to the right of the first Choice field, expand the CREATE NEW section, and select Choice.
In the Label field, type US: San Francisco.
For Stored Value, enter SF.
Click OK.
Click Add Choice to repeat these steps two more times, adding new choices with the following values.
Next, well ask users to tell us how many days they commute to work every week.
1.
2.
3.
4.
5.
6.
70
7. Click and drag an arrow connector from the Decision element onto this Screen element. A Decision Routing dialog box
appears.
8. Make sure Region: AMERICAS is selected, then click OK. A connector labeled as Region: AMERICAS should appear
between the Decision and the Screen we just created.
Click the arrow button to the right of the first Choice field, expand the CREATE NEW section, and select Choice.
In the Label field, type UK: London.
For Stored Value, enter UK.
Click OK.
Click Add Choice to repeat these steps two more times, adding new choices with the following values.
Next, well ask users to tell us how many days they commute to work every week.
71
1.
2.
3.
4.
5.
6.
7. Click and drag a connector from the Decision element onto this new Screen element.
Because you already set up the path pointing to the AMERICAS Screen, the Flow Designer knows that the second connector
coming out from the Decision element should automatically be labeled as Region: EMEA. Your diagram should look similar
to this now:
72
6. Expand the Help Text section. Text you enter here displays in an information tooltip as a help icon ( ) to the right of
the field. When the user clicks the icon during runtime, the help text appears.
7. Type in Enter the distance in miles.
Next, well ask how long they spend commuting each day.
1.
2.
3.
4.
5.
Lastly, well ask how much they spend on commute expenses every month.
1. Click the third Textbox field in the preview pane.
2. On the Field Settings tab, enter How much do you spend on your commute every month? in the Label
field.
3. Change the unique name to Cost.
4. Expand the Help Text section.
5. Type in Enter the amount in your local currency.
6. Verify that your Screen overlay looks like this, then click OK.
73
7. Click and drag a connector from the both the Americas and EMEA Screen elements onto this Screen element.
74
15. Click and drag a connector from the previous Screen element onto this one.
From the Palette in the left pane, click and drag a Screen element onto the canvas.
Enter Thank You into the Name field.
Change the Unique Name field to Summary_and_Finish.
Click the Add a Field tab.
Under the OUTPUTS section, double-click to add Display Text.
Click the Display Text field in the preview pane to configure it.
On the Field Settings tab, enter Summary in the Unique Name field.
In the text box, type in Thank you for participating in the survey!
Verify that your Screen overlay looks like this, then click OK.
75
10. Click and drag a connector from the previous Screen element onto this one.
Your completed flow diagram should now look something like this:
76
5. Click OK.
You may have noticed this message on the Save dialog:
All flows must have an element designated as the start point. Lets do that now.
1. Hover your mouse over the first screen element and youll see icons appear in the upper right corner.
2. Click to set the welcome screen as the starting point for the flow.
3. Click Save again to save this change.
4. Click Close. You are taken to the flow detail page.
77
6. Click Next.
7. For the next screen, indicate that your commute is 30 miles, takes 1 hour round-trip, and that you spend $71.40 on your
commute every month.
8. Click Next.
9. Enter an email address.
10. Click Next.
11. Click Finish.
12. Close the flow window.
78
Index
Index
A
About Apex Plug-ins 29
About formulas in flows 36
About subflows 25
Activating a flow 44
Apex Plug-in element 28
Assignment element
adding 30
configuring 30
C
Choice 38
Connector element 30
Constant 34
Creating a Flow 10
D
Decision element
adding 19
configuring 19
Deleting a flow 44
Dynamic Choice 39
E
Editing flow properties 46
Elements
adding 13
Apex plug-in 2829
assignment 30
connector 30
decision 19
editing 13
fault connector 31
managing 13
record create 22
record delete 24
record lookup 20
record update 23
removing 13
screen 1418, 3839
step 13
subflow 25
F
Fault Connector element 31
flow
activating 44
deleting 44
managing 44
opening 44
Flow
accessibility 57
administration 43
creating 10
delivering to users 47
editing properties 46
Flow (continued)
embedding in Visualforce pages 47
in change sets 52
in packages 52
limits 54
running flows 51
saving 10
sharing 47
using 47
Flow Designer
editing flow properties 8
element comparison 5
elements 12
functionality comparison 5
resources 33
saving flows 8
system requirements 4
user interface 8
using 4
Flows in change sets 52
Flows in packages 52
Formula resource 36
G
Global constants 41
L
Limits
flow 54
O
Opening a flow 44
R
Record Create element 22
Record Delete element 24
Record Lookup element 20
Record Update element 23
Resources
choice 38
constant 34
dynamic choice 39
formula 36
global constants 41
text template 37
variable 34
variable in referenced flow 27
S
Saving a flow 10
Screen element
Add a Field tab 15
adding 14
configuring a choice 38
configuring a dynamic choice 39
79
Index
Variable 34
Variable in referenced flow 27
Visual Workflow
considerations 55
setting finish behavior 49
tips and tricks 55
Visual Workflow overview 3
Visualforce
embedding flows 4748
T
Text Template 37
80