Extend Click Automate
Extend Click Automate
Processes
Salesforce, Summer ’22
@salesforcedocs
Last updated: June 2, 2022
© Copyright 2000–2022 salesforce.com, inc. All rights reserved. Salesforce is a registered trademark of salesforce.com, inc.,
as are other names and marks. Other marks appearing herein may be trademarks of their respective owners.
CONTENTS
INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711
AUTOMATE YOUR BUSINESS PROCESSES
Instead of relying on your users to perform each part of a business process, automate it! The benefits are two-fold: your users can spend
their time on other tasks, and you can trust that the process is always done just so. Salesforce offers tools to automate several kinds of
business processes: guided visual experiences, behind-the-scenes automation, and approval automation. You'll be happy to know that
these tools don't require you to write code—they're all point-and-click.
1
Automate Your Business Processes Which Automation Tool Do I Use?
To automate your organization’s processes for approving records, create approval processes. Approvals and Workflow are
available in Enterprise,
Performance, Unlimited,
What to Do When a Record Has Certain Values and Developer Editions
Three of our tools can address this use case: Workflow, Process Builder, and Flow Builder. Respectively,
these tools create workflow rules, processes, and flows.
We recommend starting with Process Builder, especially for business processes that can be simplified to if/then statements. For example:
if a case is escalated, then notify the account owner.
Process Builder includes almost all the functionality that’s available in workflow rules, and more. In fact, a single process can do what it
would normally take multiple workflow rules to do.
If the process is too complicated for the Process Builder or requires more advanced functionality, create a flow by using Flow Builder.
For example, create a flow to:
• Use complex branching logic (if certain conditions are true, evaluate for further conditions)
Example: First, check whether a case is escalated. If the case is escalated, check the account’s region and route the case accordingly.
2
Automate Your Business Processes Which Automation Tool Do I Use?
Visual designer
Starts when • Record is • User clicks button or link Record is changed • User clicks button or link
changed • User accesses Lightning page, • Process or flow starts that
• Invoked by Experience Cloud site page, includes a Submit for
another process Visualforce page, or custom tab Approval action
• Platform event • User accesses item in a utility • Apex is called
message is bar
received • Process starts
• Apex is called
Supports
time-based
actions
Supports user
interaction
Supported Actions
Invoke processes
Delete records
Launch a flow
(Pilot)1
Post to Chatter
Send email
Send custom
notification
3
Automate Your Business Processes Equivalent Features in Flows and Workflow Rules
Submit for
approval
Update fields Any related record Any record The record or its The record or its parent
parent
1
The Process Builder has superseded flow trigger workflow actions, previously available in a pilot program. Orgs that are using flow
trigger workflow actions can continue to create and edit them, but they aren’t available for new orgs.
Rule Name Use the Flow Label field. The field is available
when saving the flow.
Select Object Use the Object field. The field is available in the
Start element, in the Select Object section.
4
Automate Your Business Processes Equivalent Features in Flows and Workflow Rules
Evaluation Criteria
In flows, evaluation criteria are defined in the Start element, in the Set Entry Conditions section.
created, and any time it's edited to subsequently meet criteria Trigger the Flow When:
• A record is created or updated
When to Run the Flow for Updated Records:
• Only when a record is updated and meets the condition
requirements
created, and every time it's edited Trigger the Flow When:
• A record is created or updated
When to Run the Flow for Updated Records:
• Every time a record is updated and meets the condition
requirements
To manually convert workflow rules with unsupported use cases in entry criteria, use the Decision element.
1. Create a Decision element inside the Flow as the first step.
2. Recreate the workflow rule steps with the condition builder.
Note: With this method, the flow will always run and check on the decision after entering. This method can impact performance
or prevent time-based workflow triggers from migrating.
Rule Criteria
In flows, rule criteria are defined in the Start element, in the Set Entry Conditions section.
5
Automate Your Business Processes Equivalent Features in Flows and Workflow Rules
Field Updates
In flows, field updates are done using the Update Records element. In the Update Records element, for How to Find Records to Update
and Set Their Values, select Use the {object name} record that triggered the flow. In flows, you can enter values directly, or use
formulas or references for field values. You can also update multiple fields in a single flow. To improve performance, place field updates
in a flow optimized for fast field updates (before-save).
Flows don’t support field update notifications for the Owner field.
A Get Records element can be required to reference certain elements, like users or groups.
Task Fields
To create a task in a flow, use the Create Records element.
6
Automate Your Business Processes Equivalent Features in Flows and Workflow Rules
Operators
Flow Builder shows only the operators that are relevant to the field. Less Than, Greater Than, Less Than or Equal,
and Greater Than or Equal, appear only for number fields.
equals Equals
excludes N/A
includes N/A
N/A Is Null
N/A Is Changed
within N/A
To manually convert workflow rules that use the does not contain operator, use custom condition logic. For example, create a
condition that uses the Contains operator in the first condition, and in the condition logic, enter NOT 1.
SEE ALSO:
Migrate to Flow Tool Considerations
Migrate to Flow Tool Considerations
7
Automate Your Business Processes Browser Requirements
Browser Requirements
These are the web browsers supported by our automation tools.
Supported Browsers
• Google Chrome™ (latest stable version)
• Mozilla® Firefox® (latest stable version)
• Microsoft® Edge (latest stable version)
• Apple® Safari® (latest stable version)
Microsoft® Internet Explorer® isn’t supported.
Note: The browser vendor defines latest for their own browser. Check with your browser vendor to determine the latest
version available.
Screen Resolution
The minimum screen resolution required is 1024 x 768. We recommend using a width of at least 1200.
8
Automate Your Business Processes Salesforce Flow
• Record types
• The does not contain, includes, excludes, or within operators
• The greater than, greater or equal, less than, less or equal operators on picklist fields
• Formulas that use Hour, Minute, Second, TimeNow, TimeValue, IsClone, or $RecordType
• Tasks
• Relative date values in date fields
• Multiple currencies
Note: With this method, the flow will always run and check on the decision after entering. This method can impact performance
or prevent time-based workflow triggers from migrating.
To manually convert workflow rules that use the does not contain operator, use custom condition logic. For example, create a
condition that uses the Contains operator in the first condition, and in the condition logic, enter NOT 1.
To manually convert workflow rules that use tasks, use the Create Records option and create a record of the Task object.
Flows support workflow actions for Email Alerts and Outbound Messages. To add these workflow actions to a flow, use the Action
element.
To replicate relative date values, such as TODAY or NEXT WEEK, use the Decision element.
SEE ALSO:
Equivalent Features in Flows and Workflow Rules
Equivalent Features in Flows and Workflow Rules
Salesforce Flow
No matter whether they’re buying movie tickets, paying bills, or changing restaurant reservations,
EDITIONS
if a customer is interacting with a company, they expect a seamless, personalized experience.
Salesforce Flow provides declarative process automation for every Salesforce app, experience, and Available in: both Salesforce
portal with two point-and-click automation tools: Process Builder and Flow Builder. Classic and Lightning
Experience
Process Builder Available in: Essentials,
Many of the tasks you assign, the emails you send, and other record updates are vital parts of Professional, Enterprise,
your standard processes. Instead of doing this repetitive work manually, you can configure Performance, Unlimited,
processes to do it automatically. Process Builder helps you automate your business processes and Developer Editions
and gives you a graphical representation as you build it.
9
Automate Your Business Processes Process Builder
Flows
A flow is the part of Salesforce Flow that collects data and performs actions in your Salesforce org or an external system. Salesforce
Flow provides two types of flows: screen flows and autolaunched flows.
Process Builder
Many of the tasks you assign, the emails you send, and other record updates are vital parts of your
EDITIONS
standard processes. Instead of doing this repetitive work manually, you can configure processes to
do it automatically. Process Builder helps you automate your business processes and gives you a Available in: both Salesforce
graphical representation as you build it. Classic and Lightning
Process Builder supports three types of processes for your automation needs. The type determines Experience
what triggers the process.
Available in: Essentials,
• A record change process starts when a record is created or updated. Professional, Enterprise,
• An event process starts when a platform event message is received. Performance, Unlimited,
and Developer Editions
• An invocable process starts when something else, like another process, invokes it.
Each process consists of:
• Criteria that determine when to execute an action group.
• Action groups, which consist of immediate or scheduled actions. Only record change processes support scheduled actions.
Examples of Processes
See how Process Builder can make automating your business processes super easy.
Process Limits and Considerations
Before you start creating, managing, and activating processes, understand the limits and considerations.
Setting Values in the Process Builder
Throughout the Process Builder, you need to set values, for example, to set conditions in a criteria node, to set the fields on a new
case in a Create a Record action, or to specify an Apex method to reference.
Setting Advanced Options in the Process Builder
The Process Builder lets you choose some advanced options for executing actions in your processes.
10
Automate Your Business Processes Process Builder
Create a Process
To create a process, define its properties and which records it should evaluate, and then add criteria nodes and actions.
Troubleshoot Processes
Use the error messages that appear in the Process Builder and the emails you receive when a process fails to help solve problems
that arise when you’re working with processes. When all else fails, look at the Apex debug logs for your processes.
SEE ALSO:
Which Automation Tool Do I Use?
Examples of Processes
See how Process Builder can make automating your business processes super easy.
EDITIONS
11
Automate Your Business Processes Process Builder
The High Value Deal Won criteria checks whether the opportunity’s stage is closed and won and also whether the opportunity’s amount
is greater than $1,000,000.00. If both of these conditions are met, the associated action group is executed. For this criteria node, three
immediate actions (5) and one scheduled action (6) are defined.
These actions:
• Create a draft contract record that's associated with the opportunity’s account.
• Congratulate the opportunity owner for closing and winning the opportunity by posting to the Sales Chatter group.
• Notify the VP of sales via email that the opportunity was closed and won.
• Create a high priority follow-up task for the associated account’s owner, which is scheduled to execute six days after the opportunity’s
Close Date.
If the High Value Deal Won criteria conditions aren’t met, the associated group of actions doesn’t execute and the next criteria node
(High Value Deal Lost) is evaluated.
The High Value Deal Lost criteria node checks whether the opportunity stage is closed and lost and whether the opportunity amount
is greater than or equal to $1,000,000.00. If these conditions are true, we’ve set up an action (7) to notify the VP of sales by creating a
chatter post on the opportunity record. The post identifies the opportunity and the opportunity amount that was lost.
If neither of the previous criteria conditions are met, the next criteria node defined in this process checks whether the opportunity stage
is set to “Proposal/Quote Given.” If this condition is true, a scheduled action (8) is executed three days after the record is updated. The
scheduled action creates a follow-up task for the opportunity owner to make a call to inquire about the opportunity.
Using the Process Builder, we’ve combined three criteria nodes and associated actions into a single, automated process. To automate
the same business process with workflow, you would have to create three different workflow rules and use Apex triggers to create the
contract record and post to the Sales Chatter group.
12
Automate Your Business Processes Process Builder
When Salesforce receives the Printer Status event, your Printer Management process uses the serial Available in: Performance,
number to find a matching asset in your Salesforce org. Unlimited, Enterprise, and
Developer Editions
13
Automate Your Business Processes Process Builder
SEE ALSO:
Platform Events Developer Guide: Considerations for Defining and Publishing Platform Events
• The Account object has a custom field labeled Quip Account Plan Doc (API name Available in: Essentials,
Quip_Account_Plan_Doc__c). For each account, the custom field stores the URL of an associated Professional, Enterprise,
document that contains a plan for the account. Performance, Unlimited,
• All the Account Plan documents are in a shared folder. The folder’s URL is and Developer Editions
https://acme.quip.com/123FakeURL456.
14
Automate Your Business Processes Process Builder
The criteria (2) checks whether the value of the Quip Account Plan Doc custom field has changed and whether the field isn't null. If both
conditions are true, an immediate action (3) moves the Quip Account Plan doc to the specified shared folder. Let’s dig a little deeper
into the criteria and action in this sample process.
The criteria’s Set Conditions section defines which conditions must be met in the Quip Account Plan Doc field to move a document.
There are two conditions: that the Quip Account Plan Doc field isn’t null and that it’s changed. The Field column requires the full API
name of the field, in this case, [Account].Quip_Account_Plan_Doc__c. The Conditions section specifies that all the conditions must be
met to execute the action.
15
Automate Your Business Processes Process Builder
For the action definition, you select Quip for Action Type to view the Quip-related actions. Enter an Action Name (Move Doc to
Folder in our example) then select the action (Add Document to Folder). The Document URL is a field reference to the custom field
([Account].Quip_Account_Plan_Doc__c) that contains the URL of the document to move. The Folder URL is a String type that specifies
the URL of the shared folder.
16
Automate Your Business Processes Process Builder
Process Limits
When building processes, keep shared limits and Apex governor limits in mind. In addition, a
EDITIONS
process’s API name must be unique across all processes and flows in your Salesforce org.
Available in: both Salesforce
Limits Shared with Other Features Classic and Lightning
Experience
Processes share some limits with rules and flows.
Available in: Essentials,
Essentials or Enterprise, Professional, Enterprise,
Professional Unlimited, Performance, Unlimited,
Edition Performance, and Developer Editions
Per-Org Limit
or
Developer
Edition
Active record change processes and rules per object 50 50
Rules include workflow rules, escalation rules, assignment rules,
and auto-assignment rules.
17
Automate Your Business Processes Process Builder
Essentials or Enterprise,
Professional Unlimited,
Per-Org Limit
Edition Performance, or
Developer Edition
Active processes 5 per process type 2,000 per process
type
Criteria nodes that are evaluated and actions that are executed at runtime per process 2,000 2,000
Groups of scheduled actions that are executed or flow interviews that are resumed per 1,000 1,000
hour
Combined total of these automations that start or resume based on a record’s field value. 20,000 20,000
• Resume events that are defined in active flows
• Groups of scheduled actions that are defined in active processes
• Time triggers that are defined in active workflow rules
• Inactive flow interviews that are resumed
The daily limit for emails sent from email alerts is 1,000 per standard Salesforce license per org, except for Developer Edition orgs. For a
Developer Edition org, the daily workflow email limit is 15 per standard Salesforce license. The overall org limit is 2,000,000, which is
shared across all features that use workflow email alerts: workflow rules, approval processes, flows, and processes.
Each Create a Record action uses one DML statement. Each Quick Action action uses one DML statement. Each Update Records action
uses one SOQL query and one DML statement. Each Flows action can use multiple SOQL queries and DML statements, depending on
the elements that the flow executes. For details, see Per-Transaction Flow Limits on page 206.
18
Automate Your Business Processes Process Builder
This table describes the free allocations that are granted based on your org’s edition.
Maximum flow interviews without Interviews of flow types that can’t have 10,000,000 10,000,000,000 10,000,000,000
UI per month screen elements, such as autolaunched
flows, transaction security flows, and
processes built in Process Builder
19
Automate Your Business Processes Process Builder
If you have questions about increasing your allocation, contact your Salesforce account executive.
SEE ALSO:
Usage-Based Entitlements
View Your Salesforce Org’s Usage-Based Entitlements
Reevaluate Records in the Process Builder
Flow Types
How Does Salesforce Process Scheduled Actions?
Important: Where possible, we changed noninclusive terms to align with our company Available in: both Salesforce
value of Equality. We maintained certain terms to avoid any effect on customer Classic and Lightning
Experience
implementations.
A record change can apply to more than just processes. When a record is created or edited, Salesforce Available in: Essentials,
evaluates whether to run other setup items, such as validation rules on the record. Salesforce Professional, Enterprise,
evaluates the setup items in this order. Performance, Unlimited,
and Developer Editions
1. Validation rules
2. Assignment rules
3. Auto-response rules
4. Workflow rules and processes (and their immediate actions)
5. Escalation rules
For more information, see Triggers and Order of Execution in the Apex Developer Guide.
When you create a process, you associate the process with exactly one object. You also specify whether to evaluate only created records
or both created and edited records. When you activate a process, it starts when a record change meets those settings.
Processes Evaluate Record Changes When:
• A record is saved or created. Processes that are created after records are saved don’t evaluate those records retroactively.
• A standard object in a master-detail relationship is reparented.
• Users synchronize records that were changed while using Connect Offline.
• Leads are converted, if the lead setting Require Validation for Converted Leads is enabled.
• Another process, workflow rule, or flow updates the record in the same save operation, if the process is configured to reevaluate
records.
Processes can reevaluate records up to five times in one save operation. In a batch update, processes reevaluate only changed
records.
Note: A record change can trigger more than one process. You can’t determine which process starts first.
20
Automate Your Business Processes Process Builder
SEE ALSO:
Best Practices for Designing Processes
21
Automate Your Business Processes Process Builder
Tip: When you replace a workflow rule with a process, deactivate the workflow rule before you activate the process. Otherwise,
you can get unexpected results, such as overwritten records or redundant email messages. This best practice also applies when
you replace an Apex trigger with a process.
Here are a couple features that can ease your path to one master process.
ISNEW()
Some automation applies only to created records. The rest applies to created and edited records. How could you possibly combine
all of them into one process? Meet the formula function that detects whether the record being evaluated was just created: ISNEW().
To add a create-only automation to a process that starts when a record is created or edited, convert the associated criterion’s
conditions to a formula. Then add && ISNEW() to your formula.
Invocable processes
Just like a process can call flows, a process can call other processes. Invocable processes are modular processes that start only when
another process tells them to.
For example, several criteria nodes in your “Account” process each evaluate some conditions, including whether the account is high
value. Move those criteria nodes, without the high-value condition that they have in common, into a “Top Account” invocable
process. Then configure your ”Account” process to invoke the “Top Account” process if the account is high value.
22
Automate Your Business Processes Process Builder
To access external data after changing Salesforce data, use scheduled actions.
If Salesforce creates, updates, or deletes data in your org and then accesses external data in the same transaction, an error occurs. In your
processes, we recommend using a separate transaction to access data in an external system. To do so, end the prior transaction by
adding a scheduled action. For a record-change process, don't use a field-based schedule.
For example, an event process starts when it receives a platform event message from the custom platform event, Order Status. If the
order status is new, the process creates a contact and schedules an action to update the order status in the external system. The event
process doesn’t fail because the scheduled action creates a separate transaction to access the external system.
SEE ALSO:
Considerations for Designing Processes
Considerations for the ISNEW Function
Transactions and Scheduled Actions
23
Automate Your Business Processes Process Builder
24
Automate Your Business Processes Process Builder
2. In the process, when you add the Flows action, use event references to assign each platform event field to its corresponding
flow variable.
Associating with a Record
Use the process’s matching conditions to find exactly one record. If the process can’t find one record based on your matching
conditions—because either it found multiple records or no records—the creator of the process receives an error email. If an error
occurs, adjust the conditions in the process’s trigger to be more specific.
Publishing Event Messages
With event processes, we don’t block you from publishing the same event message that starts the process. To avoid creating an
endless loop, make sure that the new event message’s field values don’t meet the filter criteria for the associated criteria node.
If a platform event is configured to publish immediately, the process publishes each event message outside of the database transaction.
If the transaction fails and is rolled back, the event message is still published and can’t be rolled back. So if you see an informational
message under the selected platform event, consider whether you want the process to publish an event message only after the
transaction commits successfully.
Subscriptions Related List
On the platform event’s detail page, the Subscriptions related list shows which entities are waiting to receive that platform event’s
messages. The related list includes a link to each subscribed process. If flow interviews are waiting for that platform event's messages,
one “Process” subscriber appears in the Subscriptions related list.
Packaging
When you package an event process, the associated object isn’t automatically included. Advise your subscribers to create the object
or manually add the object to your package. For example, when you package an event process that’s associated with the Participants
custom object, manually add the object to your package.
Uninstalling Events
Before you uninstall a package that includes a platform event, deactivate all processes that reference the platform event.
Einstein Predictions
A prediction event is sent for each Einstein prediction result, so use process matching conditions if you want your process to be
triggered only by predictions on a specific object. For example, if your process acts only on predictions written to Lead records, add
a matching condition to check that the Lead ID field equals the AI Predicted Object ID event reference.
If your process updates a field that is used by an Einstein prediction, Einstein runs the prediction again and writes back the new
results. The new results generate a new prediction event that could trigger your process again, resulting in a loop. To avoid creating
a process loop, only update fields that aren’t used in Einstein predictions.
SEE ALSO:
Platform Events Developer Guide: Decoupled Publishing and Subscription
Platform Events Developer Guide: Platform Event Fields
Platform Events Developer Guide: Subscribe to Platform Event Messages with Processes
25
Automate Your Business Processes Process Builder
Derived Fields
Process Builder doesn’t support fields whose values are derived from other records. Examples of derived fields include
Contact.Name and User.MediumPhotoUrl.
Polymorphic Fields
Queue labels aren't supported in process criteria. For example, you can't use [Lead].Owner:Queue.Name in process criteria.
Instead, use [Lead].Owner:Queue.DeveloperName to reference the queue's API name.
Validation Rules
• Scheduled Update Records actions skip validation rules.
• Immediate Update Records actions obey validation rules.
Shield Platform Encryption
You can’t use an encrypted field as a filter in an Update Records action.
Duplicate Rules
If a duplicate is found when a process tries to create or update a record, the process fails.
Converted Leads
To evaluate records that result from converted leads, enable the lead setting Require Validation for Converted Leads.
Formula Field Values
If a standard formula field references a field on a related object, that field's value is always null when a process starts. This limitation
doesn’t apply to custom formula fields that reference a field on a related object. For a custom formula field that uses the same
formula, the field’s value is derived when a process starts.
26
Automate Your Business Processes Process Builder
Tip: Parentheses aren’t included automatically when you insert a function. Be sure to add
parentheses, for example, TODAY(), when building a formula.
Unsupported Functions
If a formula in a process uses any of the following functions, the formula returns null.
• GETRECORDIDS
• IMAGE
• INCLUDE
• PARENTGROUPVAL
• PREVGROUPVAL
• REQUIRE SCRIPT
• VLOOKUP
For a complete list of operators and functions for building formulas in Salesforce, see Formula Operators and Functions by Context.
Note:
• If your process criteria uses a formula, don’t create a formula that always evaluates to true, such as 2 < 5.
27
Automate Your Business Processes Process Builder
• ISCHANGED is available as both a formula function and as an operator. When it’s used as a formula function in process criteria,
you can’t reference a child record’s related fields. For example, ISCHANGED isn’t supported when referencing a
[Case].Contact.AccountId field, but it can be used when referencing [Case].ContactId.
SEE ALSO:
Tips for Working with Picklist and Multi-Select Picklist Formula Fields
Process Builder Advanced Option Considerations
Tips for Working with Picklist and Multi-Select Picklist Formula Fields
Custom Metadata Types and Process Builder
28
Automate Your Business Processes Process Builder
• An org can process up to 1,000 groups of scheduled actions per hour. Available in: Essentials,
Professional, Enterprise,
Each group of scheduled actions is associated with a schedule, such as “3 days from now.” When
Performance, Unlimited,
a schedule is processed, the associated actions are executed. If an org exceeds this limit,
and Developer Editions
Salesforce processes the remaining schedules in the next hour.
For example, an org has 1,200 groups of pending actions scheduled to be processed between
4:00 and 5:00 PM. Salesforce processes 1,000 groups between 4:00 and 5:00 PM, and it processes the remaining 200 groups between
5:00 and 6:00 PM.
• An org can have up to 50,000 pending schedules and paused flow interviews at one time.
• If you set a schedule to 0 Days After a date, Salesforce executes the associated actions as soon as possible after the time
represented by the date field. Depending on how many actions Salesforce is processing at the time, actions are executed within
one hour.
• If the field referenced by a schedule has a null value, Salesforce ignores the schedule and the associated actions aren’t executed.
• When a process schedules an action, Salesforce creates a flow interview record and pauses the interview until the scheduled
time occurs. If the paused flow interview is deleted, Salesforce doesn't resume the paused flow interview, and the scheduled
action isn't executed.
Record-Change Processes
These considerations apply only to record-change processes.
When a record-change process executes a field-based schedule, Salesforce uses the field’s current value. If the value is a date/time
field, Salesforce uses the time zone of the user who created the process. If the value is a date field, Salesforce uses the org’s time
zone.
29
Automate Your Business Processes Process Builder
• For processes that start when a record is created, Salesforce never reevaluates the record associated with that process. The
scheduled time for the actions stays the same, even if the record no longer meets the associated criteria when the scheduled
actions are executed.
• If the record or object that the schedule is associated with is deleted, Salesforce cancels the scheduled actions for the record.
Limitations for Converted Leads
• You can’t convert a lead when an unexecuted schedule is based on one of the lead’s fields.
• When Validation and Triggers from Lead Convert is enabled, scheduled actions on leads aren’t executed during lead
conversion.
• If a lead is converted into a campaign member before the associated scheduled actions finish, Salesforce still executes the
scheduled actions.
Event Processes
These considerations apply only to event processes.
• When an event process executes a field-based schedule, Salesforce uses the field’s current value in the time zone of the user
who created the process.
• The scheduled time for the actions stays the same, even if the field value changes, the associated record or object is deleted, or
the record no longer meets the associated criteria.
• If the criteria are met when the process starts, Salesforce executes the scheduled actions.
30
Automate Your Business Processes Process Builder
Tip: Design a process with a scheduled action so that it doesn’t execute mixed DML operations. A single transaction can’t mix
DML operations on data objects (such as Account), Setup objects (such as User Role), and external objects. For example, you can’t
update an account and a user role in a single transaction.
If a process has more than one group of scheduled actions and a group fails to execute in a batch:
• Prior groups of scheduled actions in that batch’s transaction are successful.
• The immediate actions for that process are successful.
• All scheduled actions in that group aren’t executed.
• Each remaining group of scheduled actions in that batch is executed in a separate transaction.
Example: Salesforce processes two groups of scheduled actions in the same batch. In the first group, one action fails, so the
process fails. Subsequent actions within the first group aren't tried. Salesforce processes the second group in a separate transaction.
Note: The execution time is now in the past, so Salesforce executes the second group of scheduled actions within 1 hour.
31
Automate Your Business Processes Process Builder
• An org can execute up to 10,000 notification actions per hour. When you exceed this limit, no
more notifications are sent in that hour, and all unsent notifications are lost. Notification actions USER PERMISSIONS
resume in the next hour.
To create, edit, or view
For example, your notification action processes are triggered 10,250 times between 4:00 and processes:
4:59. Salesforce executes the first 10,000 of those actions. The remaining 250 notifications aren’t • Manage Flow
sent and are lost. Salesforce begins executing notification actions again at 5:00.
AND
• When you send a custom notification from a process, the Target ID for the notification is the View All Data
record that started the process. However, target records that don't have their own detail page
(for example, a case comment, which appears only in a Case Comment related list) don't support
direct navigation. Use Flow Builder to send the notification from a flow and specify either a different Target ID or Target Page Reference.
Tip: To see how to specify the target using JSON, see pageReference.
• Custom notification title and body fields support plain text only.
• The content of custom push notifications depends on the Display full content push notifications setting. If full content push notifications
aren’t enabled, only the notification title is sent.
32
Automate Your Business Processes Process Builder
For example, you want to transfer an account to a new owner. Add four Update Records actions Available in: Essentials,
to your process. The first updates the account. The second updates the child contacts. The third Professional, Enterprise,
updates the child opportunities. And the fourth updates the child contracts. Performance, Unlimited,
and Developer Editions
Multiple Updates to the Same Field
If multiple Update Records actions apply different values to the same field, the last action’s
value is used.
Multiple Currencies
If your org uses multiple currencies, the currency fields are updated using the record’s currency code. If you use a formula to update
a field, the formula values use the record’s currency code.
Inactive Users
Processes can't update records that are owned by inactive users. When you deactivate a user, also transfer that user's records to an
active user to avoid failed processes.
SEE ALSO:
Transferring Records
33
Automate Your Business Processes Process Builder
SEE ALSO:
Deploy Processes and Flows as Active
Example: When you upload 100 cases, the flow MyProcess_2 triggers one process for each case.
• 50 processes stop at Create a Record action Create_Task_1.
• The other 50 processes stop at Create a Record action Create_Task_2.
The result? At least two groups of bulk operations to execute.
• One for the 50 processes that execute Create_Task_1
34
Automate Your Business Processes Process Builder
Field Picker
Use the field picker to reference fields on the record that started the process or fields on related
EDITIONS
records.
To use fields on a related record, click a field with next to the value. For example, use the Account Available in: both Salesforce
ID field value on the case’s contact account. Classic and Lightning
Experience
The field picker displays only the fields that are compatible with the selected parameter.
If you see a field multiple times, that means the field can relate to multiple objects. For example, if you created a queue for cases, a case’s
owner can be either a user or a queue. Owner ID is a polymorphic field—a field that relates to more than one object.
35
Automate Your Business Processes Process Builder
To access a field on the case’s owner, choose the appropriate relationship. Be aware that if you select Owner ID (User) and the owner
of the record is a queue, the process fails.
Note: Queue labels aren't supported in process criteria. For example, you can't use [Lead].Owner:Queue.Name in process
criteria. Instead, use [Lead].Owner:Queue.DeveloperName to reference the queue's API name.
Note: These global constant values aren’t supported with the is null operator.
– $GlobalConstant.Null
– $GlobalConstant.EmptyString
Note: If your process is based on a user ID (for example, when an [Event].OwnerId equals a specific ID value) make sure that
the ID value is an 18-character ID and not a 15-character ID. You can convert a 15-character ID to 18 characters at
www.adminbooster.com/tool/15to18.
36
Automate Your Business Processes Process Builder
Refer to Tips for Working with Picklist and Multi-Select Picklist Formula Fields for more information.
When you reference a multi-select picklist field in an action, enter values by clicking Choose values…
Add or remove values by dragging them between the Available (1) and Selected (2) columns.
37
Automate Your Business Processes Process Builder
Keep these considerations in mind when using operators with multi-select picklists.
• You can use the Equals operator if you select only one value from a multi-select picklist field.
• If you use the Equals operator with multiple multi-select picklist values and choose the Any of the conditions are met (OR) option,
the condition matches on one value only. For example, if your process checks whether a Region field equals West or East, the condition
evaluates to true when the value is West or when the value is East, but won’t evaluate to true when both West and East are selected
values.
• If you use Contains and OR to evaluate multiple multi-select picklist values, the condition evaluates to true on multiple values. For
example, if your process checks whether a Region field contains West or East, the condition evaluates to true when a Region
field contains West and East or when a Region field contains West or East values.
38
Automate Your Business Processes Process Builder
– When a record is created, PRIORVALUE returns the current value as the prior value. When a record is updated, PRIORVALUE
returns the field value that was set immediately before the save operation started. If your process uses the PRIORVALUE formula
function and reevaluates a record multiple times in a single operation, the process may execute actions multiple times. If your
process reevaluates a record multiple times in a single save operation and executes actions only when specified criteria changes,
the prior value returns the values that existed before the record was saved.
For example, your process checks whether an account is created or updated.
1. When PRIORVALUE([Account].Type) = 'Prospect' evaluates to true, the process updates the account’s
annual revenue and posts to Chatter.
2. When an account is created with Prospect as the account type, the criteria is always true until the end of the process
transaction.
3. If the process is changed to update the account type to Other when the criteria is true, then for an account created with
Prospect as the account type, the formula PRIORVALUE([Account].Type) = 'Prospect' will be true
until the end of process transaction.
Each time the record is reevaluated, the prior value of the account’s type is Prospect. The result is six Chatter posts.
39
Automate Your Business Processes Process Builder
description in the same save operation, ISCHANGED evaluates to true every time the record is reevaluated because it compares
the account description value when the record was first created (a blank value) with whatever’s set for the current value.
Let’s say this same process creates a Chatter post every time ISCHANGED([Account].Description) evaluates to true. This process
would create a recursive loop resulting in six Chatter posts because ISCHANGED evaluates to true throughout the save operation.
If you choose this option, the process can evaluate the same record up to five additional times in Available in: Essentials,
a single save operation. It might reevaluate the record because a process, workflow rule, or flow Professional, Enterprise,
updated the record in the same save operation. When a record is reevaluated, the process uses the Performance, Unlimited,
most recent values for that record. and Developer Editions
For example, your sales review process includes multiple steps, approvals, notifications, and fields
that need to be updated. Some of these changes may be part of your process, or they may be
managed by other workflow rules or flows in your org. If you let the process reevaluate a record multiple times in a single save operation,
you can manage and evaluate all of these changes—even changes from other processes—in a single save operation in your process.
SEE ALSO:
Process Builder Advanced Option Considerations
40
Automate Your Business Processes Process Builder
Example: Let’s say you handle all of your case management in a single process. But you need to treat escalated cases for
high-revenue accounts differently from escalated cases for regular accounts. If the case is escalated by an account whose renewal
date is less than a month away, notify the account owner, the regional manager, and the VP of that region. If the case is escalated
by an account whose renewal date is more than a month away, notify only the account owner and the regional manager.
To do so, you build an invocable process. Let’s call it “Escalated Cases.” The process operates on the Case object and has two criteria
nodes.
• The first criteria node evaluates whether the associated account’s renewal date is less than a month away. When a case meets
that criteria, the process posts to the account’s feed with a link to the case and mentions the account owner, regional manager,
and regional VP.
• The second criteria node has no criteria. If a case doesn’t meet the first node’s criteria, the process performs the same action,
except that it doesn’t mention the regional VP.
Now back to the process that automates your case management. You already have a criteria node that checks whether the case
is escalated. Add a Processes action to that criteria’s action group, and configure the action to invoke the “Escalated Cases” process.
If Yes is... Actions are executed if... Actions are not executed if...
Selected • The record was created. • The record’s current values meet the conditions, and
• The record was updated. Its current values meet the the record’s most recent previous values met the
conditions, and its most recent previous values did not criteria.
meet the conditions. • The record’s current values don’t meet the conditions.
41
Automate Your Business Processes Process Builder
If Yes is... Actions are executed if... Actions are not executed if...
Deselected • The record was created. The record’s current values don’t meet the conditions.
SEE ALSO:
Process Builder Advanced Option Considerations
Create a Process
To create a process, define its properties and which records it should evaluate, and then add criteria
EDITIONS
nodes and actions.
Available in: both Salesforce
1. Define the Process Properties Classic and Lightning
The process properties uniquely identify your process. Experience
42
Automate Your Business Processes Process Builder
API Name The name that the API and managed packages use, up to 79 characters. To create, edit, or view
processes:
This name must be unique across all processes and flows. The name must
• Manage Flow
begin with a letter and use only alphanumeric characters and underscores.
It can’t include spaces, end with an underscore, or have two consecutive AND
underscores. View All Data
Important: After it’s saved, you can’t change the process’s API name.
The Identifies when the process begins. You can set your process to start when:
process • A record changes
starts
• A platform event message is received
when
• It’s invoked by another process
This field is available only when creating a new process.
43
Automate Your Business Processes Process Builder
Field Description
API Version Determines which versioned run-time behavior improvements the process adopts.
for Running Changing this field requires the Manage Flows permission. Before you select a new API version, review all
the Process run-time improvements that were delivered between the currently selected API version and the new API
version. You can find all flow and process run-time improvements for an API version in the Salesforce Release
Notes.
By default, when you create a process, it runs in the latest API version. If you clone an existing process as a
new process or process version, the existing process’s run-time API version is used in the new process or
process version.
The run-time API version doesn’t change as future Salesforce releases roll out. You decide when, if ever, to
change the API version for running each process. This field lets you test and upgrade your processes one by
one, and at your own pace. You can even opt to never adopt versioned updates for one or all your processes.
4. Click Save.
Record Change
USER PERMISSIONS
If the process starts when a record changes, associate the process with an object, and specify when
to start the process. To create, edit, or view
processes:
1. Click Add Object. • Manage Flow
2. Configure the trigger. AND
View All Data
For this field Select ...
...
Object The object that you want to base this process on. Click Find an object. Type
to filter the dropdown list.
44
Automate Your Business Processes Process Builder
Note: If you’re familiar with workflow rules and you’re wondering what happened to the third
option (created, and any time it’s edited to subsequently meet criteria), don’t worry! You see that
setting when you add criteria nodes if you selected when a record is created or edited.
Recursion - Allow Yes, if you want the process to evaluate a record multiple times in a single save operation. To see this field,
process to evaluate a expand the Advanced area.
record multiple times When enabled, the process can evaluate the same record up to five more times in a single save operation.
in a single save It might reevaluate the record because a process, workflow rule, or flow updated the record in the same
operation? save operation. For more information, see Reevaluate Records in the Process Builder on page 40.
3. Before saving your changes, confirm the selection because you can’t change the object after you save it.
Event
If the process starts when a platform event message is received, associate the process with a platform event and an object, and specify
matching conditions. Because every process acts on a Salesforce record, it requires a single record as a starting point. That way, the
criteria and actions know where to start evaluating and executing.
1. Click Add Trigger.
2. Configure the trigger.
Object The object whose records you want to associate with the event.
Matching Conditions Criteria to identify one record to associate the event with. We recommend using an ID or other field that
uniquely identifies records so the process can pick exactly one record.
The process fails if it finds:
• Multiple records that match the criteria.
• No records that match the criteria.
45
Automate Your Business Processes Process Builder
3. Before saving your changes, confirm the selection because you can’t change the platform event or object after you save it.
Invocable
If the process starts when another process invokes it, associate the process with an object.
1. Click Add Object.
2. Select an object to associate with the process. Type to filter the dropdown list.
This process can be invoked from any other process as long as the master process passes a record of this object type. For example,
an Account-based invocable process can be called from a Contact-based record change process, because you can pass the contact’s
account to the invocable process.
3. Before saving your changes, confirm the selection because you can’t change the object after you save it.
3. Select the type of criteria that you need to define. This selection determines which fields appear USER PERMISSIONS
later in the dialog box.
To create, edit, or view
If you need... Select processes:
• Manage Flow
The record to have certain field values. Conditions are
AND
met
View All Data
46
Automate Your Business Processes Process Builder
To simply execute the associated actions without evaluating the record. No criteria—just execute
The process executes all the actions that are associated with this criteria node and, unless you specify the actions!
otherwise, doesn’t evaluate any remaining criteria nodes in the process. If you choose to stop your
process after executing these actions, we recommend choosing this option for only the last criteria
node in your process.
Field Select the field whose value you want to evaluate. You can also evaluate values for records that are related to
the one that started the process. To do so, click on a related record with next to the ID field.
For example, if a contact record started the process, you can evaluate the value for the contact’s account’s
Annual Revenue field. To access that field, click Account Id , select Annual Revenue, and then
click Choose.
Type The available value types depend on the field’ data type.
Value Identify the value that you want to evaluate the field for. See Setting Values in the Process Builder on page 35
for details.
b. For Conditions, identify which conditions must be true for the process to execute the associated actions.
If you choose to use custom logic, enter up to 1000 characters by using:
• Numbers to refer to each condition
• AND, OR, or NOT to identify which combination of conditions must true
• Parentheses to group parts of the string together
For example, if you enter 1 AND NOT (2 OR 3), the outcome evaluates to true if the first condition is true and neither
the second nor third outcome is true.
47
Automate Your Business Processes Process Builder
Tip: Ambiguous logic may cause validation errors. To avoid ambiguity, use parentheses in your custom logic. For example:
• 1 AND 2 OR 3 results in an error
• 1 AND (2 AND 3) OR 4 doesn't result in an error
Note: This setting is available only if the process starts when a record is created or edited and you selected “Filter conditions
are met” or “Formula evaluates to true.”
7. Click Save.
SEE ALSO:
Execute Actions for Multiple Criteria
Invoke a process from another process. With invocable processes, you have the option of reuse View All Data
so that you don’t spend your time on repetitive work.
Create a Chatter Post from a Process
Post to the feed of a user, a Chatter group, or the record that started the process.
Use a Quick Action from a Process
Create a record, update a record, or log a call by using a quick action that you or another admin created for your organization.
Work with Quip from a Process
Create documents, chat rooms, and folders when important events occur. Attach a document to a record so your users have
information in context. Update your spreadsheets with the latest Salesforce data. Send a message to a chat room or document. Add
new slides to a deck, copy documents, add members to a document or chat, and more.
48
Automate Your Business Processes Process Builder
49
Automate Your Business Processes Process Builder
3. If you need to schedule actions after a certain number of days or hours from when the process is executed:
a. Select the second radio button.
b. Specify the number of days or hours from when the process is executed.
If the criteria for this action group are still met when this time occurs, Salesforce executes the scheduled actions.
50
Automate Your Business Processes Process Builder
2. For Record Type, select the object that you want to create a record for. To filter the To create, edit, or view
processes:
drop-down list, type the name of the object to filter the drop-down list.
• Manage Flow
When you select an object, at least one row appears to allow you to set field values for the new
AND
record.
View All Data
Warning: Rows appear automatically for fields required by the API. You might need to
provide values for other fields. We recommend that you refer to your organization's page
layouts to determine which fields are required.
Field Select the field whose value you want to set. To filter the drop-down list, type the name of the field.
Type Select the type of value that you want to use. The available types depend on the field that you’ve selected.
Value Set a value for the field. by using the text entry field to manually enter a value or the field picker to use a field value
from a related record. See Setting Values in the Process Builder on page 35 for details.
4. Click Save.
Tip:
• If you set up your process to create an account record, Name appears as a required field. If you want to create a person
account, you can add LastName as a field but it doesn’t appear as required by default. You can enter a dummy value
for the Name field.
• When you create a record, required fields normally appear at the top of the list. However, if you save a Create a Record
action, close the process, and then reopen the action, required fields may not appear in the normal order.
• If a platform event is configured to publish immediately, the process publishes each event message outside of the database
transaction. If the transaction fails and is rolled back, the event message is still published and can’t be rolled back. So if you
51
Automate Your Business Processes Process Builder
see an informational message under the selected platform event, consider whether you want the process to publish an
event message only after the transaction commits successfully.
SEE ALSO:
Platform Events Developer Guide: Decoupled Publishing and Subscription
Platform Events Developer Guide: Platform Event Fields
2. Select an invocable process. You can only select active invocable processes.
3. Select your process variable. Remember that you can only select fields related to the object associated with the process you invoke.
52
Automate Your Business Processes Process Builder
5. Fill out the message that you want to post. You can insert merge fields, add a topic, and mention
users or groups.
The message can contain up to 10,000 characters.
53
Automate Your Business Processes Process Builder
You can only reference topics that already exist. If you reference a merge field and that field doesn’t have a value, it appears as a
blank value.
SEE ALSO:
Chatter Settings
4. Fill out the message that you want to post. You can insert merge fields, add a topic, and mention To create, edit, or view
users or groups. processes:
• Manage Flow
The message can contain up to 10,000 characters.
AND
You can only reference topics that already exist. If you reference a merge field and that field
doesn’t have a value, it appears as a blank value. View All Data
SEE ALSO:
Chatter Settings
54
Automate Your Business Processes Process Builder
SEE ALSO:
Chatter Settings
USER PERMISSIONS
55
Automate Your Business Processes Process Builder
@[{!fieldReference}]
Example: To @mention a case’s account owner, navigate to the account’s fields and select Owner ID. Insert that field reference
between the square brackets in @[], so that the result is:
@[{![Case].Account.OwnerId}]
Object All object-specific actions in your organization that are associated with a
certain Object Name. Global actions can’t be filtered by object.
Type All object-specific and global actions in your organization based on the type,
such as Create a Record or Log a Call.
• If you selected Global actions or Type, for Type select the specific type of quick action that you want to use.
• If you selected Object, for Object search for and select the object that you want to filter by.
3. For Action, search for and select the action that you want to use.
4. Set field values for the action.
Rows that appear automatically represent the action’s required fields. To set values for the action’s optional fields, add rows.
56
Automate Your Business Processes Process Builder
Field Select the field whose value you want to set. To filter the drop-down list, type the name of the field.
You can set values for fields that are included in the action’s layout only.
Type Select the type of value that you want to use. The available types depend on the field that you’ve selected.
Value Set a value for the field. by using the text entry field to manually enter a value or the field picker to use a field
value from a related record. See Setting Values in the Process Builder on page 35 for details.
57
Automate Your Business Processes Process Builder
3. Enter the content that you want to add to your chat or document.
USER PERMISSIONS
This step is optional for new documents.
58
Automate Your Business Processes Process Builder
Add your document to multiple folders by adding commas between each folder URL.
USER PERMISSIONS
4. Save the action.
To create, edit, or view
processes:
• Manage Flow
AND
View All Data
2. Enter the URL of the document you want to move. To create, edit, or view
processes:
3. Enter the URL of the folder your document is in.
• Manage Flow
To remove a document from multiple folders, separate folder URLs with commas.
AND
Note: Removing a document from your Private folder removes your access to it. View All Data
59
Automate Your Business Processes Process Builder
USER PERMISSIONS
Note: To add a dynamic Salesforce record that updates based on the record that the document is embedded in, enter
the value as a Reference. To add a specific record, enter the numbers that appear in the record URL as a String.
b. The following steps are optional and used as placeholders if the record can’t be found.
c. Optional: Enter the Salesforce record name.
d. Optional: Enter the record type.
e. Optional: Enter the name of the Salesforce org.
Note: To add a dynamic Salesforce list view that updates based on the record that the document is embedded in, enter
the value as a Reference. To add a specific list view, enter the numbers that appear in the record URL as a String.
60
Automate Your Business Processes Process Builder
• The owner of a live app added by Process Builder to a template is the first user to open the copied document. Only the live app owner
can save changes to Salesforce. Other users can edit and comment on the live app, but these changes don’t sync to Salesforce.
Note: Newly copied documents aren’t automatically attached to the record. See step 5 USER PERMISSIONS
for more info.
To create, edit, or view
3. Use the Advanced section to enter a document title, add members by email address, or add processes:
• Manage Flow
the document to a specific parent folder.
AND
4. Save the action.
View All Data
61
Automate Your Business Processes Process Builder
5. Optional: To attach the newly created document to the record and use Synced Sharing, use the Attach Document to Record action
after the Copy Document action.
SEE ALSO:
Automate Pricing Proposals with Salesforce Flow
Automate Close Plans with Salesforce Flow
Add Opportunity Team Members to a Close Plan
Emails must belong to Quip users in the same Quip site as the acting user.
USER PERMISSIONS
4. Save the action.
To create, edit, or view
processes:
• Manage Flow
AND
View All Data
2. Enter the URL of the document or chat where you want to add members. To create, edit, or view
processes:
3. Enter the email addresses of the members you want to add based on the access level you want
• Manage Flow
to grant.
AND
You can enter up to 50 email addresses per access level. Emails must belong to Quip members
in the same Quip site as the acting member. View All Data
62
Automate Your Business Processes Process Builder
Full Access Full-access members can view, comment on, edit, and share
documents that they’re added to.
Edit Access Edit-access members can view, comment on, and edit documents
that they’re added to.
View Access View-access members can view documents that they’re added
to.
2. Enter the URL of the document you want to manage access to. To create, edit, or view
processes:
3. Enter the email addresses of the members you want to remove from the document.
• Manage Flow
You can enter up to 50 email addresses. Emails must belong to Quip members in the same
AND
Quip site as the acting member.
View All Data
4. Save the action.
63
Automate Your Business Processes Process Builder
4. Select the location in the document where you want to add content.
To add content after or before a section or to replace a section, enter the document section USER PERMISSIONS
anchor link. To create, edit, or view
5. Select the Content Type. processes:
• Manage Flow
6. Enter the new content.
AND
7. Optionally, select Disable Extra Lines in Quip to prevent Quip from automatically adding a
View All Data
blank line after each paragraph.
8. Save the action.
64
Automate Your Business Processes Process Builder
6. Enter the section text you want to reference using text detection.
7. Under Section Style, select whether the section text is a heading, paragraph, or list.
8. Select the content type.
9. Enter your new content.
10. Save your action.
65
Automate Your Business Processes Process Builder
3. Select the location in the document where you want to paste your content. Live pasted content can appear at the end or beginning
of a document, before or after a section, or can replace a document section.
4. To paste content at the beginning or end of a document, enter the target document URL. To paste content in a target document
based on a section, enter the anchor link of the section where you want your copied content to appear.
5. To have content copied with Live Paste automatically update in the target document, select Update Automatically.
6. Save the action.
66
Automate Your Business Processes Process Builder
b. Enter the document range heading. This is the heading text in your template that marks the start of a document range.
c. Enter your new content and save the action.
2. To live paste existing content to a template, select the Copy with Live Paste action.
a. Choose whether you want to copy content based on an anchor link or document range content type.
b. Enter the URL of the template or anchor link you want to copy content from.
c. To live paste content based on document range, select a document range placement. You can choose to paste your copied
content after a document range, before it, or you can replace it.
d. Enter the URL of the template where you want to paste your copied content.
e. Enter the document range heading of the target template that you want to use to place your copied content.
f. Save the action.
67
Automate Your Business Processes Process Builder
4. Select the location in the spreadsheet where you want to add content.
USER PERMISSIONS
5. To add content after a section, before a section, or to replace a section, enter the Section Anchor
Link. To create, edit, or view
6. Select Row or Column as the element type where you want to add content. processes:
• Manage Flow
7. Enter the new content.
AND
8. Save the action.
View All Data
68
Automate Your Business Processes Process Builder
USER PERMISSIONS
Note: Only users with full access to a document can lock or unlock edits.
2. Enter the anchor link URL of the section you want to lock. To create, edit, or view
processes:
3. To lock section edits, select Lock. To unlock section edits, select Unlock.
• Manage Flow
Note: Only users with full access to a document can lock or unlock section edits. AND
View All Data
4. Save the action.
69
Automate Your Business Processes Process Builder
3. Optional: To attach the PDF to a document, enter a target document URL. The PDF is added to AND
the end of the document. View All Data
4. To attach the PDF to a Salesforce record, enter the record’s Salesforce Organization ID and the
Target Record ID. PDFs attached to a record are added to the record’s Files component and
Notes and Attachments component, and are visible to any user with access to the record.
5. Save the action.
SEE ALSO:
Automate Pricing Proposals with Salesforce Flow
70
Automate Your Business Processes Process Builder
USER PERMISSIONS
3. Optionally, click Add Row to set values for the flow’s variables. USER PERMISSIONS
Type Select the type of value that you want to set. For example, select String to
manually enter the values for a Text collection variable, or select Reference
to use the value of a record for a record variable.
71
Automate Your Business Processes Process Builder
• For record collection variables, use the field picker to select a related list. The selected records’ object
type must match the record collection variable’s object. For example, populate an record collection
variable with all child contact records associated with the account that started the process.
Note: If the related list is empty when the flow tries to populate the record collection variable
with field values from those records, the process fails.
72
Automate Your Business Processes Process Builder
4. Write a helpful notification title and body using text and merge fields.
Note: The content of custom push notifications depends on the Display full content push notifications setting. If full content
push notifications are not enabled, only the notification title is sent.
73
Automate Your Business Processes Process Builder
Note: You can send email invitations for questions of the following types: Like or Dislike,
Net Promoter Score (NPS), Rating, and Score. USER PERMISSIONS
4. Select the email template used to send the invitation. To create, edit, or view
processes:
Important: The available templates depend on whether you choose to send a question • Manage Flow
or the survey link. AND
You can only send survey invitations to leads, contacts, and users in your org.
6. Select the recipient based on the object that's associated with the process.
7. Select your invitation settings.
8. Click Save.
Example: If you want to send an invitation to a case's contact, select Case as the object for the process, Contact as the recipient
type, and Contact ID as the recipient.
SEE ALSO:
Customize the Survey Invitation Email Templates
74
Automate Your Business Processes Process Builder
2. For Approval Process, indicate whether to submit the record through the default USER PERMISSIONS
approval process or through a specific approval process.
The process fails if: To create, edit, or view
processes:
• The record is submitted to the default approval process, and there are no active approval • Manage Flow
processes for the record’s object type.
AND
• The record is submitted to the default approval process, and it doesn’t meet the criteria for
View All Data
any of the approval processes for the record’s object type.
• The record is submitted to a specific approval process, and it doesn’t meet the entry criteria.
4. For Submitter, identify who receives notifications about the approval request.
Value Description
Current User The user who triggered the process by creating or editing a record.
User Field from a Record The user ID that’s stored in a field value on the record that’s being submitted for approval or another
record.
If the submitter isn’t an allowed initial submitter on the approval process that runs, the process fails. Make sure that the initial
submitters for the approval processes that are related to this object include all users who could trigger this process. For details about
setting the initial submitters for an approval process, see Create an Approval Process with the Standard Wizard on page 591.
Any user with the "Modify All" permission to the object is allowed to submit a record for approval. They are permitted to submit the
record, even if they aren’t listed as initial submitter.
5. If necessary, enter submission comments. Don’t reference merge fields or formula expressions.
Submission comments appear in the approval history for the specified record. This text also appears in the initial approval request
email if the template uses the {!ApprovalRequest.Comments} merge field.
75
Automate Your Business Processes Process Builder
• To update a record that’s related to the record that started the process, click the appropriate radio button and select one of the
field names in the drop-down list.
If you select a field that ends in “ID,” you’re selecting a single record. This field name corresponds to a lookup field on the original
record. For details on lookup fields, see Custom Field Types.
For example, if a case record started the process and you select Account Id, this action updates the account that’s associated
with the case.
76
Automate Your Business Processes Process Builder
If you select a plural item that doesn’t end in “ID,” you’re updating all the records of that object type that are related to the record
that started the process. This plural item corresponds to child records of the original record, which might appear in a related list
on the original record.
For example, if you select CaseComments, this action updates all the case comments that are related to the case.
• To update fields on a related record, click on a field with next to it (ending in “ID”) to access that record’s fields.
For example, let’s say that, for a process that evaluates a case record (1), you want to update all contacts that are related to the
case’s parent account. Click Account ID (2), then Contacts (3), and then Choose.
77
Automate Your Business Processes Process Builder
Note: When you define conditions for updating records, you can’t:
• Reference a Long Text Area field
• Reference a Rich Text field
• Reference a child record’s related fields
For example, you can reference [Case].ContactId, but not [Case].Contact.AccountId.
When you define multiple filters, the filter logic usually defaults to AND. However, if multiple filters have the same field
selected and use the equals operator, the filters are combined with OR. For example, your filters check whether a case’s
Type equals Problem (1), Type equals Feature Request (2), and Escalated equals true (3). At run time, the filters are combined
to (1 OR 2) AND 3.
If you’re updating the record that started the process, Process Builder adds an implicit filter for you in the background:
[Object].Id equals myCurrentVariable.Id. If you add filter criteria that set the record’s ID to a value
using the equals operator, at runtime the [Object].Id equals filters are combined using OR filter logic. For
example, you update the case that started the process and add this filter: [Case].Id equals 500D00000044XgV.
At runtime, your filter is combined with the implicit filter ([Case].Id equals myCurrentVariable.Id) with
OR.
Type The available value types depend on the field’ data type. See Process Builder Value Types on page 36 for details.
Value Identify the value that you want to evaluate the field for.
78
Automate Your Business Processes Process Builder
For example, if your process updates account records, you can choose to update only accounts with an annual revenue (1)
greater than (2) $1,000,000 (3).
Field Select the field whose value you want to set. To filter the drop-down list, type the name of the field.
You can assign values to fields only on the record or records that you identified in the Object field. Use a separate
Update Records action to update fields on related records.
Type Select the type of value that you want to use. The available types depend on the field that you’ve selected.
Value Set a value for the field. For example, if you select a Formula value type, click Build a formula... to create a formula
value for the field.
79
Automate Your Business Processes Process Builder
• To set a value for a primitive list variable (String, Integer, Time, and so on), select the String value type and enter a value in the
text input field. You can’t pass multiple values to lists.
4. Click Save.
Note: If you define an Apex action in your process and then modify the Apex class by adding a standard field reference (for
example, User.Phone), the Apex action is no longer visible in the process and must be added again.
80
Automate Your Business Processes Process Builder
SEE ALSO:
Reevaluate Records in the Process Builder
Process Management
Process Builder allows you to see and manage all your processes in one place.
EDITIONS
To manage a process, from Setup, enter Builder in the Quick Find box, then select Process
Builder. Available in: both Salesforce
Classic and Lightning
From the process management page, you can:
Experience
• Create a process
Available in: Essentials,
• Edit a process
Professional, Enterprise,
• Delete an inactive process Performance, Unlimited,
• See the status of your existing processes and Developer Editions
• Sort your processes by name, description, object, last modified date, or status
When you open a process, you can: USER PERMISSIONS
• Clone the process To manage processes:
• Activate or deactivate the process • Manage Flow
• Edit the process properties AND
From the list of paused flow interviews in Setup, you can: View All Data
81
Automate Your Business Processes Process Builder
Process Status
Each process has a status that determines whether the process can be edited, activated, or deleted.
EDITIONS
Status Description Editable? Available in: both Salesforce
Active The process has been activated. No Classic and Lightning
Experience
You can’t make changes to an active process. However, you can
clone it. Make any necessary changes to the cloned process and Available in: Essentials,
then activate it. Don’t forget to deactivate the original process if Professional, Enterprise,
appropriate. Performance, Unlimited,
and Developer Editions
Inactive The process is inactive and can be activated. Yes
Clone a Process
If you want to make changes to an existing process, save a clone of that process. You can save the
EDITIONS
clone as either a new inactive process with its own version history, or as a new inactive version of
the existing process. Available in: both Salesforce
To make changes to an active process, you have a few options. Classic and Lightning
Experience
• Deactivate it, make changes, and then reactivate it.
• Clone it as an inactive version, make changes, and then activate the new version. The original Available in: Essentials,
version is automatically deactivated. Professional, Enterprise,
Performance, Unlimited,
• Clone it as a new inactive process, make changes and then activate it. The original process is
and Developer Editions
not automatically deactivated, so consider whether it’s appropriate for both processes to be
active.
USER PERMISSIONS
You can create up to 50 versions of a process, but only one version of a given process can be active.
1. From Setup, enter Builder in the Quick Find box, then select Process Builder. To create, edit, or view
processes:
2. Open the process or process version that you want to activate.
• Manage Flow
3. Click Clone. AND
4. You can create a version of the current process or a completely new process with its own version View All Data
history.
5. Enter a name, API name, and description.
6. Click Save.
82
Automate Your Business Processes Process Builder
Activate a Process
Salesforce doesn’t start using a new or revised process to evaluate records until you activate it.
EDITIONS
After you activate a process, you can no longer edit it. However, you can click Clone to save the
process as a new inactive process. Available in: both Salesforce
Classic and Lightning
You can’t activate a process unless it has:
Experience
• At least one defined criteria node
Available in: Essentials,
• At least one defined immediate or scheduled action
Professional, Enterprise,
1. From Setup, enter Builder in the Quick Find box, then select Process Builder. Performance, Unlimited,
and Developer Editions
2. Open the process version that you want to activate.
3. Click Activate.
USER PERMISSIONS
If you activate a version of a process that already has an active version, the previously active
version is automatically deactivated. To see that version later, refer to the process’s version To activate or deactivate
history. processes:
• Manage Flow
After you’ve activated your process, consider creating or editing test records that will start the
process to make sure it’s working correctly. If you do, remember to delete those test records or AND
return them to their previous values once you’ve confirmed that your process works as designed. View All Data
If you later want Salesforce to stop using a process to evaluate records as they’re created or edited, AND
open the active process and click Deactivate. Customize Application
1. In Setup, enter Builder in the Quick Find box, then select Process Builder. Available in: Essentials,
2. Next to the appropriate process, click Professional, Enterprise,
to view all versions. Performance, Unlimited,
3. For the version that you want to delete, click Delete. and Developer Editions
If your process has only one version and you delete that version, the entire process is deleted.
To delete processes:
• Manage Flow
AND
View All Data
83
Automate Your Business Processes Process Builder
• Type—Processes that are waiting to execute scheduled actions are of type Record Change
Process.
SEE ALSO:
Delete Unexecuted Scheduled Actions
USER PERMISSIONS
SEE ALSO:
Monitor Your Processes’ Pending Scheduled Actions To delete unexecuted
scheduled actions:
• Manage Flow
84
Automate Your Business Processes Process Builder
Troubleshoot Processes
Use the error messages that appear in the Process Builder and the emails you receive when a process
EDITIONS
fails to help solve problems that arise when you’re working with processes. When all else fails, look
at the Apex debug logs for your processes. Available in: both Salesforce
Classic and Lightning
Common Reasons Why Processes Fail Experience
Here are some common design problems that cause processes to fail. Available in: Essentials,
Errors in the Process Builder Professional, Enterprise,
The API names for criteria nodes and actions are created in the background. When you create Performance, Unlimited,
or update processes, you might see error messages that reference those names to help you and Developer Editions
identify specifically where the problem occurred.
What Happens When a Process Fails?
When a user does something that triggers a process, such as create a record, and the process fails, the user gets an error message.
The error message includes the process name, error ID, and sometimes technical information that the user can give to you, the
Salesforce admin. You can use the error ID to locate the detailed error email that is sent when the process failed.
Troubleshoot Processes with Apex Debug Logs
Use debug logs to find detailed information about your running processes after they finish running. For example, investigate why
a process doesn’t to trigger when a record meets the process’s criteria, or explore the sequence of processes being executed.
Send Alerts When a Screen Flow Fails
To save time troubleshooting screen flows that fail, subscribe to the Flow Execution Error Event platform event. When a flow interview
fails, Salesforce publishes a platform event message. In Process Builder, you can subscribe to the platform event and perform actions,
such as posting to Chatter or sending custom notifications.
SEE ALSO:
Common Reasons Why Processes Fail
85
Automate Your Business Processes Process Builder
SEE ALSO:
Troubleshoot Processes
Errors in the Process Builder
What Happens When a Process Fails?
Example:
myVariable_current.AnnualRevenue refers to the value for the field AnnualRevenue when the record started
the process.
Note: Error or warning messages might refer to a “flow” instead of a “process.” Those messages still apply to your process.
SEE ALSO:
Common Reasons Why Processes Fail
86
Automate Your Business Processes Process Builder
Flow Details
Flow Name: Opportunity_Management
Type: Workflow
Version: 3
Status: Active
Org: Acme (00DR00000000o82)
// The user triggered version 3 of the Opportunity_Management
process.
ASSIGNMENT: myVariable_waitStartTimeAssignment
{!myVariable_waitStartTimeVariable} Equals
{!Flow.CurrentDateTime}
Result
{!myVariable_waitStartTimeVariable} = "2/2/2017 11:21 AM"
DECISION: myDecision
Executed this outcome: myRule_1
Outcome conditions: and
87
Automate Your Business Processes Process Builder
SEE ALSO:
Common Reasons Why Processes Fail
Send Alerts When a Screen Flow Fails
Control Who Receives Flow and Process Error Emails
88
Automate Your Business Processes Process Builder
Flows FLOW_ACTIONCALL_...
Processes FLOW_ACTIONCALL_...
Apex FLOW_ACTIONCALL_...
Schedule FLOW_WAIT_...
In this snippet, the process compares the record’s current values to the values it had before it was changed.
myVariable_current contains all the record’s current field values. myVariable_old contains all the field values of
the record immediately before it was changed. In this example,myVariable_old has no values (null), because the process is
evaluating a newly created lead.
10:11:26.594 (688919502)|WF_FORMULA|
Formula:ENCODED:[treatNullAsNull]true|Values:
10:11:26.594 (689128428)|WF_CRITERIA_END|
true
10:11:26.594 (695758445)|WF_SPOOL_ACTION_BEGIN|
Workflow
10:11:26.594 (714823342)|WF_ACTION|
Flow Trigger: 1;
10:11:26.594 (714900811)|WF_RULE_EVAL_END
10:11:26.594 (719777561)|WF_FLOW_ACTION_BEGIN|
09LR000000005Td10:11:26.594 (720281142)|WF_FLOW_ACTION_DETAIL|
89
Automate Your Business Processes Process Builder
10:11:26.750 (750700361)|FLOW_START_INTERVIEWS_BEGIN|1
10:11:26.750 (751285739)|FLOW_START_INTERVIEW_BEGIN|
2416dcc6212273331b3d50a38a161dd464e3e-7fdd|
Hello World
10:11:26.750 (751341782)|FLOW_START_INTERVIEW_LIMIT_USAGE|
SOQL queries: 0 out of 100
10:11:26.750 (751367432)|FLOW_START_INTERVIEW_LIMIT_USAGE|
SOQL query rows: 0 out of 50000
10:11:26.750 (751384035)|FLOW_START_INTERVIEW_LIMIT_USAGE|
SOSL queries: 0 out of 20
10:11:26.750 (751397896)|FLOW_START_INTERVIEW_LIMIT_USAGE|
DML statements: 0 out of 150
10:11:26.750 (751412225)|FLOW_START_INTERVIEW_LIMIT_USAGE|
DML rows: 0 out of 10000
10:11:26.750 (751427529)|FLOW_START_INTERVIEW_LIMIT_USAGE|
CPU time in ms: 0 out of 15000
10:11:26.750 (751472968)|FLOW_START_INTERVIEW_LIMIT_USAGE|
Heap size in bytes: 0 out of 6000000
10:11:26.750 (751490226)|FLOW_START_INTERVIEW_LIMIT_USAGE|
Callouts: 0 out of 100
10:11:26.750 (751505266)|FLOW_START_INTERVIEW_LIMIT_USAGE|
Email invocations: 0 out of 10
10:11:26.750 (751519128)|FLOW_START_INTERVIEW_LIMIT_USAGE|
Future calls: 0 out of 50
10:11:26.750 (751533892)|FLOW_START_INTERVIEW_LIMIT_USAGE|
Jobs in queue: 0 out of 50
10:11:26.750 (751547542)|FLOW_START_INTERVIEW_LIMIT_USAGE|
90
Automate Your Business Processes Process Builder
2416dcc6212273331b3d50a38a161dd464e3e-7fdd|myVariable_waitStartTimeVariable|2018-02-28T18:11:27Z
10:11:26.750 (756182849)|FLOW_ELEMENT_END|
2416dcc6212273331b3d50a38a161dd464e3e-7fdd|
FlowAssignment|myVariable_waitStartTimeAssignment
91
Automate Your Business Processes Process Builder
In this snippet, the immediate actions for the first criteria are executed. In the name myRule_1_A1, “A1” indicates that this
element corresponds to the first action in the action group, which creates a task. The FLOW_BULK_ELEMENT_LIMIT_USAGE
events indicate that the action increased the transaction's usage count toward two limits: the number of DML statements issued
and the number DML rows processed.
10:11:26.750 (1898050716)|FLOW_ELEMENT_BEGIN|
68211d9d9f918ee32db47d21247161de215ce5-7d38|
FlowRecordCreate|myRule_1_A1
10:11:26.750 (1898121764)|FLOW_ELEMENT_DEFERRED|
FlowRecordCreate|myRule_1_A1
10:11:26.750 (1898261705)|FLOW_ELEMENT_END|
68211d9d9f918ee32db47d21247161de215ce5-7d38|
FlowRecordCreate|myRule_1_A1
10:11:26.750 (1345712687)|FLOW_START_INTERVIEW_END|
68211d9d9f918ee32db47d21247161de215ce5-7d38|Hello World
10:11:26.750 (1898350543)|FLOW_BULK_ELEMENT_BEGIN|
FlowRecordCreate|myRule_1_A1
10:11:26.750 (1928183118)|FLOW_BULK_ELEMENT_DETAIL|
FlowRecordCreate|myRule_1_A1|1
10:11:26.750 (2267557291)|FLOW_VALUE_ASSIGNMENT|
68211d9d9f918ee32db47d21247161de215ce5-7d38|
myRule_1_A1|true
10:11:26.750 (2267878414)|FLOW_BULK_ELEMENT_LIMIT_USAGE|
1 DML statements, total 1 out of 150
10:11:26.750 (2267929106)|FLOW_BULK_ELEMENT_LIMIT_USAGE|
1 DML rows, total 1 out of 10000
10:11:26.750 (2268002776)|FLOW_BULK_ELEMENT_END|
FlowRecordCreate|myRule_1_A1|1|370
10:11:27.989 (1989764561)|WF_FLOW_ACTION_END|09LR000000005Td
10:11:27.989 (1998560773)|WF_ACTIONS_END| Flow Trigger: 1;
10:11:27.989 (1998600044)|CODE_UNIT_FINISHED|Workflow:Lead
10:11:27.989 (2000437095)|EXECUTION_FINISHED
92
Automate Your Business Processes Process Builder
• The myVariable_current variable is updated with the latest values from the record that started the process originally.
10:21:35.461 (1461109547)|FLOW_BULK_ELEMENT_BEGIN|
WaitInfo|myWait_myRule_1
10:21:35.461 (1467206801)|FLOW_WAIT_EVENT_RESUMING_DETAIL|
2ef1ba5afce469a1e74b7b869161e25400a2-7f29|
myWait_myRule_1|myWaitEvent_myWait_myRule_1_event_0|DateRefAlarmEvent
10:21:35.461 (1467428864)|FLOW_WAIT_RESUMING_DETAIL|
2ef1ba5afce469a1e74b7b869161e25400a2-7f29|
myWait_myRule_1|0FoRM0000004C9I
10:21:35.461 (1503485017)|FLOW_VALUE_ASSIGNMENT|
2ef1ba5afce469a1e74b7b869161e25400a2-7f29|
myWaitEvent_myWait_myRule_1_event_0|true
10:21:35.461 (1509382975)|FLOW_VALUE_ASSIGNMENT|
2ef1ba5afce469a1e74b7b869161e25400a2-7f29|
myVariable_current|{Id=00QRM000003abIU2AY, IsDeleted=false,
MasterRecordId=null, Salutation=null, FirstName=Another, LastName=Lead,
Title=null, Company=Acme, Street=null, City=null, State=null, PostalCode=null,
Country=null, Latitude=null, Longitude=null, GeocodeAccuracy=null, Phone=null,
MobilePhone=null, Fax=null, Email=null, Website=null, PhotoUrl=null,
Description=null, LeadSource=Advertisement, Status=New, Industry=null,
Rating=null, AnnualRevenue=null, NumberOfEmployees=null, InternalSource=null,
OwnerId=005RM000001cEmFYAU, HasOptedOutOfEmail=false, IsConverted=false,
ConvertedDate=null, ConvertedAccountId=null, ConvertedContactId=null,
ConvertedOpportunityId=null, IsUnreadByOwner=false,
CreatedDate=2018-03-01 18:12:05, CreatedById=005RM000001cEmFYAU,
LastModifiedDate=2018-03-01 18:12:05, LastModifiedById=005RM000001cEmFYAU,
SystemModstamp=2018-03-01 18:12:05, LastActivityDate=null, DoNotCall=false,
CreatedByID=005RM000001cEmFYAU, LastModifiedByID=005RM000001cEmFYAU,
CampaignId=null, CampaignMemberStatus=null, HasOptedOutOfFax=false,
LastViewedDate=null, LastReferencedDate=null,
LastTransferDate=2018-03-01 18:12:05, Jigsaw=null, JigsawContactId=null,
ConnectionReceivedDate=null, ConnectionSentDate=null, EmailBouncedReason=null,
EmailBouncedDate=null}
10:21:35.461 (1512457819)|FLOW_BULK_ELEMENT_END|
WaitInfo|myWait_myRule_1|0|47
In this snippet, the process makes sure that the record's date field isn't null. Specifically, it checks the date field that's referenced
in the schedule.
10:21:35.461 (1514489368)|FLOW_ELEMENT_BEGIN|
2ef1ba5afce469a1e74b7b869161e25400a2-7f29|
FlowDecision|myPostWaitDecision_myWaitEvent_myWait_myRule_1_event_0
10:21:35.461 (1528928534)|FLOW_RULE_DETAIL|
2ef1ba5afce469a1e74b7b869161e25400a2-7f29|
myPostWaitRule_myWaitEvent_myWait_myRule_1_event_0|true
10:21:35.461 (1529027007)|FLOW_VALUE_ASSIGNMENT|
2ef1ba5afce469a1e74b7b869161e25400a2-7f29|
myPostWaitRule_myWaitEvent_myWait_myRule_1_event_0|true
10:21:35.461 (1529230456)|FLOW_ELEMENT_END|
2ef1ba5afce469a1e74b7b869161e25400a2-7f29|
FlowDecision|myPostWaitDecision_myWaitEvent_myWait_myRule_1_event_0
Now to execute the actions associated with the schedule. First up is ..._myRule_1_event_0_SA1.
93
Automate Your Business Processes Process Builder
This snippet displays some internal logic that Process Builder performs for you. The process uses a variable to note that it has
executed the action for this schedule, so that it doesn't accidentally duplicate the action.
10:21:41.527 (7529131090)|FLOW_ELEMENT_BEGIN|
2ef1ba5afce469a1e74b7b869161e25400a2-7f29|
FlowAssignment|myWaitEvent_myWait_myRule_1_event_0_postWaitExecutionAssignment
10:21:41.527 (7529875281)|FLOW_ASSIGNMENT_DETAIL|
2ef1ba5afce469a1e74b7b869161e25400a2-7f29|
myWaitEvent_myWait_myRule_1_event_0_postActionExecutionVariable|ASSIGN|true
10:21:41.527 (7529943822)|FLOW_VALUE_ASSIGNMENT|
2ef1ba5afce469a1e74b7b869161e25400a2-7f29|
myWaitEvent_myWait_myRule_1_event_0_postActionExecutionVariable|true
10:21:41.527 (7530040052)|FLOW_ELEMENT_END|
2ef1ba5afce469a1e74b7b869161e25400a2-7f29|
FlowAssignment|myWaitEvent_myWait_myRule_1_event_0_postWaitExecutionAssignment
Then the process evaluates whether to execute any of the other schedules. Notice that the conditions are no longer met for
..._event_0. Because of the variable assignment in the previous snippet, the process doesn't re-execute the actions associated
with that schedule.
There's only one schedule, so the process finishes.
10:21:41.527 (7530094566)|FLOW_ELEMENT_BEGIN|
2ef1ba5afce469a1e74b7b869161e25400a2-7f29|
WaitInfo|myWait_myRule_1
10:21:41.527 (7530148328)|FLOW_ELEMENT_DEFERRED|
94
Automate Your Business Processes Flows
WaitInfo|myWait_myRule_1
10:21:41.527 (7530225216)|FLOW_ELEMENT_END|
2ef1ba5afce469a1e74b7b869161e25400a2-7f29|
WaitInfo|myWait_myRule_1
10:21:41.527 (7530291079)|FLOW_BULK_ELEMENT_BEGIN|
WaitInfo|myWait_myRule_1
10:21:41.527 (7530832531)|FLOW_WAIT_EVENT_WAITING_DETAIL|
2ef1ba5afce469a1e74b7b869161e25400a2-7f29|
myWait_myRule_1|myWaitEvent_myWait_myRule_1_event_0|DateRefAlarmEvent|false
10:21:41.527 (7530895796)|FLOW_WAIT_WAITING_DETAIL|
2ef1ba5afce469a1e74b7b869161e25400a2-7f29|
myWait_myRule_1|0|
10:21:41.527 (7530968776)|FLOW_VALUE_ASSIGNMENT|
2ef1ba5afce469a1e74b7b869161e25400a2-7f29|
myWaitEvent_myWait_myRule_1_event_0|false
10:21:41.527 (7531068544)|FLOW_BULK_ELEMENT_END|
WaitInfo|myWait_myRule_1|0|1
SEE ALSO:
Troubleshoot Processes
2. Configure a process trigger for a platform event on page 45. Available in: Essentials,
3. Add the process criteria on page 46. Professional, Enterprise,
Performance, Unlimited,
4. Create a Chatter post on page 53, or send a custom notification on page 73. and Developer Editions
SEE ALSO:
Create a Process
Troubleshoot Processes
Platform Events Developer Guide: FlowExecutionErrorEvent
Flows
A flow is the part of Salesforce Flow that collects data and performs actions in your Salesforce org or an external system. Salesforce Flow
provides two types of flows: screen flows and autolaunched flows.
To automate a business process that collects data from people, use a screen flow. For example, create a guided tutorial or wizard with
screens.
To launch a flow internally when a record changes or when a user clicks a button, use an autolaunched flow. For example, add automation
to your page or app to perform an action to a record when a user clicks a button.
95
Automate Your Business Processes Flows
Flow Builder
Get to know Flow Builder’s requirements and user interface.
Flow Concepts
If you’re new to flows, in need of a review, or just curious, dive in and learn about what a flow is made of and how it’s different from
workflow rules.
Flow Best Practices
Before you begin building and distributing flows, understand the best practices.
Build a Flow
After you model the process that you want to automate, design and build the flow in Flow Builder.
Test a Flow
Before you activate a flow, test it thoroughly to make sure that it works as expected.
Distribute a Flow
Once you’ve designed and tested your flow, it’s time to put it to work! Flows can be executed in several ways, depending on who
the flow is designed for. Internal users, external users, or systems can run a flow, or a flow can be deployed for another organization.
Flow Interviews
A flow interview is a running instance of a flow. A flow is an application built by your administrator that asks you for inputs and does
something in Salesforce based on those inputs.
Monitor Flows and Processes
Monitor your org’s usage of flows and processes. See a list of paused interviews and scheduled actions from processes. Control who
can view and how they view monitoring information for flows and processes.
Troubleshoot Flows
To troubleshoot a failed flow interview, use the flow fault email. To debug the flow and observe what happens as it runs, use the
debug option in Flow Builder. To view the failed flow interview in an interactive environment, click Flow Error: Click here to debug
the error in Flow Builder in the flow fault email.
Flow Limits and Considerations
When designing, managing, and running flows, consider the permissions, use limits, and data issues.
Flow Reference
Bookmark this page for quick access to information about flow elements, resources, events, and more.
SEE ALSO:
Which Automation Tool Do I Use?
Building Blocks of Flows
Browser Requirements
96
Automate Your Business Processes Flows
Flow Builder
Get to know Flow Builder’s requirements and user interface.
EDITIONS
Tour the Flow Builder User Interface Available in: both Salesforce
Classic and Lightning
Experience
USER PERMISSIONS
97
Automate Your Business Processes Flows
Canvas (2)
Build a flow on the canvas. As you add elements to the canvas and connect them, you can see a diagram of your flow. In auto-layout,
click on a connector to add an element, or click an element to see options for that element, such as Copy Element or Delete
Element.
Toolbox (3)
• In free-form, use the Elements tab to add new elements such as Screen and Create Records.
• In free-form and auto-layout, use the Manager tab to create variables, stages, choices, and other resources to use in your flow.
Or view a list of all elements and resources that you added.
Keyboard Shortcuts
Use these handy keyboard shortcuts for macOS and Windows to quickly navigate flows.
SEE ALSO:
Flow Elements
Flow Resources
Browser Requirements
Flow Concepts
If you’re new to flows, in need of a review, or just curious, dive in and learn about what a flow is made of and how it’s different from
workflow rules.
98
Automate Your Business Processes Flows
• Each element (1) represents an action that the flow can execute. Examples include reading or writing Salesforce data, displaying
information to and collecting data from flow users, executing logic, or manipulating data.
• Each connector (2) defines an available path that the flow can take at run time.
• Each resource (3) represents a value that you can reference throughout the flow.
SEE ALSO:
Flow Elements
Flow Resources
Flow Connectors
99
Automate Your Business Processes Flows
Flow Types
A flow or flow version’s type determines which elements and resources are supported and the ways
EDITIONS
that the flow can be distributed.
Available in: both Salesforce
Standard Flow Types Classic and Lightning
Experience
These flow types are supported in Flow Builder.
Available in: Essentials,
Type Description Available Distribution Supported Professional, Enterprise,
Methods in Performance, Unlimited,
Translation and Developer Editions
Workbench
Screen Flow Requires user interaction • Flow actions
because it includes screens, local
• Lightning pages
actions, steps, choices, or
dynamic choices. Screen flows • Experience Builder pages
don’t support Pause elements. • Custom Aura components
• Custom Lightning web
components
• Custom buttons or custom
links
• Flow Orchestrator (Beta)
• Web tabs
• Direct flow URLs
• Visualforce pages
• Lightning Out
• Embedded Service
deployments
100
Automate Your Business Processes Flows
Recommendation Builds a personalized list of recommendations • Einstein Next Best Action component on
Strategy for users. When a user responds to a Lightning pages
recommendation, that recommendation
• Suggested Actions component on
launches its assigned flow. Used by Einstein
Experience Cloud pages
Next Best Action.
• Visualforce pages
User Provisioning Provisions users for third-party services. A user provisioning flow can only be
Flow For example, use this flow type to customize implemented by associating it with a
the user provisioning configuration for a connected app when running the User
connected app to link Salesforce users with Provisioning Wizard.
their Google Apps accounts.
Field Service Requires user interaction because it has one Field Service mobile app
Mobile Flow or more screens.
Field Service Requires user interaction because it has one Embedded Appointment Booking
Embedded Flow or more screens.
Contact Request Requires user interaction because it has one Use one of these Experience Builder
Flow or more screens. components to add this flow.
• Contact Request Button & Flow—launch
the flow in a window
• Flow—embed the flow directly on the
page
Checkout Flow Used in Lightning B2B Commerce to create a Use the following Experience Builder
checkout for your store. Requires user component to add this flow to your store.
interaction because it has one or more screens.
• Checkout
Loyalty Used to create flows that are triggered by Loyalty Management app
Management Flow loyalty program processes. Doesn’t require
101
Automate Your Business Processes Flows
Type Description
Invocable Process A process, created in Process Builder, that starts when it’s called from another process.
Platform Event A process, created in Process Builder, that starts when a particular platform event message is received.
Process
Record Change A process, created in Process Builder, that starts when a record is created or edited for a particular object.
Process
SEE ALSO:
Flow Version Properties
User Provisioning for Connected Apps
Triggers for Autolaunched Flows
102
Automate Your Business Processes Flows
SEE ALSO:
Apex Developer Guide: Triggers and Order of Execution
In Flow Trigger Explorer, select an object (1) and a trigger (2) to see flows that run when a record for that object is created, updated, or
deleted. See all of the before-save (3) and after-save flows (4) that run for the same object and trigger. Click a flow label (5) to open the
flow in Flow Builder in a new tab. See any asynchronous paths (6) that are associated with flows that run for the same object and trigger.
Click a menu dropdown and select Flow Details and Versions (7) to see details and activate or deactivate versions of the flow (8).
103
Automate Your Business Processes Flows
A flow interview runs for each record in the batch and stores all of the record’s field values in the Available in: Essentials,
$Record global variable. As you build the scheduled flow, reference the $Record global Professional, Enterprise,
variable to access the record’s field values. Performance, Unlimited,
and Developer Editions
If you configure an Update Records element to use the ID and all field values from the $Record
global variable, enable Filter inaccessible fields from flow requests in
your org’s process automation settings. Otherwise, the flow fails because the Update Records
element tries to set the values for system fields and other read-only fields.
You can monitor scheduled flows from the Scheduled Jobs page in Setup.
SEE ALSO:
Schedule-Triggered Flow Considerations
Troubleshooting Considerations for Flows
104
Automate Your Business Processes Flows
Perhaps you’re familiar with Apex triggers. A flow that makes before-save updates is similar to a before trigger. The previously
described record-change process is similar to an after trigger. In a save procedure, before-save updates in flows are executed
immediately prior to Apex before triggers.
Because of their speed, we recommend that you use before-save updates in flows to update fields on new or changed records. However,
sometimes you must use a record-change process or an Apex after trigger to:
• Access field values that are set only after the record is saved, such as the Last Modified Date field or the ID of the new record.
• Create or update related records.
• Perform actions other than updating the record that launches the flow.
Flows that make before-save updates are typically simpler to build than other types of flows.
• The $Record global variable contains the values from the record that triggers the flow to run. As a result, there’s no need to add
a Get Records element to obtain the record data nor create flow variables to store the record data.
• When the flow changes the values in the $Record global variable, Salesforce automatically applies those new values to the record.
So there’s no need to add an Update Records element to save the new values to the database.
• Only these elements are supported: Assignment, Decision, Get Records, and Loop. These elements let you obtain data from other
Salesforce records, and use them to decide whether to update the triggering record’s fields and to what values.
SEE ALSO:
Record-Triggered Flow Considerations
Apex Developer Guide : Triggers and Order of Execution
• When you save a before- or after-save record-triggered flow, specify a trigger order value from Available in: Essentials,
1 to 2,000. If a flow is already saved, specify a trigger order value in the flow’s version properties. Professional, Enterprise,
Performance, Unlimited,
and Developer Editions
Guidelines for Defining the Run Order of Record-Triggered Flows for an Object
Learn guidelines for configuring a record-triggered flow to run before or after another
record-triggered flow.
105
Automate Your Business Processes Flows
Guidelines for Defining the Run Order of Record-Triggered Flows for an Object
Learn guidelines for configuring a record-triggered flow to run before or after another
EDITIONS
record-triggered flow.
• You can define a trigger order values only for before-save or after-save flows on an object. Available in: both Salesforce
Trigger order affects only the specified object's flows with the same trigger type. Classic and Lightning
Experience
• Trigger order values always respect order of execution rules. For example, you can make an
after-save flow run before other after-save flows, but you can’t make an after-save flow run Available in: Essentials,
before a before-save flow or an Apex trigger, even if the trigger order value is lower. Professional, Enterprise,
• Flows with the same trigger (before- or after-save) on the same object with trigger order values Performance, Unlimited,
from 1 to 1,000 run in ascending order (1, 2, 3, and so on). Multiple flows with the same trigger and Developer Editions
order value run in alphabetical order based on the flows’ API names.
• Flows without trigger order values run next and in the order of their created dates. Flows created
in Winter ’22 and earlier run in this order, unless you define a trigger order value for them.
• Flows with trigger order values from 1,001 to 2,000 run next and in ascending order. Multiple flows with the same trigger order value
run in alphabetical order based on the flows’ API names.
• When you order a large number of flows, a best practice is to evenly distribute the trigger order values, for example, 10, 20, 30, or
100, 200, 300. Then later, you can easily slot another flow in between, for example, between 10 and 20. This practice can help you
avoid changing the trigger order values for preexisting flows.
• Activating, deactivating, or changing the order for one flow can cause the order for other flows to automatically update. Ordering
record-triggered flows has no direct effect on any associated scheduled or asynchronous paths.
SEE ALSO:
Apex Developer Guide: Triggers and Order of Execution
106
Automate Your Business Processes Flows
Note: You may also have heard the term Visual Workflow. That’s a retired product name for designing, managing, and running
flows. Visual Workflow has been superseded by Salesforce Flow. Salesforce Flow is the product that encompasses building,
managing, and running flows and processes.
SEE ALSO:
Which Automation Tool Do I Use?
Workflow
Flows
107
Automate Your Business Processes Flows
SEE ALSO:
Which Context Do Flows Run In?
Always Run in System Context
Customize What Happens When a Flow Fails
SEE ALSO:
Flow Version Properties
108
Automate Your Business Processes Flows
Flow Environments
A flow environment specifies where a flow can run. For example, if a flow is associated with the
EDITIONS
Slack flow environment, you can enable users to launch the flow from Slack.
Flows can have these environments. Available in: both Salesforce
Classic and Lightning
Default
Experience
The flow can run offline or from a Visualforce component, Lightning page, flow action, or custom
Aura component. Available in: Essentials,
Slack Professional, Enterprise,
Performance, Unlimited,
The flow can run in Slack and the default environment. You specify the Slack flow environment
and Developer Editions
when you save the flow. Then, you use the Slack Send Message to Launch Flow action in a
different flow to enable users to run the flow from Slack.
You can determine the current environment of a flow from the Flows page of Setup and from the detailed view of a flow. For example:
109
Automate Your Business Processes Flows
Note: This feature is a Beta Service. Customer may opt to try such Beta Service in its sole discretion. Any use of the Beta Service
is subject to the applicable Beta Services Terms provided at Agreements and Terms.
Slack does not support the address, checkbox, checkbox group, currency, date, date and time, dependent picklist, display image, email,
file upload, long text area, lookup, multi-select picklist, name, number, password, phone, slider, text, toggle, URL, or section screen
components.
1. Create a screen flow that contains only supported screen flow components, and click Save.
The Save the flow dialog box appears.
2. Select Make Available in Slack (Beta), fill in the fields, and click Save.
3. Create a different flow, and add the Slack Send Message to Launch Flow action to the flow.
There’s a Slack Send Message to Launch Flow action for each flow in the org that you can send to Slack.
The New Action dialog box appears.
110
Automate Your Business Processes Flows
SEE ALSO:
Flow Core Actions for Slack: Send Message to Launch Flow (Beta)
Flow Types
Build a Flow
Activate or Deactivate a Flow
Flow Environments
111
Automate Your Business Processes Flows
112
Automate Your Business Processes Flows
SEE ALSO:
Redirect Flow Users with a Local Action
Customize a Flow URL to Control Finish Behavior
Customize a Visualforce Component to Control the Flow's Finish Behavior
Example: A flow creates a lead using information entered in the Lead Info screen. Then it executes the Open Lead local action,
which passes the lead ID into an Aura component by using the Record ID attribute. The component uses a Lightning event to
open the created lead.
113
Automate Your Business Processes Flows
Let’s look at the Aura component that the local action calls: c:navigateToRecord.
Component Markup
<aura:component implements="force:lightningQuickAction,
lightning:availableForFlowActions">
<aura:attribute name="recordId" type="String" />
</aura:component>
Design Resource
The recordId attribute is declared in the design resource so that it’s configurable in the local action.
<design:component>
<design:attribute name="recordId" label="Record ID" />
</design:component>
Client-Side Controller
When the local action is executed, the flow calls the invoke method, which uses the force:navigateToSObject event
to navigate to the created record.
({ invoke : function(component, event, helper) {
// Get the record ID attribute
var record = component.get("v.recordId");
SEE ALSO:
What Happens When a Flow Finishes?
Lightning Aura Components Developer Guide : Runtime Considerations for Flows That Include Aura Components
114
Automate Your Business Processes Flows
Flows in Transactions
Each flow interview runs in the context of a transaction. A transaction represents a set of operations that are executed as a single unit.
For example, a transaction can execute Apex triggers and escalation rules in addition to a flow interview. If one interview in a transaction
fails, all the interviews in the transaction are rolled back, as well as anything else the transaction did. The transaction doesn’t retry any
of the operations—including the flow interview.
In each transaction, Salesforce enforces governor limits to prevent shared resources from being depleted. Because multiple Salesforce
organizations share the same resources, Salesforce prevents one organization from depleting all the resources and leaving the other
organizations high and dry. It’s similar to an apartment building that uses one cache of water to service every tenant. If your neighbor
uses all the water, you can’t take a shower. (It’s trite, but hopefully you get the idea.) Per-transaction governor limits help prevent such
things from happening.
SEE ALSO:
Flow Bulkification in Transactions
Per-Transaction Flow Limits
Process Limits
Interview.start() method If the method starts via a before or after trigger, the
transaction starts when a record is created or updated.
Otherwise, the transaction starts when the method (or a parent
method) is invoked.
The start() method shares its limits with other operations in
the transaction and other methods in the class.
REST API (Custom Actions or Flows resource) When the REST call is made. Depending on how the REST call is
implemented, the limits can be shared with other operations.
115
Automate Your Business Processes Flows
1
The same also applies if the flow is distributed through a workflow rule. The pilot program for flow trigger workflow actions is closed.
If you've already enabled the pilot in your org, you can continue to create and edit flow trigger workflow actions. If you didn't enable
the pilot in your org, use Flow Builder to create a record-triggered flow, or use Process Builder to launch a flow from a process.
Note: When a Screen element, local action, or Pause element is executed, the existing transaction ends and a new one begins.
Tip: If you think that a flow’s interview is likely to hit governor limits within its transaction, consider adding a Screen, Local Action,
or Pause element.
If the interview is one of many things being done in a given transaction, that interview shares the transaction’s governor limits with the
other operations.
Example: You update 100 cases through Data Loader. Due to the order of execution in a transaction and the customizations in
your organization, here’s what happens.
3 Case escalation rules are executed. If any case has been open for 10 days, an
email is sent to the owner.
4 Process is started.
6 If the account is hot, process uses Chatter to notify the account owner that there’s
a new case associated with the account.
8 Flow interview looks up the parent account and how many cases it has.
9 Flow interview checks whether the account has more than five open cases.
10 If it does, flow interview looks up the account’s division manager then posts on
the account’s Chatter feed to notify the division manager and account owner.
116
Automate Your Business Processes Flows
SEE ALSO:
Apex Developer Guide : Triggers and Order of Execution
SEE ALSO:
Flows in Transactions
117
Automate Your Business Processes Flows
Example: When you upload 100 cases, the flow MyFlow_2 triggers one interview for each case.
• 50 interviews stop at Create Records element Create_Task_1.
• The other 50 interviews stop at Create Records element Create_Task_2.
The result? At least two groups of bulk operations to execute.
• One for the 50 interviews that execute Create_Task_1
• One for the 50 interviews that execute Create_Task_2
Note:
• Unlike Apex actions, legacy Apex actions aren’t bulkified.
• Although Apex actions are bulkified, the flow has no way of knowing what the invoked methods’ operations are. If you want
those operations to also be bulkified, make sure the code follows bulkification best practices.
SEE ALSO:
Apex Developer Guide : Running Apex with Governor Execution Limits
118
Automate Your Business Processes Flows
The flow:
1. Looks up the case’s parent account and how many open cases that account has.
2. Checks whether the account has more than five cases open.
3. If the account has more than five open cases:
a. Looks up the division manager for the account.
b. Posts on the account’s Chatter feed to notify the division manager and the account owner.
4. If the account has five or fewer open cases, posts on the account’s Chatter feed to notify only the account owner.
119
Automate Your Business Processes Flows
The second interview is evaluated by the Decision element (2). This account has one case, so the interview is routed down the “5 or
fewer” path. The interview proceeds to the Post to Chatter core action (4). This element is also bulkifiable, so the interview waits there.
After all the interviews have been processed, 30 are waiting to execute the second Get Records element (3a) and the remaining 70 are
waiting to execute the Post to Chatter core action (4).
Salesforce executes all the Get Records (3a) operations for the first 30 interviews together. Instead of 30 separate SOQL queries, the
transaction issues one.
Next, the transaction returns to the Post to Chatter core action (4), where the 70 interviews are ready to execute their Post to Chatter
operations. Remember, these are the interviews whose accounts don’t have more than five cases. Salesforce executes the Post to Chatter
operations together. Instead of 100 separate DML statements to create each Chatter post, the transaction issues one DML statement to
create all 100 posts at one time. Because the Post to Chatter core action isn’t connected to a subsequent element, those 70 interviews
finish.
The 30 interviews—which looked up the relevant division manager—proceed to the final Post to Chatter core action (3b). When all 30
interviews are ready, Salesforce executes all 30 Post to Chatter operations together. Instead of issuing 30 separate DML statements for
the individual Chatter posts, it issues one. Because the Post to Chatter core action isn’t connected to another element, those 30 interviews
finish.
SEE ALSO:
Considerations for the Apex-Defined Data Type
120
Automate Your Business Processes Flows
121
Automate Your Business Processes Flows
Build a Flow
After you model the process that you want to automate, design and build the flow in Flow Builder.
EDITIONS
Tip: Before you start creating your flow, plan it out. It’s much easier to use a flow to automate
a business process when you understand all the details. Available in: both Salesforce
Classic and Lightning
If you’re new to Flow Builder or process automation, take a quick tour of the interface, and then Experience
check out our trails! They’re a great way to learn about these powerful tools and discover how they
work. Available in: Essentials,
Professional, Enterprise,
• Tour the Flow Builder User Interface Performance, Unlimited,
• Automate Your Business Processes with Salesforce Flow and Developer Editions
• Build Flows with Flow Builder
1. Open Flow Builder. From Setup, in the Quick Find box, enter Flows, select Flows, and then USER PERMISSIONS
click New Flow.
To open, edit, or create a
2. Select the flow type, then click Next. flow in Flow Builder:
3. Add the elements that you want to use to the canvas. • Manage Flow
4. If building in free-form, connect the elements to determine their order of execution. If building
in auto-layout, connectors are automatically created on the canvas for you.
5. Save your flow.
After you build a flow, make sure that it’s working as you expect it to by testing it. Then activate the flow. You’re now ready to distribute
the flow to users.
122
Automate Your Business Processes Flows
SEE ALSO:
Flow Runtime Accessibility Considerations
Building Blocks of Flows
123
Automate Your Business Processes Flows
Any Condition If one of the conditions is true, the flow immediately If one of the conditions is true, the flow waits for the
Is Met takes this outcome’s path. associated resume event.
Custom When you select this option, provide the condition logic by entering up to 1000 characters. Use:
Condition Logic • Numbers to refer to each condition
Is Met
• AND, OR, or NOT to identify which combination of conditions must true
• Parentheses to group parts of the string together
Tip: If you enter AND, it’s the same as if you selected All Conditions Are Met. If you enter OR,
it’s the same as if you selected Any Condition Is Met. If you enter any other logic, make sure that
you include a number for each condition.
124
Automate Your Business Processes Flows
SEE ALSO:
Flow Pause Conditions
Flow Element: Decision
125
Automate Your Business Processes Flows
Example:
• Automate a process for records where the closed date changed for US-based accounts with more than 100 employees.
• Automate a process for new case records for Premier support accounts in AMER or EMEA with a revenue of over $1M.
SEE ALSO:
Flow Element: Start
126
Automate Your Business Processes Flows
Route a Flow
Identify which elements the flow executes and in what order by connecting the elements on your
EDITIONS
canvas together.
Available in: both Salesforce
Classic and Lightning
Experience
USER PERMISSIONS
You can’t directly move elements in auto-layout, so to change an element’s location, copy the Available in: Essentials,
element, paste it to its new location, and then delete the original element. Professional, Enterprise,
Performance, Unlimited,
1. Click the element that you want to move.
and Developer Editions
2. Select Copy Element.
3. Click in the desired location for that element. USER PERMISSIONS
4. Select Paste Copied Elements.
To open, edit, or create a
5. Click the original copied element, then select Delete Element. flow in Flow Builder:
• Manage Flow
Move Multiple Elements in Auto-Layout
To move multiple elements, select all the elements that you want to move, copy them, paste them to their new location, and then delete
the original elements.
1. Click Select Elements.
2. Click on each element that you want to move.
3. To copy the selected elements, click .
4. Click in the desired location for the elements.
5. Select Paste Copied Elements.
6. For each copied element, click the element, then select Delete Element.
127
Automate Your Business Processes Flows
SEE ALSO:
Flow Connectors
Customize What Happens When a Flow Fails
SEE ALSO:
Flow Connectors
Flow Elements
Route a Flow
128
Automate Your Business Processes Flows
The running user can’t proceed with the flow or return to a previous part of the flow. The admin who created the flow receives a fault
email. The email details the element that failed, the error message from that element, and which elements were executed during the
failed interview. Here’s an example error message.
An error occurred at element Delete_1.
DELETE --- There is nothing in Salesforce matching your
delete criteria.
To view the debug details directly in Flow Builder, click Flow Error: Click here to debug the error in Flow Builder in the fault email.
This link appears only for certain flow types.
For screen flows, Salesforce publishes a Flow Execution Error Event platform event message.
SEE ALSO:
Send Alerts When a Screen Flow Fails
Customize What Happens When a Flow Fails
Emails About Flow Errors
129
Automate Your Business Processes Flows
USER PERMISSIONS
Error: {!$Flow.FaultMessage}
RESOURCE VALUES
Customer Response: {!Customer_Response}
Value of Decision's Yes outcome: {!Yes}
Company: {!Company_Name}
Satisfaction : {!Satisfaction}
Service: {!Service}
Other Comments:
{!OtherComments}
2. Configure a Send Email core action. Use the text template as the body and your email address as the recipient.
In this example, Body is set to the text template we created: {!allVariableValues}.
3. From each element that can fail, draw a fault connecter to the Send Email core action.
In this example, Create Records is the only element that supports fault connectors.
130
Automate Your Business Processes Flows
SEE ALSO:
Flow Resource: Text Template
Flow Core Action: Send Email
Customize What Happens When a Flow Fails
Customize the Error Message for Running Flow Users (Best Practice)
As a best practice, we recommend displaying a better message to your user than “An unhandled
EDITIONS
fault has occurred in this flow”. Do this only if the distribution method you’re using supports flows
that contain screens. In other words, don’t do it if your flow is distributed through a process. Available in: both Salesforce
1. Create a text template that contains a friendlier error message. Classic and Lightning
Experience
USER PERMISSIONS
2. Add a Screen element. In a Display Text screen component, reference the text template.
131
Automate Your Business Processes Flows
3. For every element that can fail, draw a fault connector to the Screen element.
SEE ALSO:
Flow Screen Output Component: Display Text
Flow Resource: Text Template
Customize What Happens When a Flow Fails
Create a Case
When an error occurs, automatically create a case that includes the error message and assign it to your IT department. Assign the
created case’s number to a Text variable ({!caseNumber}, for example). Then, in a Screen, display this message to the running
user.
Sorry, but you can’t read or update records at this time.
We filed case {!caseNumber} for you.
Ignore Errors
To bypass errors for a given element in your flow, draw the fault connector to the same element as the normal connector.
SEE ALSO:
Customize What Happens When a Flow Fails
132
Automate Your Business Processes Flows
133
Automate Your Business Processes Flows
External objects
Apex
Quick Action Only fields that are included in the Quick Indicated Doesn’t let you store the created
(of type Action layout. Requiredness is based on what's record's ID for use later.
Create) If you supplied default values for certain marked required in the action
fields when you created the quick action, layout.
those values are used when the record
is created.
Tip: Use a Quick Action element when all these statements are true.
1. The action is of type Create.
2. The action’s layout includes all the fields that you want to update.
3. You don't need to reference the new record's ID later in the flow.
Otherwise, use the Create Records element.
134
Automate Your Business Processes Flows
Example: Here’s how you’d create a case when a customer’s satisfaction score is too low by using each of the create elements.
Create Records
You can set any field on the record, but the Create Records element doesn’t know which fields are required
for this object.
These fields are the only fields that you can set for this element, because they’re the only ones available
from the action layout.
135
Automate Your Business Processes Flows
3. Add a Create Records element to your flow. Choose to create one record and set the record fields by using all the values from a
record variable. Select the second record variable to populate the values of the cloned record.
SEE ALSO:
Flow Element: Create Records
Example: On an opportunity record, when a user clicks the “Won” button, a flow updates Available in: both Salesforce
the opportunity’s stage. Classic and Lightning
Experience
To update fields on one or more existing Salesforce records, your flow:
Available in: Essentials,
1. Identifies the records to update.
Professional, Enterprise,
2. Identifies the new field values for those records. Performance, Unlimited,
and Developer Editions
3. Saves those changes to the Salesforce database. (In other words, until the changes are saved
to the database, the changes exist only within the flow.)
To identify records to update To identify new field values for the records Number of records
it updates
Update In the same element, use filter In the same element, map each field that should be At least one.
Records, where criteria. updated with a variable or other resource.
you chose to All resources are supported, so long as the resource’s
specify data type matches the selected field’s data type.
conditions and
set fields
individually
Update Populate a record variable or record In another element, such as an Assignment element, If an record variable:
Records, where collection variable in another update the values in the record variable or record one.
you chose to element. collection variable. If an record collection
use the IDs and variable: at least one.
field values
from a record
variable or
record
collection
variable
136
Automate Your Business Processes Flows
To identify records to update To identify new field values for the records Number of records
it updates
Quick Action Populate a single-value variable with In the same element, map each field that should be Exactly one.
the ID in another element. Use this updated with a variable or other resource.
ID for the Related Record ID All resources are supported, so long as the resource’s
parameter. data type matches the selected field’s data type.
If all the following statements are true, use a Quick Action element:
• You need to update exactly one record
• You’ve already populated a variable with the record’s ID
• The Quick Action’s layout includes all the fields you need to update
If any of those statements aren’t true, use an Update Records element.
Example: Here’s how you’d update an opportunity’s stage by using each of the update elements.
Update Records,
where you chose to
specify conditions
and set fields
individually
Update Records,
where you chose to
use the IDs and
Assumes {!svarOpportunity} is already populated with the right fields.
field values from a
record variable or
record collection
variable
137
Automate Your Business Processes Flows
Two fields are required by the associated action layout, so they’re required in this element. Related Record
ID identifies which opportunity to update.
SEE ALSO:
Flow Elements
• The $Flow.ActiveStages global variable identifies all the stages that are relevant to Available in: Essentials,
the flow’s current path. Professional, Enterprise,
• The $Flow.CurrentStage global variable identifies which stage the flow is at. Make sure Performance, Unlimited,
that this stage is included in $Flow.ActiveStages. and Developer Editions
138
Automate Your Business Processes Flows
Example: The Online Purchase flow includes stages for users to review their cart, enter shipping details, enter payment details,
and confirm their order. The stages display at run time using a custom screen component.
At this point, $Flow.ActiveStages contains the Review Cart, Shipping Details, Payment Details, and Order Confirmation
stages, and $Flow.CurrentStage is set to Review Cart.
SEE ALSO:
Flow Stage Considerations
Example: Your flow has five sections: Review Cart, Shipping Details, Billing Details, Payment
Details, and Order Confirmation. The corresponding stages are in the same order.
If the user’s billing details are the same as the shipping details, the flow skips the Billing Details
section. The other sections are required for every permutation of the flow. So configure Review
Cart, Shipping Details, Payment Details, and Order Confirmation to be active by default.
139
Automate Your Business Processes Flows
SEE ALSO:
Flow Stage Considerations
USER PERMISSIONS
• To add stages to $Flow.ActiveStages, use an Assignment element with one of these Available in: Essentials,
operators. Professional, Enterprise,
Performance, Unlimited,
Operator Description and Developer Editions
140
Automate Your Business Processes Flows
• To add a stage to $Flow.ActiveStages in between two other stages, define it as a default active stage in another flow. Then
use a Subflow element to call the second flow.
• To remove stages from $Flow.ActiveStages, use an Assignment element with one of these operators.
Operator Description
remove after first Removes all stages after the first instance of a specified stage.
remove before first Removes all stages before the first instance of a specified stage.
• To change what’s selected as $Flow.CurrentStage, use an Assignment element with the equals operator. Make sure that
the selected stage is included in $Flow.ActiveStages.
• To count the number of active stages and assign that number to a variable, use an Assignment element with the equals count
operator.
To reference a stage in another flow, enter the fully qualified stage name: flowName:stageName or
namespace.flowName:stageName. At run time, the assignment works only if a Subflow element calls the stage’s flow.
SEE ALSO:
Flow Resource: $Flow Global Variables
Flow Element: Assignment
Flow Operators in Assignment Elements
Flow Stage Considerations
• Screen component—When you map a stage to a screen component attribute, the flow passes Available in: Essentials,
the stage’s label into the attribute. Professional, Enterprise,
• lightning:flow component—The onstatuschange attribute in the standard Performance, Unlimited,
lightning:flow component returns the names and labels for the flow’s active stages and current and Developer Editions
stage.
SEE ALSO:
Lightning Aura Components Developer Guide : Display Flow Stages with an Aura Component
Lightning Aura Components Developer Guide : Display Flow Stages By Adding a Progress Indicator to a Flow Screen
141
Automate Your Business Processes Flows
Extend Flows with the Apex-Defined Data Type Available in: Enterprise,
Using a combination of Apex, flow, and Lightning components, you can automate business Performance, Unlimited,
processes that involve complex data objects typically returned from calls to web services. For and Developer Editions
example, get external product data about a web product and then create records in Salesforce.
142
Automate Your Business Processes Flows
Element name in Class name or the value of the name property. Class name
Flow Builder
Reusability Classes with this interface implemented are available Classes with this annotation implemented are available
in flows in:
• Flows
• Processes
• Rest API
More Details in Passing Data to a Flow Using the InvocableMethod Annotation and
Apex Developer Process.Plugin Interface InvocableVariable Annotation
Guide
Example: To illustrate the difference between these two implementation methods, here are two classes that do the same thing:
get an account name from a flow and return that account’s ID.
This class implements the @InvocableMethod annotation.
Note: If a flow invokes Apex, the running user must have the corresponding Apex class assignment in their profile or
permission set.
global class lookUpAccountAnnotation {
@InvocableMethod
public static List<String> getAccountIds(List<String> names) {
List<Id> accountIds = new List<Id>();
List<Account> accounts = [SELECT Id FROM Account WHERE Name in :names];
for (Account account : accounts) {
accountIds.add(account.Id);
}
return accountIds;
}
}
143
Automate Your Business Processes Flows
Notice that lookupAccountAnnotation is less than half the length (11 lines) of lookupAccountPlugin (28 lines).
In addition, because the annotation supports bulk operations, lookupAccountAnnotation performs one query per batch
of interviews. lookupAccountPlugin performs one query per interview.
SEE ALSO:
Flow Elements
{
"model": "Vintage Cruiser Jacket",
"brand": "Acme",
"identifiers": [
{
"SKU": "A-J001"
},
144
Automate Your Business Processes Flows
{
"SKU": "A-J002"
},
{
"SKU": "A-J003"
}
],
"price": {
"amount": {
"currencyValue": "500.00",
"name": "Amount",
"currency": "USD"
},
"salesUnit": {
"code": "EA",
"name": "Each"
}
}
}
SEE ALSO:
Considerations for the Apex-Defined Data Type
Flow Resource: Variable
Apex Developer Guide : AuraEnabled Annotation
Apex Developer Guide : Invoking HTTP Callouts
Apex Developer Guide : JSON Parsing
145
Automate Your Business Processes Flows
Example: Here’s an example of a WebProduct Apex template. It contains the main WebProduct class and classes for Price
and Identifiers. WebProduct has three types of data.
• The model and brand fields use the primitive String data type.
• The price field references the Price class. Make sure that you save each class in separate class files because inner classes
aren’t supported in the Apex-defined data type for flows.
• The identifiers field is similar to price, but is represented as a List. The Identifiers class lets a flow access
JSON arrays to represent a list of three specific SKU numbers.
• The parse method carries out the conversion of the JSON to the flow-accessible Apex objects.
• Fields in an Apex class for flows require the @AuraEnabled annotation.
public class WebProduct {
@AuraEnabled
public String model;
@AuraEnabled
public String brand;
//This field has an Apex-defined data type in the Price Apex class.
@AuraEnabled
public Price price;
@AuraEnabled
public String SKU;
The Price Apex class defines the amount and salesUnit fields.
public class Price {
//This field has an Apex-defined data type in the Amount Apex class.
@AuraEnabled
public Amount amount;
//This field has an Apex-defined data type in the SalesUnit Apex class.
@AuraEnabled
public SalesUnit salesUnit;
146
Automate Your Business Processes Flows
The Amount Apex class defines the currencyValue, name, and currency fields.
public class Amount {
@AuraEnabled
public String currencyValue;
@AuraEnabled
public String name;
@AuraEnabled
public String currency;
The SalesUnit Apex class defines the code and name fields.
public class SalesUnit {
@AuraEnabled
public String code;
@AuraEnabled
public String name;
147
Automate Your Business Processes Flows
@InvocableVariable
global String endpoint;
}
148
Automate Your Business Processes Flows
d="M12,44c-1.657,0-3-1.343-3-3V7c0-1.657,1.343-3,3-3h16l11,11v26c0,1.657-1.343,3-3,3H12z"/><path
fill="#5e35b1" d="M39 15L28.883 14.125 39 24.124z"/><path fill="#b39ddb"
d="M39,15h-8c-1.657,0-3-1.343-3-3V4L39,15z"/><path fill="#f5f5f5" d="M22 23H32V25H22zM22
28H32V30H22zM22 33H32V35H22zM17.5 22.5A1.5 1.5 0 1 0 17.5 25.5 1.5 1.5 0 1 0 17.5 22.5zM17.5
27.5A1.5 1.5 0 1 0 17.5 30.5 1.5 1.5 0 1 0 17.5 27.5zM17.5 32.5A1.5 1.5 0 1 0 17.5 35.5
1.5 1.5 0 1 0 17.5 32.5z"/></svg>
Only Standard Object and Custom Object SLDS icons are supported as custom icons for Apex-defined invocable actions.
1. If you’re using an SVG file, upload the file as a static resource in your org.
2. Set the iconName attribute of the InvocableMethod annotation for the invocable action to the name of the icon.
• For SVG icons, specify the name as resource:namespace__iconName:svgID. For example:
public class CustomSvgIcon {
@InvocableMethod(iconName='resource:google:top')
public static void run() {}
@InvocableMethod(label='myIcon' iconName='resource:myPackageNamespace__google:top')
global static List<Integer> myMethod(List<Integer> request) {
List<Integer> results = new List<Integer>();
results.add(1);
return results;
– iconName is the name that you specified when you uploaded the icon.
– svgID is the value of the id attribute of the <svg> element in the SVG file.
– namespace is the namespace of the package that includes the invocable action to customize. If the invocable action is
in a managed package, namespace__ is a required prefix . Otherwise, it’s optional. To use a custom icon for an invocable
action in a managed package, declare the method that defines the invocable action as global.
@InvocableMethod(iconName='slds:standard:choice')
public static void run() {}
category is the name of the category of the icon. name is the name of the file in SLDS.
149
Automate Your Business Processes Flows
When a user adds the invocable action in Flow Builder, the custom icon appears on the Flow Builder canvas to represent it.
SEE ALSO:
Defining Static Resources
150
Automate Your Business Processes Flows
When you have the appropriate screen component in your org, add it to your flow screen.
1. In Flow Builder, open an existing screen, or add a Screen element to the canvas.
2. From the list of screen components, drag the appropriate component onto the screen canvas.
If a screen component is built from a Lightning component, it has a lightning bolt icon next to its name.
3. Use values from the flow to set the screen component’s attributes.
4. To use values from the screen component as resources later in the flow, start typing the API name of the screen component.
We automatically store all the attribute values in a variable with the same name as the screen component’s API name.
To store the action’s output values manually, select Manually assign variables (advanced).
Tip: By default, screen components that require Lightning runtime have no memory. If a user enters a value, navigates to another
screen, and returns to the component’s screen, the user-entered value is lost. To enable a flow to remember the value of an
attribute, set the attribute. The flow stores the value automatically. If you store values manually, store the attribute’s output value
in a variable.
SEE ALSO:
Available Screen Components
Lightning Web Components Dev Guide: Configure a Component for Flow Screens
Lightning Aura Components Developer Guide: Customize Flow Screens Using Aura Components
Extend Flows with Lightning Components
151
Automate Your Business Processes Flows
SEE ALSO:
Lightning Aura Components Developer Guide: Create Flow Local Actions Using Aura Components
Extend Flows with Lightning Components
Add and Edit Elements
152
Automate Your Business Processes Flows
Test a Flow
Before you activate a flow, test it thoroughly to make sure that it works as expected.
EDITIONS
We recommend that you test all possible paths through the flow, so that you can find errors before
they affect your users. For example, if users or inputs don't provide all the data that your flow requires, Available in: both Salesforce
the flow can fail. Add fault connectors to provide paths for users or the flow logic to correct the Classic and Lightning
data so that the flow can successfully finish. Experience
Warning: If you debug a flow without choosing to run the flow in rollback mode, the flow Available in: Essentials,
performs its actions, including any DML operations and Apex code execution. Remember, Professional, Enterprise,
closing or restarting a running flow doesn’t roll back its previously executed actions, callouts, Performance, Unlimited,
and changes committed to the database. and Developer Editions
1. From Setup, enter Flows in the Quick Find box, then select Flows.
USER PERMISSIONS
2. Open the relevant version of the flow.
3. Save your changes. To run a flow in Flow Builder:
Unsaved changes aren't executed when you test the flow. To run a flow from the flow
detail page:
4. Choose one of these options. To open, edit, or create a
• To create and save a flow test for a record-triggered flow and see details of the test run, flow test in Flow Builder:
click View Tests (Beta), and then click Create. • Manage Flow
• To set input variables or see debug details as the flow runs, click Debug. To debug a flow or view test
run details in Flow Builder:
If you opt to view debug details, the flow is rendered in Lightning runtime even if Lightning
• View All Data
runtime isn't enabled for the org.
To create a test from the debug run, click Convert to Test.
• To use the runtime experience determined by your process automation settings, click the Run button.
You can't set input variables or see debug details. It runs the active version of each flow called by Subflow elements. If a referenced
flow has no active version, this option runs the latest version of the referenced flow.
Note: In Lightning runtime, flow users always run the active flow version. Flow admins with the Manage Flow permission
run the latest flow, so they can test the latest flow version without activating it for flow users. A flow admin also runs the latest
flow version that is referenced via a Subflow element.
When you’re confident that your flow is working as expected, activate the version that you tested and distribute the flow.
SEE ALSO:
Debug a Flow in Flow Builder
Lightning Runtime vs. Classic Runtime for Flows
Customize What Happens When a Flow Fails
Flows in Transactions
Troubleshooting Considerations for Flows
153
Automate Your Business Processes Flows
4. Click Run.
If you opt to show details, they appear in a panel on the right.
154
Automate Your Business Processes Flows
5. (Optional) To restart the flow using the same values for input variables that you entered earlier, click Run Again.
6. (Optional) To restart the flow with different values for input variables, finish the flow and click Change Inputs.
SEE ALSO:
Troubleshooting Considerations for Flows
Distribute a Flow
Once you’ve designed and tested your flow, it’s time to put it to work! Flows can be executed in several ways, depending on who the
flow is designed for. Internal users, external users, or systems can run a flow, or a flow can be deployed for another organization.
155
Automate Your Business Processes Flows
156
Automate Your Business Processes Flows
To override the default behavior, from the Flows node in setup, click the next to your flow, then click the new Edit Access link
to select the profiles for each flow.
157
Automate Your Business Processes Flows
You can also use the profile or permission set detail page to set access to flows. The Guest User profile must be updated this way.
Permission to access a flow is checked only at the entry points, when a flow starts or resumes.
Permission for a flow is checked only at the top level. For example, flow A calls flow B. User X has a profile that can access flow A but not
flow B. User X can execute flow B, but only through flow A; user X can’t execute flow B directly.
By default, the ability to resume a flow interview is restricted to the user that started the flow. To grant access to a flow interview beyond
the user that started it, use flow interview sharing rules. Remember, the resuming user must also have the appropriate permission. If
Override default behavior and restrict access to enabled profiles or permission sets is selected, the resuming user must have
access to the individual flow via their profile or a permission set.
SEE ALSO:
Sharing Rules
158
Automate Your Business Processes Flows
Run from an Apex method of a custom Aura component controller Depends on code
159
Automate Your Business Processes Flows
SEE ALSO:
Running User of a Flow
Always Run in System Context
160
Automate Your Business Processes Flows
SEE ALSO:
Set the Runtime Experience for URL-Based Flows
161
Automate Your Business Processes Flows
Share the Flow URL or Create a Custom Button, Link, or Web Tab
Users in your org who don’t need a customized look and feel can run the flow via its URL. Distribute a flow URL directly or through
a custom button, link, or Web tab.
Embed a Flow in a Custom Aura Component
To customize how your flow gets and receives data, add it to a custom Aura component. Then distribute that component through
a custom action, Lightning tab, or Lightning page.
Embed a Flow in a Visualforce Page
To customize your flow’s look and feel for internal users, add the flow to a Visualforce page. Then distribute that page through a
Visualforce tab, custom button, or custom link.
Prepare Your Org for Paused Flow Interviews
A flow interview is a running instance of a flow. Not every flow interview can be completed in one go. Add the Pause button to your
flows, so that users can pause flow interviews for later. Update the sharing model for flow interviews, so that other users can resume
a paused interviews. And make it easy for users to resume interviews by adding a component to their Home page.
Note:
• Starting in Winter ’23, two-column flow layouts are ignored. For a better layout option, add Section components to
your flow screens. Each Section component lets you organize record fields and screen components in up to four
adjustable-width columns.
• If a flow screen contains a Section component, that screen ignores the Layout property.
Input variables
If you see other properties, they’re the flow’s input variables. Variables appear only if they allow input access.
162
Automate Your Business Processes Flows
SEE ALSO:
Two-Column Flow Considerations
Flow Screen Output Component: Section
1. From the management settings for the object for which you want to create an action, go to Buttons, Links, and Actions.
2. Click New Action.
3. For Action Type, select Flow.
4. Select the flow to use in your action.
The flow must be active and of type “Screen Flow” or “Field Service Mobile Flow”.
163
Automate Your Business Processes Flows
10. Hang on, you’re not done yet! To make your action available to your users, add it to a page layout.
Want the action to send the record’s ID to your flow? Make sure that the flow has a variable with these settings.
Note: If you delete an action, the action is removed from all layouts that it’s assigned to. If you deactivate a flow referenced in an
action, the action doesn’t appear at run time.
SEE ALSO:
Lightning Flow for Service Developer Guide (English only)
Available in: Essentials, Professional, Enterprise, Performance, Unlimited, and Developer Editions
1. From Setup, in the Quick Find box, enter App, then select App Manager.
2. Edit an existing Lightning App or click New Lightning App. You can also upgrade a custom Classic App to a Lightning app.
3. Under App Settings, click Utility Items.
4. Click Add Utility Item, then select Flow.
5. Configure the utility item properties and the component properties.
Flow
Only active screen flows are available. Flows built in the Desktop Flow Designer aren’t supported.
Layout
By default, flows display in one column.
164
Automate Your Business Processes Flows
Note:
• Starting in Winter ’23, two-column flow layouts are ignored. For a better layout option, add Section components to
your flow screens. Each Section component lets you organize record fields and screen components in up to four
adjustable-width columns.
• If a flow screen contains a Section component, that screen ignores the Layout property.
Tip: If a Section component has three or more columns, give the flow’s utility item enough space to display the flow’s columns.
To do so, increase the value of the Panel Width property on the flow’s utility item.
SEE ALSO:
Two-Column Flow Considerations
Flow Screen Output Component: Section
Share the Flow URL or Create a Custom Button, Link, or Web Tab
Users in your org who don’t need a customized look and feel can run the flow via its URL. Distribute
EDITIONS
a flow URL directly or through a custom button, link, or Web tab.
1. From Setup, enter Flows in the Quick Find box, then select Flows. Available in: both Salesforce
Classic and Lightning
2. For the flow that you want to distribute, click and select View Details and Versions.
Experience
If isn’t available for each flow, click the name of the flow that you want to distribute.
Available in: Essentials,
3. Verify that the flow has an active version. Professional, Enterprise,
Only users with the Manage Flow permission can run inactive flows. If the flow contains subflow Performance, Unlimited,
elements, the referenced flows must also have an active version. and Developer Editions
https://yourDomain.my.salesforce.com/flow/MyFlowName
If the flow was installed from a managed package, include the namespace prefix in the flow URL. For example:
https://yourDomain.my.salesforce.com/flow/namespace/MyFlowName
5. To set the initial values of your flow’s variables, append ?variable1=value1&variable2=value2 to the URL.
6. Distribute the flow URL.
Here are some examples:
• Create a custom button or link, and add it to a page layout.
• Create a Web tab, and add it to the appropriate profiles.
165
Automate Your Business Processes Flows
SEE ALSO:
Lightning Runtime vs. Classic Runtime for Flows
Customize a Flow URL to Render Two-Column Screens
166
Automate Your Business Processes Flows
To redirect users to a specific page in Salesforce after they click Finish: Available in: Essentials,
Professional, Enterprise,
Performance, Unlimited,
and Developer Editions
/flow/flowName?retURL=url
where url is a relative URL (the part of the URL that comes after https://MyDomainName.my.salesforce.com/ or
https://MyDomainName.lightning.force.com/).
URL Options
You can't redirect flow users to a URL that’s external to your Salesforce org.
Tip: Use Salesforce Classic URLs. Lightning Experience URLs always redirect to the home page in Lightning Experience.
• For Salesforce Classic URLs, Salesforce redirects your users to the right page in whichever Salesforce experience they’ve enabled —
Lightning Experience or Salesforce Classic. If the page doesn’t exist in Lightning Experience, Salesforce redirects the user to the page
in Salesforce Classic.
• For Lightning Experience URLs, Salesforce always redirects your users to the home page in Lightning Experience
(lightning/page/home), even if the user has Salesforce Classic enabled. Users who don’t have permission to access Lightning
Experience see an error message.
• If your URL redirects users to a web tab, Salesforce renders the web tab in Salesforce Classic.
• Web tabs in Lightning Experience can redirect only to Visualforce pages.
167
Automate Your Business Processes Flows
Limitations
• You can’t use a flow variable as the value for the retURL parameter. If you want to use a flow variable to redirect a user, such as
to a specific record, distribute the flow by using Visualforce.
• retURL can cause nested top and side navigation bars to render on the destination page.
• retURL is case-sensitive. If you use retUrl, the URL doesn’t redirect the user.
Examples
This flow URL redirects users to Accounts home, which exists in both Lightning Experience and Salesforce Classic.
/flow/myFlow?retURL=001/o
When Lightning Experience users finish the flow interview, Salesforce redirects them to
http://MyDomainName.lightning.force.com/lightning/o/Account/home. When Salesforce Classic users
finish the flow interview, Salesforce redirects them to http://MyDomainName.my.salesforce.com/001/o. Either way,
Salesforce redirects users to Accounts home in their respective experience.
This flow URL redirects users to a Visualforce page that exists only in Salesforce Classic.
/flow/myFlow?retURL=apex/myPage
SEE ALSO:
Distribute a Flow
Troubleshoot Flow URLs
Customize a Flow URL to Set Variable Values
168
Automate Your Business Processes Flows
4. At the end of the flow URL, append ?name=value, where name is the unique name of the
variable or collection variable in the flow that you want to set and value is the value you USER PERMISSIONS
want to set it to. If you want to set multiple variable values, append
To view a flow’s detail page:
?name1=value1&name2=value2 to the end of the flow URL. If you want to set the
• View Setup and
values for multiple items in the same collection variable, append
Configuration
?name=value1&name=value2.
For example: To create and edit custom
buttons, links, and Web tabs:
• Customize Application
/flow/MyFlow?varNumber=100&varString=Hello
Here are the valid values for each flow variable and collection variable based on its data type.
Multi-Select Merge field of any type or a string in this format: value1; value2
Picklist
Note: When you distribute a flow, don’t pass a currency field value from a Salesforce record into a flow currency variable with
a URL parameter. When a currency field is referenced through a merge field (such as {!Account.AnnualRevenue}),
the value includes the unit of currency’s symbol (for example, $). Flow currency variables can accept only numeric values, so
169
Automate Your Business Processes Flows
the flow fails at run time. Instead, pass the record’s ID to a text variable with a URL parameter. Then in the flow, use the ID to
look up that record’s value for the currency field.
Example: The following example is a flow URL that is used in a custom button on a case page layout. When a user clicks that
button, the flow launches with the varID variable (of type Text) set to the case record’s CaseNumber field value.
/flow/Case_Management?varID={!Case.CaseNumber}
The following example sets the varUserFirst and varUserLast variables (both of type Text) to the running user’s FirstName and
LastName field values.
/flow/User_Info?varUserFirst={!$User.FirstName}&varUserLast={!$User.LastName}
The following example is a flow URL that is used in a custom button on a contact page layout. When a user clicks that button, the
flow launches and adds text values from the contact as items in the {!collNames} text collection variable.
/flow/Contact_Info?collNames={!Contact.FirstName}&collNames={!Contact.LastName}
SEE ALSO:
Customize a Flow URL to Control Finish Behavior
Distribute a Flow
Troubleshoot Flow URLs
Format
To display a flow’s screens in two columns:
/flow/flowName?flowLayout=twoColumn
170
Automate Your Business Processes Flows
Examples
This example displays a “Case Management” flow in two columns.
/flow/Case_Management?flowLayout=twoColumn
This example displays a “User Info” flow in two columns and sets the varUserFirst and varUserLast variables (both of type Text) to the
running user’s FirstNameand LastName field values.
/flow/User_Info?varUserFirst={!$User.FirstName}&varUserLast={!$User.LastName}&flowLayout=twoColumn
SEE ALSO:
Set the Runtime Experience for URL-Based Flows
Two-Column Flow Considerations
Flow Screen Output Component: Section
171
Automate Your Business Processes Flows
For example:
<apex:page>
<flow:interview name="flowAPIName"/>
</apex:page>
If the flow is from a managed package, the name attribute must be in this format: namespace.flowuniquename.
6. Click Save.
7. Restrict which users can access the Visualforce page.
a. Click Visualforce Pages.
b. Click Security next to your Visualforce page.
c. Move all the appropriate profiles from Available Profiles to Enabled Profiles by using the add and remove buttons.
d. Click Save.
8. Add the Visualforce page to your app by using a custom button, link, or Visualforce tab.
To route users to a relative URL or a specific record or detail page, using its ID, use the URLFOR function.
This example routes users to the Salesforce home page.
<apex:page>
<flow:interview name="MyUniqueFlow" finishLocation="{!URLFOR('/home/home.jsp')}"/>
</apex:page>
For details about URLFOR, see Functions in the Visualforce Developer’s Guide.
172
Automate Your Business Processes Flows
For details about $Page, see Global Variables in the Visualforce Developer’s Guide.
Here’s a sample Visualforce page references that controller and sets the flow finish behavior to the first option.
<apex:page controller="myFlowController">
<h1>Congratulations!</h1> This is your new page.
<flow:interview name="flowname" finishLocation="{!pageA}"/>
</apex:page>
If you use a standard controller to display a record on the same page as the flow, users who click Finish start a new flow interview. They
see the first screen of the flow, without the record, because the id query string parameter isn’t preserved in the page URL. If needed,
configure the finishLocation to route users back to the record.
173
Automate Your Business Processes Flows
174
Automate Your Business Processes Flows
3. Click Save.
Screens don’t automatically display the Pause button once Let Users Pause Flows is enabled. If you want your users to be able to pause
at a given screen, select Allow Pause when you configure that screen.
SEE ALSO:
Flow Element: Screen
175
Automate Your Business Processes Flows
Salesforce Classic
Add the Paused Flow Interviews related list to the appropriate home page layouts. This component displays only interviews that
the user paused.
SEE ALSO:
Set Up the Lightning Experience Home Page
Customize Salesforce Classic Home Tab Page Layouts
Make It Easy for Users to Find Paused Flow Interviews for a Record
From a record page, display a list of all paused flow interviews that are associated with that record with this custom Aura component.
Example: This example uses the Apex controller to get a list of interviews that are associated with the record. The component
then displays the interviews in a table. For each interview, the component displays an action menu from which the user can resume
or delete the interview.
When the user clicks Resume, the helper fires the navigateFlow action to resume the interview. When the user clicks Delete, the
Apex controller deletes the interview.
c:interviewsByRecord Component
<aura:component controller="interviewsByRecordController"
implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" >
<aura:attribute name="columns" type="List" default=""/>
<aura:attribute name="Interviews" type="Object" />
<aura:attribute name="recordId" type="Id" />
<aura:attribute name="ContextRecord" type="Object" />
<aura:attribute name="overlay" type="Aura.Component"/>
<aura:handler name="init" value="{!this}" action="{!c.init}" />
<aura:handler event="force:refreshView" action="{!c.init}" />
</aura:set>
<table class="slds-table slds-table--bordered slds-table--cell-buffer
slds-table_fixed-layout">
<thead>
<tr class="slds-text-heading--label">
<th scope="col"><div class="slds-truncate">Interview Label</div></th>
<th scope="col"><div class="slds-truncate">Pause Reason</div></th>
<th scope="col"><div class="slds-truncate">Paused Date</div></th>
<th scope="col"><div class="slds-truncate">Current Element</div></th>
<th scope="col"><div class="slds-truncate">Owner</div></th>
176
Automate Your Business Processes Flows
177
Automate Your Business Processes Flows
</div>
</td>
</tr>
</aura:iteration>
</tbody>
</table>
</lightning:card>
</aura:component>
Apex Controller
public class interviewsByRecordController {
@AuraEnabled
public static List<FlowRecordRelation> getInterviews(Id recordId) {
return [ SELECT
ParentId, Parent.InterviewLabel, Parent.PauseLabel,
Parent.CurrentElement, Parent.CreatedDate, Parent.Owner.Name
FROM FlowRecordRelation
WHERE RelatedRecordId = :recordId ];
}
@AuraEnabled
public static FlowInterview deleteInterview(Id interviewId) {
FlowInterview interview = [Select Id from FlowInterview Where Id = :interviewId];
delete interview;
return interview;
}
}
({
init : function(component, event, helper) {
helper.populateTable(component, event, helper);
},
178
Automate Your Business Processes Flows
c:interviewsByRecord Helper
({
populateTable : function(component, event, helper) {
var action = component.get("c.getInterviews");
action.setParams({
recordId: component.get("v.recordId")
});
action.setCallback(this, $A.getCallback(function (response) {
var state = response.getState();
if (state === "SUCCESS") {
// Push interviews fetched by the Apex controller to the component
var recordRelations = response.getReturnValue();
var interviews = [];
for (var i = 0; i < recordRelations.length; i++) {
interviews.push(
{
Id: recordRelations[i].ParentId,
InterviewLabel: recordRelations[i].Parent.InterviewLabel,
PauseLabel: recordRelations[i].Parent.PauseLabel,
CurrentElement: recordRelations[i].Parent.CurrentElement,
PausedDate: recordRelations[i].Parent.CreatedDate,
PausedBy: recordRelations[i].Parent.Owner.Name
});
}
component.set('v.Interviews', interviews);
} else if (state === "ERROR") {
var errors = response.getError();
console.error(errors);
}
}));
$A.enqueueAction(action);
},
179
Automate Your Business Processes Flows
},
180
Automate Your Business Processes Flows
SEE ALSO:
Restrict Who Can Resume Shared Flow Interviews
Sharing Considerations
181
Automate Your Business Processes Flows
3. Click Save.
SEE ALSO:
Customize Who Has Access to Paused Flow Interviews
How Does Flow Security Work?
182
Automate Your Business Processes Flows
2. From the Components panel, drag the Flow component onto the page.
USER PERMISSIONS
3. In the property editor, configure the component.
Flow To customize an Experience
Only active screen flows are available. Flows built in the Desktop Flow Designer aren’t Cloud site:
supported. • Be a member of the site
AND Create and Set Up
Layout Experiences
By default, flows display in one column.
OR
Note:
• Be a member of the site
• Starting in Winter ’23, two-column flow layouts are ignored. For a better layout AND View Setup and
option, add Section components to your flow screens. Each Section component Configuration AND an
lets you organize record fields and screen components in up to four experience admin,
publisher, or builder in
adjustable-width columns.
that site
• If a flow screen contains a Section component, that screen ignores the Layout
property. To publish an Experience
Cloud site:
Input variables • Be a member of the site
If you see other properties, they’re the flow’s input variables. Variables appear only if they AND Create and Set Up
allow input access. Experiences
Pass record ID into this variable OR
This option is available only for Text input variables in Record pages. For simplicity, we • Be a member of the site
recommend passing the ID to only one variable. AND an experience
For example, when this component is embedded in an Opportunity Record page, at run admin or publisher in
that site
time the component passes the opportunity’s ID into the selected input variable.
SEE ALSO:
Flow Screen Output Component: Section
183
Automate Your Business Processes Flows
2. From Setup, enter Visualforce Pages in the Quick Find box, then select Visualforce Pages.
3. Define a new Visualforce page, or open an existing one.
4. Add the <flow:interview> component somewhere between the <apex:page> tags.
5. Set the name attribute to the API name of the flow.
For example:
<apex:page>
<flow:interview name="flowAPIName"/>
</apex:page>
If the flow is from a managed package, the name attribute must be in this format: namespace.flowuniquename.
6. Click Save.
7. Restrict which users can access the Visualforce page.
Any external users with access to the Visualforce page can run the embedded flow.
a. Click Visualforce Pages.
b. Click Security next to your Visualforce page.
c. Move all the appropriate profiles from Available Profiles to Enabled Profiles by using the add and remove buttons.
d. Click Save.
SEE ALSO:
Lightning Aura Components Developer Guide : Configure Components for Experience Builder
Lightning Aura Components Developer Guide : Add Aura Components to Any App with Lightning Out (Beta)
184
Automate Your Business Processes Flows
SEE ALSO:
Flows
185
Automate Your Business Processes Flows
b. Optionally, click Add Row to set values for the flow’s variables.
186
Automate Your Business Processes Flows
4. In the Immediate Workflow Actions section, click Add Workflow Action > Select Existing Action.
Flow triggers aren’t available as time-dependent workflow actions. You can add flow triggers to workflow rules only as immediate
workflow actions.
6. Select the flow trigger to associate with this workflow rule. Move the flow trigger to Selected Actions by using the right arrow.
7. Click Save.
Note: The pilot program for flow trigger workflow actions is closed. If you've already enabled Available in: Salesforce
the pilot in your org, you can continue to create and edit flow trigger workflow actions. If you Classic
didn't enable the pilot in your org, use Flow Builder to create a record-triggered flow, or use Available in: Enterprise,
Process Builder to launch a flow from a process. Performance, Unlimited,
1. From Setup, enter Flow Triggers in the Quick Find box, then select Flow Triggers. and Developer Editions
Flow Unique name of the autolaunched flow that this workflow action
launches.
5. If you select Set Flow Variables, specify their names and values.
Click Set Another Value to set up to 25 variables.
6. To put the flow trigger in test mode, select Administrators run the latest flow version.
When selected and an admin triggers the workflow rule, the flow trigger launches the latest version of the flow. For all other users,
the flow trigger always launches the active version of the flow.
187
Automate Your Business Processes Flows
The same values are passed into the flow variables whether the flow trigger launches the active or latest flow version.
7. Click Save.
Don’t forget to associate the flow trigger to a workflow rule.
Example: The following includes a sample controller that starts a flow and the corresponding Visualforce page. The Visualforce
page contains an input box and a start button. When the user enters a number in the input box and clicks Start, the controller’s
start method is called. The button saves the user-entered value to the flow’s input variable and launches the flow using
the start method. The flow doubles the value of input and assigns it to the output variable, and the output label displays
the value for output by using the getVariableValue method.
public class FlowController {
The following is the Visualforce page that uses the sample flow controller.
<apex:page controller="FlowController">
<apex:outputLabel id="text">v1 = {!output}</apex:outputLabel>
<apex:form >
value : <apex:inputText value="{!output}"/>
<apex:commandButton action="{!start}" value="Start" reRender="text"/>
</apex:form>
</apex:page>
Example: This example invokes the active version of the flow “Escalate_to_Case”.
POST /v33.0/actions/custom/flow/Escalate_to_Case
188
Automate Your Business Processes Flows
The request sets values for two of the flow’s input variables: CommentCount and FeedItemId. Once invoked, the flow
checks whether:
• A given feed item has more than five comments and
• A best comment hasn’t been selected yet
{
"inputs" : [ {
"CommentCount" : 6,
"FeedItemId" : "0D5D0000000cfMY"
} ]
}
189
Automate Your Business Processes Flows
SEE ALSO:
USER PERMISSIONS
Add Flows to a Lightning Bolt Solution
Lightning Bolt for Salesforce: Build Once, Then Distribute and Reuse To create a flow category:
• Customize Application
To create a Lightning Bolt
Solution without an
Experience Builder template:
• Customize Application
AND View Setup and
Configuration
To create a Lightning Bolt
Solution with an Experience
Builder template:
• Customize Application
AND Create and Set Up
Experiences AND View
Setup and Configuration
190
Automate Your Business Processes Flows
For example, if you deploy a flow that includes a Submit for Approval element, manually add the referenced approval process.
• If a flow references a Lightning component that depends on a CSP Trusted Site, the trusted site isn’t included in the package or
change set automatically.
Deployment
• You can include only one version of a flow in a change set.
• An active flow in a change set is deployed to its destination as inactive. Activate the flow manually after deployment.
• If the flow has no active version when you upload the outbound change set, the latest inactive version is used.
• Deploying or redeploying a flow with change sets creates a version of the flow in the destination org.
Flow Triggers
Flow triggers aren’t available in change sets.
The pilot program for flow trigger workflow actions is closed. If you've already enabled the pilot in your org, you can continue to
create and edit flow trigger workflow actions. If you didn't enable the pilot in your org, use Flow Builder to create a record-triggered
flow, or use Process Builder to launch a flow from a process.
SEE ALSO:
Change Sets
191
Automate Your Business Processes Flows
Other Limitations
• If you register your namespace after you referenced a flow in a Visualforce page or Apex code, don’t forget to add the namespace
to the flow name. Otherwise, the package will fail to install.
• If someone installs a non-template flow from a managed package, error emails for that flow’s interviews don’t include any details
about the individual flow elements. The email is sent to either the user who installed the flow or the Apex exception email
recipients.
• Flow triggers aren’t packageable.
The pilot program for flow trigger workflow actions is closed. If you've already enabled the pilot in your org, you can continue
to create and edit flow trigger workflow actions. If you didn't enable the pilot in your org, use Flow Builder to create a
record-triggered flow, or use Process Builder to launch a flow from a process.
• In a development org, you can’t delete a flow after you upload it to a released or beta managed package.
SEE ALSO:
Considerations for Installed Flows
Create a Package
Control Who Receives Flow and Process Error Emails
192
Automate Your Business Processes Flows
+
SELECT count_distinct(FlowVersionId)
FROM FlowTestCoverage
Then run all tests, and use the FlowTestCoverage object in the Tooling API to determine the number of all latest flow versions that have
test coverage.. Here’s a sample query.
SELECT count_distinct(FlowVersionId)
FROM FlowTestCoverage
Divide the second number (number of all latest flow versions that have test coverage) by the first number (number of all active versions
with or without test coverage and all inactive versions that are the latest versions and have test coverage).
For example, you have a total of 10 flows. Flow A has two versions. The latest version is inactive with test coverage. The first version is
active without test coverage. Flows B-E each have only one version, and each version is inactive with test coverage. Flows F-J each have
only one version, and each version is active with test coverage. The flow test coverage is 90%.
Flow A 1 Active No
SELECT FlowVersion.Definition.DeveloperName
FROM FlowTestCoverage
GROUP BY FlowVersion.Definition.DeveloperName
Tip: To get the names of all active autolaunched flows and processes that don’t have test coverage, use this query.
SELECT Definition.DeveloperName
FROM Flow
WHERE Status = 'Active'
AND (ProcessType = 'AutolaunchedFlow'
OR ProcessType = 'Workflow'
OR ProcessType = 'CustomEvent'
193
Automate Your Business Processes Flows
OR ProcessType = 'InvocableProcess')
AND Id NOT IN (SELECT FlowVersionId FROM FlowTestCoverage)
SEE ALSO:
Tooling API : FlowTestCoverage
Flow Interviews
A flow interview is a running instance of a flow. A flow is an application built by your administrator
EDITIONS
that asks you for inputs and does something in Salesforce based on those inputs.
For example, a flow could provide a call script for customer support calls and use the information Available in: both Salesforce
you provide to create a case. What the flow does with the information you provide is entirely up Classic and Lightning
to your administrator. Experience
When you run a flow interview, whether through a link, button, or tab, you're running a single Available in: Essentials,
instance of a flow. If the terminology is confusing, consider the difference between a record and Professional, Enterprise,
an object. You create an account record, which is a single instance of the Account object that your Performance, Unlimited,
administrator customized. and Developer Editions
194
Automate Your Business Processes Flows
SEE ALSO:
Flows
195
Automate Your Business Processes Flows
SEE ALSO: OR
Warning: When you resume a flow interview, that interview is removed from your Paused Flow Interviews list. If you resume an
interview and then change your mind, click Pause. If you close the interview before pausing, you can’t resume the interview later.
196
Automate Your Business Processes Flows
The list of flows... Can include the packages that flows are Never includes the packages that flows are
installed from installed from
197
Automate Your Business Processes Flows
SEE ALSO:
Monitor Your Processes’ Pending Scheduled Actions
198
Automate Your Business Processes Flows
1. From Setup, enter Process Automation in the Quick Find box, and select Process Automation Settings.
2. Select Require the Manage Flow permission to view all Automation Home charts.
Troubleshoot Flows
To troubleshoot a failed flow interview, use the flow fault email. To debug the flow and observe
EDITIONS
what happens as it runs, use the debug option in Flow Builder. To view the failed flow interview in
an interactive environment, click Flow Error: Click here to debug the error in Flow Builder in Available in: both Salesforce
the flow fault email. Classic and Lightning
Experience
Emails About Flow Errors Available in: Essentials,
Every time a flow interview fails, Salesforce sends an error email in the default language of the Professional, Enterprise,
user who ran the flow. The email is sent to either the admin who last modified the associated Performance, Unlimited,
flow or the Apex exception email recipients. The email includes the error message from the and Developer Editions
failure, details about each flow element that the interview executed, and a link to show the
failed flow interview in Flow Builder.
Control Who Receives Flow and Process Error Emails
When a process or flow interview fails, a detailed error email is sent to the admin who last modified the process or flow. But perhaps
that admin isn’t the best person to read and act on the details of what was executed and what went wrong. Instead, you can choose
to send error emails to the Apex exception email recipients, which you specify and control in Setup.
Troubleshoot Flow URLs
If you’re distributing a flow and the custom button, custom link, or a direct flow URL isn’t working as expected, verify the referenced
flow. In addition, verify its variables if you’re passing values into a flow from the URL.
SEE ALSO:
Send Alerts When a Screen Flow Fails
Example:
An error occurred at element Apex_Plug_in_1.
List index out of bounds: 0.
199
Automate Your Business Processes Flows
SEE ALSO:
Limitations of Emails About Flow Errors
Customize What Happens When a Flow Fails
Troubleshoot Flows
What Happens When an Apex Exception Occurs?
Control Who Receives Flow and Process Error Emails
• Failed flow interviews don’t count toward data, file, or paused flow interview storage limits. When failed flow interviews are
saved, they’re available for up to 14 days, then they’re automatically deleted from the database.
200
Automate Your Business Processes Flows
Screen elements
Password fields display in plain text, just like if you reference a password field in a Display Text field.
Subflow elements
• The merge field annotation ({!variable} as opposed to just variable) is missing for variables in a referenced flow. For
example, when an interview enters a subflow and gives details about the inputs, the subflow's variable is subVariable
instead of {!subVariable}.
• If the error occurs in a referenced flow, the email gets sent to the author of the master flow, but the subject references the name
of the referenced flow.
• If you see multiple Entered flow ReferencedFlowName version ReferencedFlowVersion messages with no Exited
ReferencedFlowName version ReferencedFlowVersion messages in between them, the flow user navigated
backwards. To prevent this scenario, adjust the navigation options in the first screen of the referenced flow so that the user can’t
click Previous.
SEE ALSO:
Emails About Flow Errors
Troubleshoot Flows
Control Who Receives Flow and Process Error Emails
201
Automate Your Business Processes Flows
SEE ALSO:
Emails About Flow Errors
What Happens When an Apex Exception Occurs?
What Happens When a Process Fails?
Customize What Happens When a Flow Fails
SEE ALSO:
Customize a Flow URL to Control Finish Behavior
Customize a Flow URL to Set Variable Values
Troubleshoot Flows
202
Automate Your Business Processes Flows
203
Automate Your Business Processes Flows
SEE ALSO:
Flow Builder
Considerations for Translating Flows
This table describes the free allocations that are granted based on your org’s edition.
Maximum flow Interviews of flow types that can 2,000 20,000,000 20,000,000
interviews with UI per have screen elements, such as
month screen flows, user provisioning
flows, Field Service Snap-in flows,
contact request flows, and surveys
built in Survey Builder
Maximum flow Interviews of flow types that can’t 10,000,000 10,000,000,000 10,000,000,000
interviews without UI have screen elements, such as
per month autolaunched flows, transaction
security flows, and processes built
in Process Builder
204
Automate Your Business Processes Flows
This table describes additional allocations that are granted based on purchased user licenses. These allocations apply to the org. It doesn’t
matter which users run the flows.
If you have questions about increasing your allocation, contact your Salesforce account executive.
SEE ALSO:
Usage-Based Entitlements
View Your Salesforce Org’s Usage-Based Entitlements
Flow Types
Reevaluate Records in the Process Builder
How Does Salesforce Process Scheduled Actions?
Flow interviews that are resumed per hour or groups of 1,000 1,000
scheduled actions from processes that are executed per hour
based on a specific time
Combined total of these automations that start or resume based 20,000 20,000
on a record’s field value.
• Resume events that are defined in active flows
• Groups of scheduled actions that are defined in active
processes
205
Automate Your Business Processes Flows
Schedule-triggered flow interviews per 24 hours 250,000, or the number of user licenses in
your org multiplied by 200, whichever is
greater
SEE ALSO:
Flows
Flow Limits and Considerations
206
Automate Your Business Processes Flows
1
Autolaunched flows are part of the larger transaction that they were launched through and share that transaction’s limits. For example,
flows launched from Apex or a process are executed with the Apex or process actions as part of the larger transaction. Flows with Screen
elements can span multiple transactions. A new transaction begins each time the user clicks Next in a screen. Flows with Pause elements
span multiple transactions. A transaction ends when a flow interview pauses for an event. When the flow interview resumes, a new
transaction begins. Everything after the Pause element is executed as part of a batch transaction that includes other resumed interviews.
The batch includes interviews executed by the same user ID, have the same execution time, and have the same flow version ID.
SEE ALSO:
Apex Developer Guide : Execution Governors and Limits
General Flow Limits
207
Automate Your Business Processes Flows
– English (US)
– French (France)
– German (Germany)
– Japanese (Japan)
– Spanish (Spain)
If you enter unsupported characters for a supported locale, they’re displayed using system fonts instead of the embedded fonts.
In unsupported locales, your system font settings are used to display all characters in Flow Builder.
• Don’t enter the string null as the value of a text field in Flow Builder.
Output Values
To store the same output value in multiple variables, assign the value to one variable. Then add an Assignment element after the
action, and set the other variables to the value of the first variable.
Managed Packages
Flow Builder can’t open flows that are installed from managed packages, unless they’re templates.
Step Elements
You can’t add or update steps to a flow in Flow Builder. You also can’t convert steps into screens. If you added a step in Cloud Flow
Designer, the step still appears on the canvas. We recommend that you remove all steps from your flows.
Action Elements
Legacy Apex actions aren’t organized by the tag in the plug-in code.
Flows Upgraded from Winter ’12 and Earlier
If you open a flow that was last opened in Winter ’12 or earlier, each Boolean decision is converted to a multi-outcome Decision
element that:
• Uses the same label as the old decision.
• Takes the API name of the old decision, appended with “_switch”.
• Has an outcome labeled “True”. This outcome’s API 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”.
Terminology
The terminology in some warnings, error messages, and debug details isn’t updated for Flow Builder or Cloud Flow Designer.
208
Automate Your Business Processes Flows
Note: Paused or waiting flow interviews aren’t affected by expired user sessions.
SEE ALSO:
Modify Session Security Settings
209
Automate Your Business Processes Flows
Best Practices
• Keep your labels as short as possible. The translated label can’t exceed 1,000 characters (or 255 characters for definition name and
version name). If you have a long label for a display text field, consider breaking it up into multiple fields.
• When updating a primary label, check whether it has translations, and update as needed.
• Avoid text templates when translating an email body or other formatted block text.
• Avoid using logic that references translated values.
• To find the parent external object record linked to by an external lookup relationship, match the parent record’s external ID to the
external lookup relationship on the child record. For example, an external lookup relationship connects Product Catalog Item (parent
external object) to Case (child standard object). In a flow, the record variable {!case} contains field values for a support case. To
find the parent product catalog item record, in a Get Records element, filter by:
ExternalId Equals {!case.externalLookupRelationship_c__c}
210
Automate Your Business Processes Flows
• If Salesforce creates, updates, or deletes data in your org and then accesses external data in the same transaction, an error occurs.
In your flow, we recommend using a separate transaction to access data in an external system. To do so, end the prior transaction
by adding a screen or local action to a screen flow or a Pause element to an autolaunched flow. If you use a Pause element, don't
use a record-based resume time.
For example, a screen flow creates a contact and then displays a confirmation screen. Next, the flow updates the contact in the
external system. The flow doesn’t fail because it uses a separate transaction to access the external data.
• Don’t update the External ID and Display URL fields in a process or flow.
• Record-change processes aren’t supported.
• A process or flow must save or commit changes to a standard or a custom object before changing an external object within the
same transaction. To commit changes to a standard or custom object, you have different options depending on the tool. After an
action that changes a standard or custom object record:
– In Flow Builder, add a screen, local action, or Pause element that pauses until a flow-based time occurs.
– In Process Builder, add a scheduled action.
211
Automate Your Business Processes Flows
Record, with a The API name Map of key-value pairs or equivalent expression.
specified of the Flow record values map only to attributes whose type is the
object specified specific object. For example, an account record variable can be
(API name is object, such as mapped only to an attribute whose type is Account. Flow data
SObject.) Account or types aren’t compatible with attributes whose type is Object.
Case
212
Automate Your Business Processes Flows
Web tab
Lightning page
213
Automate Your Business Processes Flows
Flow action
Utility bar
External Objects
• When you create or update external object records, don’t set values for indirect lookup relationships that map to a different data
type on the external system. For example, don’t set a value for a Text indirect lookup relationship that maps to a Date value on the
external system.
• To find the Salesforce record linked to from an external object by an indirect lookup relationship, match the parent object’s Id field
to the ID in the indirect lookup relationship field. Select the indirect lookup relationship, and add .Id before the closing curly
bracket. For example, an indirect lookup relationship connects Contact (parent standard object) to Social Media post (child external
object). In a flow, the record variable {!socialMediaPost} contains field values for a social media post. To find the parent
contact record, in a Get Records element, filter by:
Id Equals {!socialMediaPost.indirectLookupRelationship_c__c.Id}
• To find the parent external object record linked to by an external lookup relationship, match the parent record’s external ID to the
external lookup relationship on the child record. For example, an external lookup relationship connects Product Catalog Item (parent
external object) to Case (child standard object). In a flow, the record variable {!case} contains field values for a support case. To
find the parent product catalog item record, in a Get Records element, filter by:
ExternalId Equals {!case.externalLookupRelationship_c__c}
214
Automate Your Business Processes Flows
• If Salesforce creates, updates, or deletes data in your org and then accesses external data in the same transaction, an error occurs.
In your flow, we recommend using a separate transaction to access data in an external system. To do so, end the prior transaction
by adding a screen or local action to a screen flow or a Pause element to an autolaunched flow. If you use a Pause element, don't
use a record-based resume time.
For example, a screen flow creates a contact and then displays a confirmation screen. Next, the flow updates the contact in the
external system. The flow doesn’t fail because it uses a separate transaction to access the external data.
Null Values
A flow fails when a filter condition from a Get Records element or an Update Records element references a value that is null. Before you
reference a value in a filter condition, add a Decision element to check if the value is null.
215
Automate Your Business Processes Flows
A process, workflow rule, or All the object’s system fields and any fields that the running user
Start element doesn’t have permission to edit. The variable includes every field
for the object by default.
2. If the read-only field is referenced in the flow, give the running users the permissions needed for the flow to execute its operations.
3. If you can’t give the running users the needed permissions for a field, update the flow so that it doesn’t try to update that field.
Example: Using an Update Records element, a flow updates several fields on an account. While your users can edit
Description and Account Rating, they can’t edit Owner ID or LastModifiedDate. To prevent the flow from
failing at run time:
• Give your users “Edit” permission for Owner ID.
• Copy only the writable field values (Description, Account Rating, and Owner ID) from the original record
variable into a new record variable. Reference the new record variable in the Update Records element.
Copying only the writable field values ensures that the flow doesn’t try to set a value for LastModifiedDate at run time.
216
Automate Your Business Processes Flows
SEE ALSO:
Remove Read-Only Fields from a Record Variable
Control What Happens When a Flow Tries to Set Values for Read-Only Fields
Object Reference for Salesforce and Lightning Platform : System Fields
Control What Happens When a Flow Tries to Set Values for Read-Only Fields
When a flow tries to perform an action, such as create or update records, it uses a flow request to
EDITIONS
set values for specific fields. But what happens if the running user doesn’t have edit access to all
those fields? When you use a record variable or record collection variable in Create Records and Available in: both Salesforce
Update Records elements, that’s up to you. To control the behavior, select or deselect the Filter Classic and Lightning
inaccessible fields from flow requests preference. Experience
Notification when one or No notification is sent to the The admin receives a flow error
more fields aren’t updated user or admin to indicate that email with full details.
some fields weren’t updated.
217
Automate Your Business Processes Flows
Tip: We recommend disabling this preference so that you always know when a flow doesn’t set all expected field values.
1. From Setup, enter Automation in the Quick Find box, then select Process Automation Settings.
2. Select or deselect Filter inaccessible fields from flow requests.
If your org was created in Winter ’17 or earlier, the preference is enabled by default. Otherwise, the preference is disabled by default.
Example: A flow updates several fields on an opportunity by using a record variable in an Update Records element. At run time,
the flow tries to update the Acme account on behalf of your user. The user can edit Stage and Close Date but not Amount.
As a result, the flow doesn’t have permission to update Amount.
• If Filter inaccessible fields from flow requests is selected, the flow successfully updates the account,
but it only updates Stage and Close Date. The flow doesn’t notify anybody that Amount wasn’t updated.
• If Filter inaccessible fields from flow requests is not selected, the flow fails to update the account.
The admin receives a flow error email. The email includes this error.
INVALID_FIELD_FOR_INSERT_UPDATE: Unable to create/update fields: Amount
That's API-speak for “The running user doesn’t have permission to edit the Amount field.”
Warning: If you change your org’s selection for this preference, use a sandbox to test how the change impacts your flows.
Consider following the same process as you would for a critical update.
SEE ALSO:
Which Fields Are Inaccessible When a Flow Creates or Updates Records?
218
Automate Your Business Processes Flows
Note: If you plan to reference the variable in a Update Records element, include the
record’s ID in the new record variable. Although Id is read only, the flow uses the value
to determine which records to update.
Example: You have a case record variable called {!myCaseVar_all}. It stores values for some read-only fields, so you can’t
use it in a Update Records element. You copy the fields that you want to update to a new record variable: IsEscalated and
Status. You also copy Id, because it’s required for an update operation. Here’s what those assignment rules look like.
The same example works for an record collection variable. However, because you can’t directly change the values of a collection
variable, you use a loop.
219
Automate Your Business Processes Flows
1. Using a Loop element, the flow passes each item’s values into a loop variable ({!myCaseLoopVar_original}).
2. For each iteration, an Assignment element copies the Id, IsEscalated, and Status fields from the loop variable to
another record variable ({!myCaseLoopVar_final}).
3. The flow then adds the {!myCaseLoopVar_final} variable’s values to a new collection. The second Assignment
element includes this assignment rule.
After the flow has iterated over every item in the original collection, it exits the loop.
220
Automate Your Business Processes Flows
Apex
• Supported data types in an Apex class are Boolean, Integer, Long, Decimal, Double, Date, DateTime, and String. Single values and
lists are supported for each data type. Multiple Apex classes can be combined to represent complex web objects.
• The @AuraEnabled annotation for each field is required.
• A constructor with no arguments is required.
• Class methods aren’t supported.
• Getter methods for fields aren’t supported.
• Inner classes aren’t supported.
• An outer class that has the same name as an inner class isn’t supported.
• Referential integrity isn’t supported for Apex class fields. For example, a flow has an Apex-defined variable that represents the model
field in the Car Apex class. If the model field is modified or deleted in the class, the flow fails.
Local Actions
• An Aura component that’s used as a local action can’t set an Apex-defined attribute.
221
Automate Your Business Processes Flows
SEE ALSO:
Flow Resources
Flow Elements
Provided Flow Screen Components
222
Automate Your Business Processes Flows
• These data types aren’t supported in conditional visibility, but you can reference attributes
and fields.
– Apex-defined data types
– Record variables
• Any screen input component with Manually assign variables (advanced) selected isn’t available as a resource for conditional
visibility on the same flow screen.
• Text that has merge fields included isn’t supported in values. Merge fields on their own are supported.
Text Templates and Formulas
• Initial values are evaluated in text templates and formulas.
• Changes based on user input aren’t evaluated.
Hidden Screen Input Components
• Screen input components hidden by conditional visibility aren’t required when a user runs the flow, even if Required is set
to {!$GlobalConstant.True}. When the component appears to the user, it’s treated as required.
• If a screen input component is hidden because it doesn’t meet conditional visibility requirements, its value is set to null. But
hidden picklists in a Dependent Picklists component aren’t set to null unless the entire Dependent Picklists component is hidden.
Sections and Conditional Field Visibility
If a section’s visibility conditions reference a component contained within the section, the entire section is hidden. However, if the
referenced component has a default value that’s evaluated by the visibility conditions and the visibility conditions evaluate as true,
the section is visible.
Focus
When screen components or their parts are rendered after the screen is initially displayed, they’re never focusable. For example, if
a component asynchronously fetches a list of tasks to display, the focus can’t be set to any of the tasks. If a screen component uses
conditional visibility and appears only after user input, the focus can’t be set to any part of the screen component.
Circular Logic
Avoid circular logic in your conditions, which can result in poor performance, strange behavior, or an error when your flow is run.
SEE ALSO:
Make Flow Screens Dynamic with Conditional Visibility
223
Automate Your Business Processes Flows
If your default value is... Then at run time Salesforce preselects choice options
based on...
A choice resource that’s included in the list of choice options for A match for the selected choice’s API name.
the component
A choice resource that's not included in the list of choice options The resolved value of the choice resource. If a given choice's
for the component value matches the resolved default value, then that choice is
selected.
Another resource in the flow such as a reference to a record The resolved value of the flow resource. If a given choice's value
variable from a Get Records element matches the resolved default value, then that choice is selected.
A manually entered value The manually entered value. If a given choice's value matches
the manually entered value, then that choice is selected.
For choice components that let the user select a single option, such as Picklists and Radio Buttons,, Salesforce preselects the first
choice that matches:
For choice components that let the user select multiple options, like Multi-Select Picklists and Checkbox Groups, Salesforce preselects
every choice that matches:
224
Automate Your Business Processes Flows
set the default value to both “Red” and “Blue”, enter Red;Blue. At run time, Salesforce preselects every choice option whose value
is Red or Blue. Using values that contain semicolons can cause issues with multi-select value matching behavior. If a choice's value
is an exact match, like Red;Blue, then Salesforce doesn’t select it.
If you configure a choice component with multiple records, use a variable whose value resolves to the record ID for each record, and
separate the IDs with a semicolon.
Percentage Variables
• If a flow uses record variables to manipulate percentage values, test the flow carefully. When you insert a value into a record variable’s
percentage field and then reference that field in a formula, the value is divided by 100.
For example, an opportunity’s Probability field is set to 100. If you assign that value to the {!Opportunity.Probability}
record variable, the value is still 100. But if you create a formula whose expression is {!Opportunity.Probability}, the
value is 1.
Distributing Flows
• When you distribute a flow, don’t pass a currency field value from a Salesforce record into a flow currency variable with a URL
parameter. When a currency field is referenced through a merge field (such as {!Account.AnnualRevenue}), the value
225
Automate Your Business Processes Flows
includes the unit of currency’s symbol (for example, $). Flow currency variables can accept only numeric values, so the flow fails at
run time. Instead, pass the record’s ID to a text variable with a URL parameter. Then in the flow, use the ID to look up that record’s
value for the currency field.
• In a flow, the CONTAINS function checks all characters within its parentheses. For cross object field references, CONTAINS
works like it does in the rest of Salesforce. It checks only the first 250 characters in the reference.
Here’s an example. varContract refers to a record variable that contains the values of a contract record. This formula
expression checks only the first 250 characters.
CONTAINS({!varContract.Account.Description}, "description")
226
Automate Your Business Processes Flows
• When you paste a formula, make sure that the apostrophes and quotation marks are straight ('') and not curly (‘’). Otherwise,
you get a syntax error when you save the flow.
Errors
A formula returns null if an error occurs when the expression is evaluated, such as:
• The value that the formula returns doesn’t match its data type.
• The formula contains an unsupported function.
For example, if your formula resource has a data type of Number, the output must be numeric.
If a flow contains an invalid formula resource, you can’t activate the flow. If a Display Text screen component contains an invalid
formula resource, the flow displays an empty string at run time.
SEE ALSO:
Flow Resource: Formula
Flow Resources
• If a Checkbox Group or Multi-Select Picklist has at least one default value, at run time the choices are preselected if the choice’s
value matches the default value.
SEE ALSO:
Choice Resources for Flow Screen Components
227
Automate Your Business Processes Flows
228
Automate Your Business Processes Flows
Platform Events
Tip: Make sure to also review the considerations and allocations for platform events.
Platform Cache
When a flow contains a Pause element, make sure that later elements in the flow don't invoke Apex code that stores or retrieves values
from the session cache. The session-cache restriction applies to Apex actions and to changes that the flow makes to the database that
cause Apex triggers to fire.
229
Automate Your Business Processes Flows
• An org can process up to 1,000 time-based resume events per hour. When a resume event is processed, its associated interview
resumes and any other resume events for that interview are removed from the queue. If an org exceeds this limit, Salesforce defers
the remaining resume events to be processed in the next hour.
For example, an org has 1,200 resume events scheduled to be processed between 4:00 PM and 5:00 PM. Salesforce processes 1,000
resume events between 4:00 PM and 5:00 PM and the additional 200 resume events between 5:00 PM and 6:00 PM.
• You can’t archive a product or price book that’s referenced in a time-based resume event in a paused interview.
Flow-Based Time
For resume events based on a specific time, the resume time is evaluated using the time zone of the user who created the flow.
Record-Based Time
• For resume events based on a record field value, the resume time is evaluated using the org’s time zone.
• Resume events can’t reference:
– DATE or DATETIME fields that contain automatically derived functions, such as TODAY or NOW.
– Formula fields that include related-object merge fields.
• If you change a date field that’s referenced by an unexecuted resume event in a paused interview, Salesforce recalculates the resume
events associated with the interview.
For example, a flow is configured to email an opportunity owner seven days before the opportunity close date and the close date
is 2/20/2014. The following things could happen.
– The close date isn’t updated before the interview resumes. Result: Salesforce resumes the interview on 2/13/2014 and sends
the email.
– The close date is updated to 2/10/2014 before the interview resumes. Result: Salesforce reschedules the resume event and the
interview resumes on 2/3/2014.
– The close date is updated to a date in the past. Result: Salesforce recalculates the resume event and resumes the interview shortly
after you save the record.
• If a resume event references a null date field when the interview executes the Pause element, Salesforce resumes the interview as
soon as possible. Depending on how many actions Salesforce is processing at the time, actions are executed within one hour.
• If a resume event references a date field that has a non-null value when the flow interview executes the Pause element and it’s
updated to null before the resume event is processed, Salesforce resumes the interview within an hour after the date field is
updated.
• If a record or object that’s referenced by a resume event is deleted, the resume event is removed from the queue. If the interview
has no other resume events to wait for, the interview is deleted.
• Lead Convert Limitations
– You can’t convert a lead that’s referenced in a paused interview’s resume event.
– If Validation and Triggers from Lead Convert is enabled, existing operations on leads after a Pause element aren’t executed during
lead conversion.
230
Automate Your Business Processes Flows
– If a campaign member based on a lead is converted before a paused interview that’s associated with that record finishes,
Salesforce still executes the interview.
SEE ALSO:
Platform Events Developer Guide : Considerations for Defining and Publishing Platform Events
Flow Limits and Considerations
Flow Operators in Decision and Pause Elements
Flow Element: Pause
Platform Events Developer Guide : Subscribe to Platform Even Messages with Flows
• When $Flow.CurrentStage isn’t included in $Flow.ActiveStages, the default active stages are added to the end
of $Flow.ActiveStages.
For example, Flow1 sets $Flow.ActiveStages to “1, 2, 3, 4” and doesn’t set $Flow.CurrentStage. It then uses a
Subflow element to call Flow2. Flow2’s default active stages are “A, B, C.” When Flow2 starts, $Flow.ActiveStages
becomes “1, 2, 3, 4, A, B, C.” $Flow.CurrentStage remains unset.
231
Automate Your Business Processes Flows
• When $Flow.CurrentStage is duplicated in $Flow.ActiveStages, the default active stages are appended after
the first occurrence.
For example, Flow1 sets $Flow.ActiveStages to “1, 2, 2, 3, 4” and $Flow.CurrentStage to “2.” It then uses a
Subflow element to call Flow2. Flow2’s default active stages are “A, B, C.” When Flow2 starts, $Flow.ActiveStages
becomes “1, 2, A, B, C, 2, 3, 4.” $Flow.CurrentStage remains “2.”
Troubleshooting Stages
The flow error email doesn’t specify the values of $Flow.ActiveStages and $Flow.CurrentStage at the start of an
interview. To confirm what the initial values are, add temporary elements to display the initial values, such as in a screen display text
field.
SEE ALSO:
Show Users Progress Through a Flow with Stages
Flow Resource: Stage
Note: Starting in Winter ’23, two-column flow layouts are ignored. For a better layout option, Available in: both Salesforce
add Section components to your flow screens. Each Section component lets you organize Classic and Lightning
Experience
record fields and screen components in up to four adjustable-width columns.
These considerations don’t apply to the Section component in flow screens. Available in: Essentials,
Professional, Enterprise,
Granularity Performance, Unlimited,
The layout setting is applied at the flow level. So you can’t control the layout at the screen or and Developer Editions
field level. If you set a flow to use two columns, every screen in that flow displays in two columns.
Order of Fields
You can’t manually control which fields go in which columns. If the flow is set to display two columns, the fields alternate in each
column. The odd fields (first, third, fifth, and so on) are placed in the left column. The even fields (second, fourth, sixth, and so on)
are placed in the right column.
If your users navigate screens with the Tab key, they tab through all the fields in the left column and then all the fields in the right
column. You can’t configure the fields to tab left-to-right.
Responsiveness
The flow layout isn’t responsive to the user’s screen dimensions. It uses the same layout whether the user’s screen is 1 inch wide or
20 inches wide.
Tip: If users run a flow from a phone or small tablet, don’t apply a two-column layout to the flow.
232
Automate Your Business Processes Flows
For flows that are distributed via URL, the flowLayout URL parameter is ignored by each flow screen that contains a Section
component.
SEE ALSO:
Flow Limits and Considerations
Flow Screen Output Component: Section
Customize a Flow URL to Render Two-Column Screens
• If you delete a schedule-triggered flow from the Scheduled Jobs page in Setup, all future recurrences of that flow are canceled. To
enable future runs, deactivate and reactivate the flow.
• If a flow is scheduled to run once with a date and time that already passed, the flow doesn’t run.
• The Automated Process user runs schedule-triggered flows.
• If you need a schedule-triggered flow to invoke Apex code, don’t enable the Require User Access to Apex Classes Invoked by Flow
update. When that release update is activated, schedule-triggered flows fail when they invoke Apex.
• A schedule-triggered flow can make callouts only after executing a Pause element. For example, without a Pause element, the flow
can't access external objects, execute Apex actions that make callouts, or execute actions that are generated from External Services
registrations.
Tip: You can insert a Pause element that pauses the flow for only a moment. Configure the resume event to pause until a
specified time, with a specific time as the time source. For the base time, specify the $Flow.CurrentDateTime global
variable. Then set the offset to 0 hours. At run time, a Pause element that's set up this way typically pauses the flow for less
than a minute.
• If you configure an Update Records element to use the ID and all field values from the $Record global variable, enable Filter
inaccessible fields from flow requests in your org’s process automation settings. Otherwise, the flow fails
because the Update Records element tries to set the values for system fields and other read-only fields.
• When you define multiple filters, the filter logic usually defaults to AND. However, if multiple filters have the same field selected and
use the equals operator, the filters are combined with OR.
233
Automate Your Business Processes Flows
For example, your filters check whether a case’s Type equals Problem (1), Type equals Feature Request (2), and Escalated equals true
(3). At run time, the filters are combined to (1 OR 2) AND 3.
SEE ALSO:
Schedule Triggers for Flows That Run for Batches of Records
Emails About Flow Errors
Flow Operations and Read-Only Fields
Troubleshooting Considerations for Flows
SEE ALSO:
Record Triggers for Flows That Make Before-Save Updates
234
Automate Your Business Processes Flows
SEE ALSO:
Lightning Runtime vs. Classic Runtime for Flows
Flow Element: Subflow
235
Automate Your Business Processes Flows
• The title of the screen doesn’t change when you click Next or Previous, so it’s not always obvious Available in: Essentials,
that you’ve switched to a different page. Professional, Enterprise,
• Flow screen components that don’t have defined labels can’t be read properly by assistive Performance, Unlimited,
technology. and Developer Editions
• Unless you use the ARIA alert role or another method of identifying errors for assistive technology,
these types of custom error messages can’t be detected by assistive technology.
– Error messages that are text components with conditional visibility
– Error messages that are displayed for components when the associated Validate Input formula expression evaluates to false
• Screen readers base pronunciation on their language setting. When that language setting differs from the flow’s language, screen
readers can’t correctly read the flow screens. This limitation affects flows run from:
– Run and Debug buttons in Flow Builder
– URLs
– Custom buttons and links
– Web tabs
• Error messages for some Salesforce-provided components aren’t associated with their corresponding input fields. This limitation
means that screen readers can’t read error messages associated with them. Affected Salesforce-provided components:
– Dependent Picklists
– Email
– Lookup
– Phone
– Toggle
– URL
• When a user doesn’t complete a required field in a Dependent Picklists component, the resulting error messages can’t be read by
screen readers or other assistive technology. Sometimes, one of the error messages is announced one time, but later attempts to
focus on the field don’t cause the error message to be announced again.
• When a user clicks Finish in the Resume window from the Paused Flow Interviews Lightning component on a desktop (LEX), focus
isn’t set to the Refresh icon button.
• When a flow screen is initially displayed, the focus is set to the first visible screen field. Exceptions:
– If the flow screen contains an error, the focus is set to the first field with an error.
– If the flow screen contains only Display Text components, the focus is set to the first navigation button, such as Previous, Next,
or Finish.
236
Automate Your Business Processes Flows
• When screen components or their parts are rendered after the screen is initially displayed, they’re never focusable. For example, if
a component asynchronously fetches a list of tasks to display, the focus can’t be set to any of the tasks. If a screen component uses
conditional visibility and appears only after user input, the focus can’t be set to any part of the screen component.
SEE ALSO:
Flow Limits and Considerations
Flow Screen Input Component: Display Image
SEE ALSO:
Flow Limits and Considerations
237
Automate Your Business Processes Flows
Updating Packages
• To update a managed package with a different flow version, activate that version and upload the package again. It isn’t necessary
to add the newly activated version to the package. However, if you activate a flow version by mistake and upload the package, that
flow version is distributed to everyone. Be sure to verify which version you really want to upload.
• Flow installed from an unlocked package with the same API name overrides the existing flow in the target org.
• You can’t include flows in package patches.
Other Limitations
• Flow Builder displays Apex actions from managed packages only if the associated method is marked global.
• Flow Builder displays email alerts from managed packages only if the email alert isn’t protected.
• If you register your namespace after you referenced a flow in a Visualforce page or Apex code, don’t forget to add the namespace
to the flow name. Otherwise, the package fails to install.
• If someone installs a flow from a managed package, error emails for that flow’s interviews don’t include any details about the individual
flow elements. The email is sent to either the user who installed the flow or the Apex exception email recipients.
• Flow triggers aren’t packageable.
The pilot program for flow trigger workflow actions is closed. If you've already enabled the pilot in your org, you can continue to
create and edit flow trigger workflow actions. If you didn't enable the pilot in your org, use the Flows action in Process Builder instead.
• In a development org, you can’t delete a flow after you upload it to a released or beta managed package.
• Images in rich text for screens are not supported in packages.
238
Automate Your Business Processes Flows
• An active flow in a change set is deployed to its destination as inactive. Activate the flow manually after deployment.
• If the flow has no active version when you upload the outbound change set, the latest inactive version is used.
• Deploying or redeploying a flow with change sets creates a version of the flow in the destination organization.
Flow Triggers
• Flow triggers aren’t available in change sets.
• The pilot program for flow trigger workflow actions is closed. If you've already enabled the pilot in your org, you can continue to
create and edit flow trigger workflow actions. If you didn't enable the pilot in your org, use the Flows action in Process Builder instead.
SEE ALSO:
Deploy Processes and Flows as Active
• If you install a non-template flow from a managed package, error emails for that flow’s interviews Available in: Essentials,
don’t include any details about the individual flow elements. The email is sent to either the user Professional, Enterprise,
who installed the flow or the Apex exception email recipients. Performance, Unlimited,
and Developer Editions
• If you install a flow from an unmanaged package that has the same name but a different version
number as a flow in your org, the newly installed flow becomes the latest version of the existing
flow. However, if the packaged flow has the same name and version number as a flow already
in your org, the package install fails. You can’t overwrite a flow.
• If you install a flow from an unlocked package that has the same name as a flow in your org, the newly installed flow overrides the
existing flow.
Status
An active flow in a package is active after it’s installed. The previous active version of the flow in the destination org is deactivated
in favor of the newly installed version. Any in-progress flows based on the now-deactivated version continue to run without
interruption but reflect the previous version of the flow.
Distributing Installed Flows
• When you create a custom button, link, or web tab for a flow that’s installed from a managed package, include the namespace
in the URL. The URL format is /flow/namespace/flowuniquename.
• When you embed a flow that’s installed from a managed package in a Visualforce page, set the name attribute to this format:
namespace.flowuniquename.
Upgrading Installed Flows
Upgrading a managed package in your org installs a new flow version only if there’s a newer flow version from the developer. After
several upgrades, you can end up with multiple flow versions.
Removing Installed Flows
• You can’t delete a flow from an installed package. To remove a packaged flow from your org, deactivate it and then uninstall
the package.
239
Automate Your Business Processes Flows
• You can’t delete flows from Managed - Beta package installations in development org.
• If you have multiple versions of a flow installed from multiple unmanaged packages, you can’t remove only one version by
uninstalling its package. Uninstalling a package—managed or unmanaged—that contains a single version of the flow removes
the entire flow, including all versions.
• Delete flows from an unlocked package manually—you can’t delete them by removing them from the unlocked package.
Translating Installed Flows
You can translate flow definition names only on the Translate page.
SEE ALSO:
Considerations for Deploying Flows with Packages
ISVforce Guide: Installing a Package
Control Who Receives Flow and Process Error Emails
Troubleshooting Stages
The flow error email doesn’t specify the values of $Flow.ActiveStages and $Flow.CurrentStage at the start of an
interview. To confirm what the initial values are, add temporary elements to display the initial values, such as in a screen display text
field.
240
Automate Your Business Processes Flows
Flow Reference
Bookmark this page for quick access to information about flow elements, resources, events, and
EDITIONS
more.
Available in: both Salesforce
Flow Resources Classic and Lightning
Each resource represents a value that you can reference throughout the flow. Experience
Flow Resources
Each resource represents a value that you can reference throughout the flow.
EDITIONS
In Flow Builder, the Manager panel displays the resources that are available in the flow.
Available in: both Salesforce
You can create some resources by clicking New Resource. Some resources, such as global constants
Classic and Lightning
and global variables, are provided by the system. Other resources are automatically created when
Experience
you add an element to a flow. For example, when you add a Decision element, a resource for each
decision outcome is automatically created. Available in: Essentials,
Professional, Enterprise,
Flow Description Creatable from Performance, Unlimited,
Resource the Resources Tab and Developer Editions
Constant Store a fixed value that can be used but not changed
throughout a flow.
241
Automate Your Business Processes Flows
Element Any element that you add to a flow is available as a resource with the was visited
operator in decision outcome criteria. An element is considered visited when it’s
executed in the flow interview.
Any element that you add to a flow that supports a fault connector is available as a
Boolean resource. If the element is already successfully executed in the flow interview,
the resource’s value is True. If the element wasn’t executed or was executed and
resulted in an error, the resource’s value is False.
Global Variable System-provided variables that reference information about the Salesforce org or
running user, such as the user’s ID or the API session ID.
Pause When you add a Pause element to a flow, its configurations are available as Boolean
Configuration resources. If a configuration’s pause conditions are met, the resource’s value is True.
If the configuration has no pause conditions set, the resource’s value is always True.
Picklist Choice Generate a set of choices by using the values of a picklist or multi-select picklist field.
Set
Picklist Values System-provided values for picklist fields in record variables and record collection
variables. Available only for Assignment elements and conditions.
Screen Any screen component that you add to a flow is available as a resource. The resource
Component value depends on the type of screen component. The value for a Text component is
what the user enters. The value for a Picklist component is the stored value of the
choice that the user selects. The value for a Display Text component is the text that’s
displayed to the user.
Stage Represent the user’s progress throughout the flow. To identify which stages are
relevant to the user throughout the flow, assign the stages to the stage system
variables.
Text Template Store text that can be changed and used throughout the flow.
Variable Store a value that can be used or changed throughout the flow.
SEE ALSO:
Flow Builder
242
Automate Your Business Processes Flows
Data Type Controls which screen components this choice can be used in. For example,
you can’t use a Text choice in a Currency radio button. You can’t change the
data type of a previously saved choice.
Choice Value If the user selects this choice, the screen component is set to this value.
Exceptions:
• If no choice value is configured, the screen component is set to the
choice label.
• If the choice value references a formula resource, the screen component
is set to the choice label.
Display text Displays a text input component below the choice. This option isn’t available
input if the choice’s data type is Boolean.
Field Description
Input A user-friendly label for the text input component.
Label
Require Requires the user to enter a value in the text input component before progressing or finishing the flow.
Error If the user didn’t enter an acceptable value, this message displays under the text input component. Available only
Message when Validate is selected.
Formula Boolean formula expression that evaluates whether the user entered an acceptable value. Available only when
Validate is selected.
Example: To let users choose a particular service level, create choices for Gold, Silver, and Bronze. In a screen, display the choices
with a description of the features included. Then, in the same screen, let the user choose from a Radio Buttons screen component.
243
Automate Your Business Processes Flows
Formatting Choices
• Add rich text formatting using the toolbar.
• If you open the Display Text screen component, Choice resource labels, help text, Pause confirmation screens, or input validation,
Flow Builder converts existing HTML to rich text. Unsupported HTML is removed. The following HTML tags are converted to rich text:
<a>, <b>, <br>, <font>, <i>, <li>, <p>, <span>, <u>, and <div>. HTML that is pasted into the rich text editor is not supported.
SEE ALSO:
Flow Resources
Provided Flow Screen Components
Choice Resources for Flow Screen Components
Record The record collection you want to use to generate the choices.
Collection
Field Description
Choice Label Determines which field to use as the label for each generated choice. Select a field that enables users
to differentiate between the generated choices.
Tip: Make sure to choose a field that contains data. If the selected field has no value for a given
record, the corresponding choice’s label is blank at run time.
Data Type Data type of the choice’s value. You can’t change the data type of a previously saved collection choice
set.
Choice Value Determines which field’s value to store when the user selects this choice at run time. The value is
determined by the most recent user selection of a choice within the generated set.
Data Type determines the available options. If you don’t select a field as the choice value, the
choice label is used instead.
244
Automate Your Business Processes Flows
Tip: In most cases, set the choice label to Name and the choice value to ID.
Example: Collection choice sets are useful when a flow reuses the same data set over multiple screens. For example, you're
designing a support flow for a company’s IT department that handles support requests related to employee hardware. The flow
references the same employee hardware data over several screens. To get the employee hardware information, use a Get Records
action, which populates a record collection. To define the conditions relevant to the support request, use a collection filter on the
record collection. Next, to display the user choices, add a collection choice set that uses the filtered collection. Create a relevant
collection filter and collection choice set for each branch of the support flow.
With collection choice sets, the server is queried only when the Get Records element is first executed. In comparison, record choice
sets require a server query with each use.
SEE ALSO:
Provided Flow Screen Components
Choice Resources for Flow Screen Components
Flow Resources
Data Type Determines the type of value that the constant can store. You can’t change
the data type of a previously saved constant.
Value The constant’s value. This value doesn’t change throughout the flow.
SEE ALSO:
Flow Resources
245
Automate Your Business Processes Flows
Data Type The data type for the value returned by the formula. You can’t
change the data type of a previously saved variable.
Decimal Places Controls the number of digits to the right of the decimal point up
to 17 places. If you leave this field blank or set it to zero, only whole
numbers appear when your flow runs.
Available only when the data type is Number or Currency.
Formula The formula expression that the flow evaluates at run time. The
returned value must be compatible with Data Type.
SEE ALSO:
Formula Operators and Functions by Context
Which Functions Aren’t Supported in Flow Formulas?
Flow Resources
Example: Use {!$User.Id} to access the ID of the user who’s running the flow interview. Available in: both Salesforce
Classic and Lightning
Experience
Global Description
Variable Available in: Essentials,
Professional, Enterprise,
$Api References an API URL or the session ID. The following merge fields are Performance, Unlimited,
available. and Developer Editions
• Enterprise_Server_URL_xxx—The Enterprise WSDL SOAP
endpoint, where xxx represents the API version.
• Partner_Server_URL_xxx—The Partner WSDL SOAP endpoint,
where xxx represents the API version.
246
Automate Your Business Processes Flows
• Session_ID
$Client Available only in Lightning Scheduler flows and supported only in Decision elements.
$Client.FormFactor is automatically set to Large (desktop), Medium (tablet), or Small
(phone), depending on the device that’s running the flow. As you build a flow, use a Decision element to
create separate paths for large, medium, and small devices. In each path, use screens that are optimized for
that path’s device form factor.
$Flow References information about the running flow interview. For details, see Flow Resource: $Flow Global
Variables.
$Label References custom labels. This global variable appears only if your org has custom labels.
The returned value depends on the language setting of the contextual user. The value returned is one of
the following, in order of precedence:
1. The local translation’s text
2. The packaged translation’s text
3. The primary label’s text
$Permission References information about the current user’s custom permission access.
$Profile References information from the current user’s profile, such as license type or name.
Tip:
• Use profile names to reference standard profiles in $Profile merge fields.
• Users don’t need access to their profile information to run a flow that references these merge
fields.
247
Automate Your Business Processes Flows
$Setup References custom settings of type hierarchy. This global variable appears only if your org has hierarchy
custom settings. You can access custom settings of type list only in Apex.
Hierarchical custom settings allow values at these levels.
• Organization—The default value for everyone
• Profile—Overrides the Organization value
• User—Overrides the Organization and Profile values
Salesforce determines the correct value for this custom setting field based on the running user’s current
context.
$System $System.OriginDateTime represents the literal value of 1900-01-01 00:00:00. Use this
merge field to perform date/time offset calculations.
$User References information about the user who’s running the flow interview. For example, reference the user’s
ID or title.
Tip:
• The current user is the person who caused the flow to start.
• When a flow is started because a Web-to-Case or Web-to-Lead process changed a record, the
current user is the Default Lead Owner or Default Case Owner.
$User.UITheme and $User.UIThemeDisplayed identify the look and feel that the running user
sees on a Salesforce page. The difference between the two variables is that $User.UITheme returns the
look and feel the user is supposed to see, while $User.UIThemeDisplayed returns the look and feel
the user actually sees. For example, a user can have the preference and permissions to see the Lightning
Experience look and feel, but if they’re using a browser that doesn’t support that look and feel, for example,
older versions of Internet Explorer, $User.UIThemeDisplayed returns a different value. These merge
fields return one of these values.
• Theme1—Obsolete Salesforce theme
• Theme2—Salesforce Classic 2005 user interface theme
• Theme3—Salesforce Classic 2010 user interface theme
• Theme4d—Modern “Lightning Experience” Salesforce theme
• Theme4t—Salesforce mobile app theme
• Theme4u—Lightning Console theme
• PortalDefault—Salesforce Customer Portal theme
• Webstore—AppExchange theme
248
Automate Your Business Processes Flows
Tip:
• The current user is the person who caused the flow to start.
• When a flow is started because a Web-to-Case or Web-to-Lead process changed a record, the
current user is the Default Lead Owner or Default Case Owner.
SEE ALSO:
Flow Operations and Read-Only Fields
Salesforce Data Considerations for Flows
$Flow.CurrentDate Text, Date, and Date when the flow interview System
Date/Time executes the element that
references the global variable.
249
Automate Your Business Processes Flows
$Flow.CurrentDateTime Text, Date, and Date and time when the flow interview executes System
Date/Time the element that references the global variable.
$Flow.FaultMessage Text System fault message that can help flow System
administrators troubleshoot runtime issues.
$Flow.InterviewStartTime Text, Date, and Date and time when the flow interview started. System
Date/Time For a flow launched by a Subflow element,
$Flow.InterviewStartTime indicates
when the initial master flow started.
Example: A flow is used internally by call center personnel. For each flow element that interacts with the Salesforce database, a
fault connector leads to a screen. A Display Text screen component displays the system fault message and instructs the flow user
to provide that message to the IT department.
Sorry, but you can’t read or update records at this time.
Please open a case with IT, and include the following error message:
{!$Flow.FaultMessage}
Example: If a customer asks to be forgotten, make sure to delete all references to information that could personally identify the
customer, including data in paused flow interviews. When an interview executes a Pause element or is paused by a user, all the
interview data is serialized and saved to the database as a Paused Flow Interview record. When the interview is resumed, the
Paused Flow Interview record is deleted.
To identify which paused interviews include personal data for a contact, lead, or user, build a custom object to track the interview’s
GUID and the affected contact, lead, or user. When an interview references personal data, such as a lead’s email or credit card
number, create a record of the custom object using the lead’s ID and {!$Flow.InterviewGuid}. Before the final screen,
delete all records of the custom object referencing the interview’s GUID. That way, the custom object tracks only interviews that
are saved to the database.
250
Automate Your Business Processes Flows
When a customer asks to be forgotten, create a report that lists all the custom object records where LeadId matches the customer’s
record. Then for each custom object record, delete the flow interview that corresponds to the provided GUID.
SEE ALSO:
Customize What Happens When a Flow Fails
Flow Resources
SEE ALSO:
Flow Resources
251
Automate Your Business Processes Flows
Field Description
Object The object whose fields you want to select from. You can’t change the object for a previously saved
picklist choice set.
Data Type Determines whether you can choose from picklist fields or multi-select picklist fields. You can’t change
the data type of a previously saved picklist choice set.
Field The picklist or multi-select picklist field to use to generate the list of choices.
Sort Order Controls the order that the choices appear in. The choices sort based on the translated picklist value
for the running user’s language.
Example: In a flow that simplifies the process of creating an account, users identify the company’s industry.
Rather than creating one choice for each industry, you add a picklist choice set to the flow and populate a Picklist screen component
with it. When a user runs the flow, the picklist choice set finds all the values in the database for the Industry field (1) on the Account
object (2).
In addition to being easier than the standalone choice resource to configure, a picklist choice set reduces maintenance. When
someone adds options to the Account Industry field, the flow automatically reflects the changes. You don’t have to manually
update the flow.
Considerations
You can’t do the following when using a picklist choice set.
Filter out values that come back from the database.
The flow always displays every picklist value for the field, even if you’re using record types to narrow down the picklist choices in
page layouts.
252
Automate Your Business Processes Flows
SEE ALSO:
Provided Flow Screen Components
Choice Resources for Flow Screen Components
Flow Resources
Object The object whose records you want to use to generate the choices. You
can’t change the object for a previously saved record choice set.
Tip: Without filter conditions, a choice is generated for every record of the selected object. If you don’t apply filter conditions,
make sure to sort the records in ascending or descending order.
253
Automate Your Business Processes Flows
Field Description
Sort Order Controls the order that the choices appear in.
Sort By When the sort order is ascending or descending, select the field to order the choices by.
Maximum Number of The maximum number of choices to display for the screen component that uses this record choice
Choices set. By default, the maximum is 200.
Field Description
Choice Label Determines which field to use as the label for each generated choice. Select a field that enables users
to differentiate between the generated choices.
Tip: Make sure to choose a field that contains data. If the selected field has no value for a given
record, the corresponding choice’s label is blank at run time.
Data Type Data type of the choice’s value. You can’t change the data type of a previously saved record choice
set.
Choice Value Determines which field’s value to store when the user selects this choice at run time. The value is
determined by the most recent user selection of a choice within the generated set.
Data Type determines the available options. If you don’t select a field as the choice value, the
choice label is used instead.
Note: When a Checkbox Group or Multi-Select Picklist screen component uses a record choice set, only values from the last record
that the user selects are stored in the flow variables. If multiple Checkbox Group or Multi-Select Picklist components on one screen
use the same record choice set, the variable assignments come from the last record selected from all of those components.
Example: In a support flow for a computer hardware manufacturer, users identify a product to find its latest updates. You create
a record choice set that displays all products whose product ID starts with a specific string of characters. However, the flow users
are more likely to know the product’s name than its ID. So for Choice Label, select the field that contains the product name,
and for Choice Value, select the ID field. Elsewhere in the flow, you want to display the associated description. To do so, you
store the Description field value from the user-selected record in a variable.
SEE ALSO:
Flow Operators in Data Elements and Record Choice Sets
Provided Flow Screen Components
Choice Resources for Flow Screen Components
Flow Resources
254
Automate Your Business Processes Flows
Order Required. Determines how to sort this stage among the other stages in
the flow. The order must be unique among all other stages in the flow.
Usage
When ordering your stages, leave gaps between the numbers in case you later want to add a stage between two other stages. For
example, if you use 10, 20, and 30 as the order, you can insert a stage at order 15 without updating the original three stages.
Most of the time, stages resolve to the fully qualified name: namespace.flowName:stageName or flowName:stageName.
Stages resolve to the label in:
• Display contexts, such as choice labels and Display Text screen components
• Attributes in screen components that require Lightning runtime
SEE ALSO:
Plan the Stages in Your Flow
Identify the Relevant Stages in Your Flow
Flow Stage Considerations
Flow Resources
255
Automate Your Business Processes Flows
When the flow starts, Review Cart is automatically set to $Flow.CurrentStage and is the only stage in $Flow.ActiveStages.
Each time the flow moves to a different stage, an Assignment element resets the current stage and adds the new stage to the active
stages.
256
Automate Your Business Processes Flows
Note: This sample uses an Aura component to display the flow’s stages. For details, see Represent Your Flow’s Stages Visually.
The first screen displays only one active stage, which is also the user’s current stage: Review Cart.
Next, the flow moves to a new stage: Shipping Details. To make sure that the active stages and current stage respect the change, the
flow updates the global variables with an assignment.
$Flow.ActiveStages now contains the Review Cart and Shipping Details stages, and $Flow.CurrentStage is set to the
Shipping Details stage.
257
Automate Your Business Processes Flows
Often, a user’s shipping details and billing details are the same. On the Shipping Details screen, the user can indicate that the billing
address is different.
The flow uses the value of the Different Billing Address checkbox to determine where to go next. If the shipping and billing details are
the same, the flow continues to the Payment Details assignment. If the billing and shipping details are different, the flow moves to the
Billing Details assignment.
To make sure that the active stages and current stage respect the change, the flow updates the global variables with an assignment.
Now $Flow.ActiveStages contains the Review Cart, Shipping Details, and Billing Details stages, and $Flow.CurrentStage
is set to the Billing Details stage.
After the shipping and billing details are complete, the flow moves to the Payment Details stage. To make sure that the active stages
and current stage respect that change, the flow updates the global variables with an assignment.
258
Automate Your Business Processes Flows
$Flow.ActiveStages contains the Review Cart, Shipping Details, Billing Details (if the billing and shipping details are different),
and Payment Details stages. The $Flow.CurrentStage global variable is set to the Payment Details stage.
Finally, the flow moves to the last stage: Order Confirmation. To make sure that the active stages and current stage respect the change,
the flow updates the global variables with an assignment.
$Flow.ActiveStages now contains the Review Cart, Shipping Details, Billing Details (if the billing and shipping details are different),
Payment Details, and Order Confirmation stages. The $Flow.CurrentStage global variable is set to the Order Confirmation stage.
259
Automate Your Business Processes Flows
When the flow starts, Review Cart is automatically set to $Flow.CurrentStage, and $Flow.ActiveStages contains Review
Cart, Shipping Details, Payment Details, and Order Confirmation.
Each time the flow moves to a different stage, an Assignment element resets the current stage.
Note: This sample uses an Aura component to display the flow’s stages. For details, see Represent Your Flow’s Stages Visually.
The first screen displays all active stages and the user’s current stage: Review Cart.
Next, the flow moves to a new stage: Shipping Details. To make sure that the current stage respects the change, the flow updates the
global variable with an assignment. $Flow.CurrentStage is set to the Shipping Details stage.
260
Automate Your Business Processes Flows
Often, a user’s shipping details and billing details are the same. On the Shipping Details screen, the user can indicate that the billing
address is different.
The flow uses the value of the Different Billing Address checkbox to determine where to go next. If the shipping and billing details are
the same, the flow continues to the Payment Details assignment. If the billing and shipping details are different, the flow uses a Subflow
element to reference the Billing Details flow.
The Billing Details flow includes an optional stage for users to enter billing details between shipping and payment details.
When a referenced flow starts, its default active stages are automatically inserted in $Flow.ActiveStages after the current stage.
When the Billing Details flow starts, $Flow.CurrentStage is Shipping Details. The Billing Details stage is inserted into
$Flow.ActiveStages immediately after the current stage. Now $Flow.ActiveStages contains the Review Cart, Shipping
Details, Billing Details, Payment Details, and Order Confirmation stages.
The flow uses an assignment to set the current stage to Billing Details.
261
Automate Your Business Processes Flows
After the shipping and billing details are complete, the flow moves to the Payment Details stage. To make sure that the current stage
respects that change, the flow updates the system variable with an assignment.
Finally, the flow moves to the last stage: Order Confirmation. To make sure that the current stage respects the change, the flow updates
the global variable with an assignment.
$Flow.ActiveStages now contains the Review Cart, Shipping Details, Billing Details (if the billing and shipping details are different),
Payment Details, and Order Confirmation stages. The $Flow.CurrentStage global variable is set to the Order Confirmation stage.
262
Automate Your Business Processes Flows
Text Template The text for the template. To reference information from other resources,
use merge fields.
Rich Text Control the font, size, color, and alignment of text. Add merge fields, HTML
links, bullet points, or numbered lists. Rich text is on by default. Click
Plain Text Send email core actions use plain text. Some custom actions from
AppExchange or built by Salesforce developers also expect plain text. Click
Example: You’re designing a flow that registers people for an event. You create a text template that includes a registrant's name,
address, and other information. Then you use the template in an email confirmation that the flow sends when it finishes.
SEE ALSO:
Flow Resources
263
Automate Your Business Processes Flows
Field Description
Data Type Determines the types of values that the variable can store. You can’t change the data type of a previously
saved variable.
The Record data type can store multiple field values for one record. The Apex-defined data type can
store multiple field values for one Apex class.
Tip: Looking for sObject? In Flow Builder, that data type changed to Record.
Allow multiple When selected, the resource is a collection variable. You can store a list of values in collection variables.
values (collection) Collection variables can store only values that are compatible with its data type. When the data type
is Record, the collection variable can only store values for the associated object’s records.
For example, store multiple email addresses in a collection variable, and reference the collection
variable to send an email.
Object The object whose field values you can store in the variable. You can’t change the object of a previously
saved variable.
Available only when the data type is Record.
Decimal Places Controls the number of digits to the right of the decimal point up to 17 places. If you leave this field
blank or set it to zero, only whole numbers appear when your flow runs.
Available only when the data type is Number or Currency.
Availability Outside When a variable is available for input, it can be set at the start of the flow, such as when a flow is started
the Flow from a Lightning page, a process, or another flow. When a variable is available for output, it can be
accessed throughout the flow, such as by a Lightning web component or another flow.
The default value of the field depends on the release or API version in which the variable is created.
• If the variable was created in Summer ’12 or later, or in API version 25.0 or later, by default the
variable isn’t available for input or output.
• If the variable was created in Spring ’12 or earlier, or in API version 24.0 or earlier, by default the
variable is available for both input and output.
Warning: Disabling input or output access for an existing variable can break the functionality
of applications and pages that call the flow and access the variable. For example, you can access
variables from URL parameters, processes, and other flows.
This field doesn’t affect how variables are assigned or used within the same flow, for example, through
these types of elements: Assignment, Create Records, Get Records, and Apex Action.
264
Automate Your Business Processes Flows
Field Description
Default Value Determines the variable value when the flow starts. If you leave this field blank, the value is null.
Not available for Picklist and Multi-Select Picklist variables.
SEE ALSO:
Sample Flow That Loops Through a Collection
Flow Element: Loop
Flow Operators in Assignment Elements
Flow Resources
265
Automate Your Business Processes Flows
266
Automate Your Business Processes Flows
SEE ALSO:
Add Values to a Collection Variable
Flow Elements
Each element represents an action that the flow can execute. Examples include reading or writing
EDITIONS
Salesforce data, displaying information and collecting data from flow users, executing business
logic, or manipulating data. Available in: both Salesforce
Flow Builder gives you the option of building flows in free-form or in auto-layout. In free-form, the Classic and Lightning
Elements tab shows the types of elements that you can add to the flow by dragging them onto Experience
the canvas. In auto-layout, click to display the types of elements that you can add. For a list of Available in: Essentials,
all elements that were already added to the flow, see the Elements section of the Manager tab. Professional, Enterprise,
Performance, Unlimited,
Flow Element: Apex Action and Developer Editions
Call an Apex class. Apex classes are available as Apex actions only if one of the methods is
annotated with @InvocableMethod.
Flow Element: Apex Action (Legacy)
Call an Apex class that uses a legacy Apex interface. Apex classes are available as legacy Apex actions only if the Process.Plugin
interface has been implemented.
Flow Element: Assignment
Set values in variables, collection variables, record variables, record collection variables, and global variables.
Flow Element: Collection Filter
Apply criteria to a collection, and output only the items that meet the criteria.
Flow Element: Collection Sort
Reorder the items within a collection. Set the maximum number of items that remain in the collection after the sort.
Flow Element: Core Action
Perform an action outside of the flow. Choose from standard actions, like Post to Chatter or Send Email, and your org’s quick actions
and local actions.
Flow Element: Create Records
Create multiple Salesforce records by using a record collection variable. Create exactly one Salesforce record by using a record variable
or other values from the flow.
Flow Element: Get Records
Find Salesforce records that meet filter conditions, and store values from the records in variables.
267
Automate Your Business Processes Flows
SEE ALSO:
Flow Resources
Flow Builder
Add and Edit Elements
268
Automate Your Business Processes Flows
Usage
If a flow invokes Apex, the running user must have the corresponding Apex class assignment in their profile or permission set.
If the invoked method creates, updates, or deletes a record, that action isn’t performed until the interview’s transaction completes.
Transactions are complete when the interview either finishes or executes a Screen, Local Action, or Pause element.
Flow Builder doesn’t display descriptions for input and output values. For details about each parameter, ask the Apex developer for more
information.
Flow Builder displays Apex actions from managed packages only if the associated method is marked global.
SEE ALSO:
Add and Edit Elements
Let Flows Execute Apex Actions
Customize What Happens When a Flow Fails
Route a Flow
269
Automate Your Business Processes Flows
SEE ALSO:
Add and Edit Elements
Let Flows Execute Apex Actions
Customize What Happens When a Flow Fails
Route a Flow
Apex Reference Guide : Process Namespace
Value Variable and Value in the same row must have compatible data
types.
Options:
• Select an existing flow resource, such as a variable or screen
component.
• Create a resource.
• Manually enter a literal value or merge field.
270
Automate Your Business Processes Flows
Example: Change the value of a customer’s credit score based on how the customer answered questions earlier in the flow.
SEE ALSO:
Flow Elements
Flow Operators in Assignment Elements
Route a Flow
Flow Resources
Operator The available operators depend on the data type of the selected Field.
Value Field and Value in the same row must have compatible data types.
Options:
• Select an existing flow resource, such as a variable or screen component.
• Create a resource.
• Manually enter a literal value or merge field.
271
Automate Your Business Processes Flows
Usage
You can filter any collection found in Flow Builder, including collection variables that contain single values, collection variables that
contain records, and Apex-defined collection variables.
Collection Filter outputs a collection with the filtered results and doesn’t change the contents of the source collection. The output
collection is null until its corresponding Collection Filter runs.
Note: A Collection Filter’s output collection is named after its API name. For example, if a Collection Filter element is named
FilterLeads, its output collection is called CurrentItem_FilterLeads.
If you filter your collection with a formula, the formula must evaluate to a boolean (true or false) value. For more formula considerations,
see Flow Formula Considerations in Salesforce Help.
If you delete a Collection Filter element, its output collection remains in the flow. You can safely delete this collection variable afterwards.
• The available filter operators depend on the data type of the selected fields. For details, see Flow Operators in Data Elements and
Record Choice Sets.
SEE ALSO:
Flow Formula Considerations
Flow Operators in Data Elements and Record Choice Sets
Put empty When selected, this element sorts records with an empty or null value in the
string and Sort By field at the start of the collection. Otherwise, they’re placed at the end.
null
values
first
How Many Select Set the maximum number of items to determine the
Items to number of items that remain in the collection after the sort.
272
Automate Your Business Processes Flows
Field Description
Keep After
Sorting
Usage
When the Collection Sort element removes values or changes their order, it makes those changes directly in the selected collection
variable.
If the collection variable contains more than one field, click Add Sort Option to sort by additional fields in order of greater to
lesser priority. You can sort by up to 3 fields at a time.
273
Automate Your Business Processes Flows
SEE ALSO:
Add and Edit Elements
274
Automate Your Business Processes Flows
Example: A junior buyer in your org occasionally requires access to your Contracts object. Create a session-based permission set
with access to the object. Then create a flow that uses the Activate Session-Based Permission Set core action. Configure the action
to activate the permission set.
The junior buyer runs the flow to access contracts during the current user session. The action activates the permission set for the
junior buyer during the current session.
SEE ALSO:
Flow Core Action: Deactivate Session-Based Permission Set
Create a Flow That Can Activate or Deactivate a Session-Based Permission Set
Add and Edit Elements
275
Automate Your Business Processes Flows
Field Description
Permission Set The permission set’s namespace.
Namespace This parameter accepts single-value resources of any type. That value is treated as text.
SEE ALSO:
Flow Core Action: Activate Session-Based Permission Set
Create a Flow That Can Activate or Deactivate a Session-Based Permission Set
Add and Edit Elements
Note: To view Einstein Discovery predictions, improvements, and other details, users must Available in: Enterprise,
have the View Einstein Discovery Recommendations system permission. To learn more, Performance, Professional,
see Assign Einstein Discovery Permission Sets to Users . Developer, and Unlimited
Editions
Use values from an Einstein Discovery model to set the inputs for the action.
Field Description
Action Search for the deployed models to which you have access.
What to Store
276
Automate Your Business Processes Flows
Field Description
assign variables, and selectively store output values (class probabilities, the
prediction, and top predictors).
SEE ALSO:
About Models
Add and Edit Elements
Target Reference to the user, Chatter group, or record whose feed you want to post to.
Name or • To post to a user’s feed, enter the user’s ID or username. For example:
ID jsmith@salesforce.com
• To post to a Chatter group, enter the group’s name or ID. For example:
Entire Organization
• To post to a record, enter the record’s ID. For example: 001D000000JWBDx
This parameter accepts single-value resources of any type. That value is treated
as text.
277
Automate Your Business Processes Flows
Visibility Specifies whether this feed item is available to Experience Cloud site users. To display this feed item only to
internal users, set it to internalUsers.
Valid only if Digital Experiences is enabled. Valid values are:
• allUsers
• internalUsers
Usage
At run time, the Chatter post isn’t created until the interview’s transaction completes. Transactions are complete when the interview
either finishes or executes a Screen, Local Action, or Pause element.
SEE ALSO:
Flow Elements
Add and Edit Elements
Customize What Happens When a Flow Fails
Route a Flow
278
Automate Your Business Processes Flows
Field Description
Related Record Only for object-specific actions. The ID of the record from which the action executes.
ID For example, the action creates a case that’s associated with a given account. Assign the ID for that account
to Related Record ID.
This parameter accepts single-value resources of any type. That value is treated as text.
Example: Your org has an object-specific action that creates a case record on an account. The flow calls that action at run time
and uses values from earlier in the flow to identify the account ID.
Note: At run time, the record isn’t created or updated until the interview’s transaction completes. Transactions are complete
when the interview either finishes or executes a Screen, Local Action, or Pause element.
SEE ALSO:
Add and Edit Elements
Flow Elements
Customize What Happens When a Flow Fails
Route a Flow
279
Automate Your Business Processes Flows
SEE ALSO:
Add and Edit Elements
Flow Core Actions for Quip: Create Quip Document
Create a document, spreadsheet, or slide deck, and add content to it.
EDITIONS
Warning: Quip is retiring slides on January 31, 2021. After this date, the Copy Content action
in Process Builder and Flow Builder no longer works, and Slides isn’t a valid document type Available in: Lightning
for the Edit Document and Create Document actions. Tell Me More Experience
280
Automate Your Business Processes Flows
In Flow Builder, add an Action element to your flow. In the Action field, enter Quip, and select Create Quip Document.
Set Input Values
Use values from earlier in the flow to set the inputs for the action.
Add Members by Email Address Optional. A list of user emails separated by commas to add to the new document. Valid
values are:
• person1@quip.com, person2@quip.com, person3@quip.com
• person1@quip.com
Company Link Address Optional. Link sharing settings for the new document. By default, new documents are
set to edit-access. Valid values are:
• view–To let users view the document, enter this value.
• edit–To let users view and edit the document, enter this value.
• none–To block user access to the document, enter this value.
Content Type Optional. Format of content added to the document. By default, content format is set to
html. Valid values are:
• html–To format text added to Document Content with html, enter this value.
• liveapp–To add a live app to your document, enter this value. Only valid if
Document Type is set to document.
Document Content Optional. Content added to the new document. Valid only when Content Type is
set to html. By default, the document title is used for the document’s content. Valid values
are:
• String values
• @[Salesforce user ID]–To @mention a Salesforce user in the document,
enter the Salesforce ID. If the user’s Salesforce email is connected to Quip, the user
ID is replaced with a Quip user @mention. If not, the Salesforce ID is replaced with
the user’s Salesforce email.
• @[person1@quip.com]–To @mention a user by email, enter this value.
• @Everyone–To send a notification to all users added to document, enter this value.
Document Type Optional. Type of document created including documents and spreadsheets. By default,
new documents are created as documents. Valid values are:
• document–To create a document, enter this value.
• spreadsheet–To create a spreadsheet, enter this value.
Live App Type Type of live app added to the document. Required if Content Type is set to
liveapp. Only documents support live apps. Valid values are:
• salesforce_record–To add the Salesforce Record live app to the document,
enter this value.
281
Automate Your Business Processes Flows
Object Type Type of object used by the Salesforce List live app. Required if Live App Type is set
to salesforce_list. Only string values are supported. For example: Account,
Opportunity, or CustomObject__c.
Parent Folder URL Optional. A list of Quip folder URLs separated by commas to add the new document to.
By default, the document is added to the user’s Private folder in Quip. Valid values are:
• https://[quip_site_url]/folder/[folder1_name],
https://[quip_site_url]/folder/[folder2_name]
• https://[quip_site_url]/folder/[folder_name]
For example: https://salesforce.quip.com/folder/account-plans
Record Name Optional. Name of the record added to the document through the Salesforce Record live
app. Valid only if the Live App Type is set to salesforce_record. Only string
values are supported.
Record Type Optional. Type of object used by the Salesforce Record live app. Valid only if Live App
Type is set to salesforce_record. Only string values are supported. For example:
Account, Opportunity, or CustomObject__c.
Salesforce List View ID ID of the Salesforce list view added to the document. Required if Live App Type is
set to salesforce_list.
Salesforce Org Name Optional. Salesforce org name used in the live app. Valid only if Content Type is set
to liveapp. Only string values are supported. For example: Acme.
Salesforce Record ID ID of the Salesforce record added to the document. Required if Live App Type is
set to salesforce_record.
Example: A sales manager wants to create a document at the end of each quarter to identify which accounts are at risk of attrition.
You can create a flow that uses the Create Quip Document core action to create a document called Red Accounts. Add a Salesforce
list view through the Salesforce List live app that shows all accounts in the red. Then add the document a Red Accounts folder.
282
Automate Your Business Processes Flows
SEE ALSO:
Flow Elements
Flow Core Action for Quip: Create Quip Chat
Create a chat room, and send a message to its members.
EDITIONS
In Flow Builder, add an Action element to your flow. In the Action field, enter Quip, and select
Create Quip Chat. Available in: Lightning
Experience
Set Input Values
Use values from earlier in the flow to set the inputs for the action.
283
Automate Your Business Processes Flows
Chat Title The title of the chat room. Only string values are supported.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Quip: Create Quip Folder
Create a private folder, or add it to existing folders.
EDITIONS
In Flow Builder, add an Action element to your flow. In the Action field, enter Quip, and select
Create Quip Folder. Available in: Lightning
Experience
Set Input Values
Use values from earlier in the flow to set the inputs for the action.
Folder Color Optional. Color of the new folder. Valid values are:
• yellow
• red
• orange
• green
• blue
• purple
• manila
• light red
• light orange
• light green
• light blue
284
Automate Your Business Processes Flows
Parent Folder URL Optional. A list of folder URLs separated by commas to add the new folder to. By default,
the folder is added to the user’s Private folder in Quip. Valid values are:
• https://[quip_site_url]/folder/[folder1_name],
https://[quip_site_url]/folder/[folder2_name]
• https://[quip_site_url]/folder/[folder_name]
For example: https://salesforce.quip.com/folder/account-plans
SEE ALSO:
Add and Edit Elements
Flow Core Action for Quip: Copy Quip Document
To use a document as a template, create a copy. By default, copied documents are added to the
EDITIONS
running user’s Private folder in Quip.
In Flow Builder, add an Action element to your flow. In the Action field, enter Quip, and select Available in: Lightning
Copy Quip Document. Experience
Important: Newly copied documents aren’t automatically attached to the record. To attach
the newly created document to the record and use Synced Sharing, use the Attach Document
to Record action after the Copy Quip Document action and set the Salesforce Record ID to
be the ID of the variable.
Set Input Values
Use values from earlier in the flow to set the inputs for the action.
Company Link Access Optional. Link sharing settings for the copied document. By default, copied documents
are set to edit-access. Valid values are:
• view–To let users view the copied document, enter this value.
• edit–To let users view and edit the copied document, enter this value.
• none–To block user access to the copied document, enter this value.
285
Automate Your Business Processes Flows
Copy comments to new Optional. This input determines whether to copy comments from the source document
document to the copied document. Valid values are:
• true–To copy the source document’s comments and annotations, enter this value.
• false–To copy the source document’s content without comments, enter this value.
Member Emails Optional. A list of user emails separated by commas to add to the copied document. Valid
values are:
• person1@quip.com, person2@quip.com, person3@quip.com
• person1@quip.com
Member Folder URLs Optional. A list of folder URLs separated by commas to add the copied document to. Valid
values are:
• https://[quip_site_url]/folder/[folder1_name],
https://[quip_site_url]/folder/[folder2_name]
• https://[quip_site_url]/folder/[folder_name]
For example: https://salesforce.quip.com/folder/account-plans
Source Record ID Optional. ID of the record that you want to use in the place of mail merge syntax. For
example, to replace the copied document’s [[Account.Name] merge field with the record’s
account name, enter the record ID.
Target Record URL Field Optional. Reference to the URL field on a record used by the Context Record ID.
This field is updated with the copied document URL and adds the copied document to
the record’s Quip Document component. Valid values are:
• API name of the field–For example: QuipDocumentURL__c
The Context Record ID is required to use the Target Record URL Field.
Including the Target Record URL Field doesn’t attach the newly created document to the
record.
Title Optional. The title of the copied document. Only string values are supported.
286
Automate Your Business Processes Flows
SEE ALSO:
Add and Edit Elements
Flow Core Action for Quip: Copy Quip Content (Retired)
Copy content from a source slide deck, and paste it in a target slide.
EDITIONS
Warning: Quip is retiring slides on January 31, 2021. After this date, the Copy Content action
in Process Builder and Flow Builder no longer works, and Slides isn’t a valid document type Available in: Lightning
for the Edit Document and Create Document actions. Tell Me More Experience
Drag a Core Action element onto the canvas. In the Core Action field, enter Quip, and select Copy
Quip Content.
Set Input Values
Use values from earlier in the flow to set the inputs for the action.
Source Document URL URL of the slide deck you want to copy content from.
Target Document URL URL of the slide deck where you want to add copied content.
Slide Count Range Optional. Number of slides to copy from the source slide deck. By default, Slide Count
Range is set to 1.
287
Automate Your Business Processes Flows
Source Slide Number Optional. The slide index to copy content from. For example, to copy content from the
first slide of a deck, enter 1.
Target Record ID Optional. ID of the record you want to use in the place of mail merge syntax. For example,
to replace the copied document’s [[Account.Name] merge field with the record’s account
name, enter the record ID.
Target Section Anchor Link URL of a section in the target slide deck where you want to paste copied content.
Target Slide Number Optional. The slide index to copy content to. For example, to paste copied content to the
first slide of a deck, enter 1.
Document Link URL of the target slide deck content was copied to.
Created Document Title The title of the slide deck content was copied to. Only string values are supported.
Example: A sales rep wants to update a slide deck with the latest sales numbers to prepare for a customer pitch. The sales rep
wants to use the slides from another deck that their manager keeps up to date with the latest numbers. You can create a flow that
uses the Copy Quip Content core action to copy content slides 1 and 2 from their manager’s slide deck and replace the content
in slides 3 and 4 of the customer-facing slide deck.
288
Automate Your Business Processes Flows
Content Location Optional. Location in the document where you want to live paste your copied content.
Valid values are:
• append–To live paste content to the end of the document, enter this value.
• prepend–To live paste content to the beginning of the document, enter this value.
• after_section–To live paste content after a designated section, enter this value.
Valid only if Target Section Anchor Link is specified.
• before_section–To live paste content before a designated section, enter this
value. Valid only if Target Section Anchor Link is specified.
• replace_section–To replace an existing section with live pasted content, enter
this value. Valid only if Target Section Anchor Link is specified.
• after_document_range–To live paste content after a named document range,
enter this value. Valid only if Target Document Range Heading Text
is specified.
• before_document_range–To live paste content before a named document
range, enter this value. Valid only if Target Document Range Heading
Text is specified.
• replace_document_range–To replace a named document range with live
pasted content, enter this value. Valid only if Target Document Range
Heading Text is specified.
By default, Content Location is set to append.
Content Type Type of content that you want to copy. Valid values are:
• anchor_link–To copy content based on a section anchor link URL, enter this
value.
• document_range–To copy content from a template based on a document range
name, enter this value.
Source Document Range Heading text from the document range that you want to copy. Valid only if Content
Heading Type is set to document_range.
Target Document URL URL of the document that you want to copy live pasted content to.
289
Automate Your Business Processes Flows
Target Document Range Heading text from the document range where you want to live paste your copied content.
Heading Text
Update Automatically Optional. Automatically update the target document when the source content is updated
and Live Paste is on. Valid values are:
• true
• false
By default, Update Automatically is set to false.
Document Link URL of the document where live pasted content was added.
Document Title Title of the document where live pasted content was added.
Example: A sales manager wants to add instructions to all Account Plans to teach their sales reps what to do next. But the sales
manager doesn’t want to update each one individually. You can create a flow that uses the Copy with Live Paste core action to
add the updated instructions to the end of the Account Plan.
290
Automate Your Business Processes Flows
SEE ALSO:
Add and Edit Elements
Flow Core Action for Quip: Attach Quip Document to Record
Attach a document to a Salesforce record. Linked documents show up in the Quip Associated
EDITIONS
Documents component.
In Flow Builder, add an Action element to your flow. In the Action field, enter Quip, and select Available in: Lightning
Attach Quip Document to Record. Experience
Set Input Values
Use values from earlier in the flow to set the inputs for the action.
Salesforce Record ID ID of the Salesforce record that you want to attach your document to.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Quip: Edit Quip Document
Edit content in a document, spreadsheet, or slide. Add or replace content based on a document
EDITIONS
section.
In Flow Builder, add an Action element to your flow. In the Action field, enter Quip, and select Available in: Lightning
Edit Quip Document. Experience
Warning: Quip is retiring slides on January 31, 2021. After this date, the Copy Content action
in Process Builder and Flow Builder no longer works, and Slides isn’t a valid document type
for the Edit Document and Create Document actions. Tell Me More
Set Input Values
Use values from earlier in the flow to set the inputs for the action.
291
Automate Your Business Processes Flows
Document URL URL of the document that you want to edit. For example:
https://salesforce.quip.com/GVnGbtEasAGa
Edit Document Type Type of document that you want to edit. Valid values are:
• document–To edit a document, enter this value.
• spreadsheet–To edit a spreadsheet, enter this value.
Content Optional. Content added to the document that you want to edit. Valid only if Content
Format is set to html. Valid values are:
• String values
• @[Salesforce user ID]–To @mention a Salesforce user in the document,
enter the Salesforce ID. If the user’s Salesforce email is connected to Quip, the user
ID is replaced with a Quip user @mention. If not, the Salesforce ID is replaced with
the user’s Salesforce email.
• @[person1@quip.com]–To @mention a user by email, enter this value.
• @Everyone–To send a notification to everyone in the document, enter this value.
Content Format Optional. Format of content added to the document. By default, content format is set to
html. Valid values are:
• html–To format text added to Document Content with html, enter this value.
• liveapp–To add a live app to your document, enter this value. Only valid if
Document Type is set to document.
Disable Extra Lines in Quip Optional. Boolean parameter that prevents Quip from inserting an extra line between
paragraphs. The default is false, meaning that by default extra lines are inserted.
Document Range Heading Optional. Heading text that marks the start of the document range.
292
Automate Your Business Processes Flows
Image Number
Warning: Quip is retiring slides on January 31, 2021. After this date, the Copy
Content action in Process Builder and Flow Builder no longer works, and Slides
isn’t a valid document type for the Edit Document and Create Document actions.
Tell Me More
Optional. Image index of an image on a slide. Only valid if Document Type is set to
slides. Valid values are:
• Image integers–Integers represent an image index on a slide. Images are
ordered from top to bottom. Images closer to the top of a slide have an image integer
of 1. Images closer to the bottom have the biggest integers. If there are multiple
images on a slide with the same vertical positions, the image numbers are ordered
from left to right. If there are multiple images on a slide with the same horizontal and
vertical positions, the image that is behind the other one has an image number of
1. The image in front has an image number of 2.
Image URL
Warning: Quip is retiring slides on January 31, 2021. After this date, the Copy
Content action in Process Builder and Flow Builder no longer works, and Slides
isn’t a valid document type for the Edit Document and Create Document actions.
Tell Me More
Optional. The URL of an image in a slide deck. Only valid if Document Type is set to
slides.
Live App Type Type of live app added to the document. Required if Content Format is set to
liveapp. Only documents support live apps. Valid values are:
• salesforce_record–To add the Salesforce Record live app to the document,
enter this value.
• salesforce_list–To add the Salesforce List live app to the document, enter
this value.
Object Type Type of object used by the Salesforce List live app. Required if Live App Type is set
to salesforce_list. Only string values are supported. For example: Account,
Opportunity, or CustomObject__c.
Record Name Optional. Name of the record added to the document through the Salesforce Record live
app. Valid only if the Live App Type is set to salesforce_record. Only string
values are supported.
Record Type Optional. Type of object used by the Salesforce Record live app. Valid only if Live App
Type is set to salesforce_record. Only string values are supported. For example:
Account, Opportunity, or CustomObject__c.
293
Automate Your Business Processes Flows
Salesforce Org Name Optional. Salesforce org name used in the live app. Valid only if Content Format is
set to liveapp. Only string values are supported. For example: Acme.
Salesforce Record ID Optional. ID of the Salesforce record added to the document. Valid only if Live App
Type is set to salesforce_record.
Section Anchor Link URL of a section in the document where you want to add or replace content. Valid only
if Content Location is set to before_section, after_section, or
replace_section. For example:
https://[quip_site_url]/GVnGAtEawAGh/Source-Slide#JUJACAuc0ps,
where Source-Slide#JUJACAuc0ps is a specific slide in the slide deck.
Section Match Type Placement of keywords used to identify the section where you want to add or replace
content. Valid only if Content Location is set to before_section,
after_section, or replace_section, and the Document Type is
document. Keywords aren’t case-sensitive and ignore HTML tags. Valid values are:
• prefix–To find a keyword in a document based on the first part of a word, enter
this value. For example, hello is the prefix for helloworld.
• suffix–To find a keyword in a document based on the end of a word, enter this
value. For example, world is the suffix for helloworld.
Section Style Format of the document section where you want to add or replace content. Required if
Section Type is set to textmatch. Valid values are:
• paragraph–To find a keyword in a paragraph, enter this value.
• heading–To find a keyword in a heading, enter this value.
• list–To find a keyword in a list, enter this value.
Section Text Keywords to identify the section where you want to add or replace content. Required if
Section Match Type is specified. Only string values are supported.
Section Type Optional. Determines how a section is edited. Valid values are:
• anchorlink–To edit a document section based on its anchorlink, enter this value.
Valid only if Section Anchor Link is set up.
• textmatch–To edit a document section based on a keyword, enter this value.
Slide Layout
Warning: Quip is retiring slides on January 31, 2021. After this date, the Copy
Content action in Process Builder and Flow Builder no longer works, and Slides
isn’t a valid document type for the Edit Document and Create Document actions.
Tell Me More
Optional. The slide element to edit. Only valid if Document Type is set to slides.
Valid values are:
• single_column–To edit a slide column, enter this value.
• image–To edit a slide image, enter this value.
294
Automate Your Business Processes Flows
Example: A sales rep wants to update their Account Plan and add a list view of open opportunities related to the account. You
can create a flow that uses the Edit Document core action to add the Salesforce List live app to the end of the Account Plan.
Example: A service manager wants to update an Account Plan with an account history. The account is up for renewal and the
service manager wants to make sure that the sales rep has the necessary background on past cases before contacting the customer.
You can create a flow that uses the Edit Document core action to add an account history to an Account Plan and place it before
the placeholder lorem.
295
Automate Your Business Processes Flows
SEE ALSO:
Add and Edit Elements
Flow Core Action for Quip: Lock Quip Document
To mark a document as complete, lock document edits.
EDITIONS
In Flow Builder, add an Action element to your flow. In the Action field, enter Quip, and select
Lock Quip Document. Available in: Lightning
Experience
Set Input Values
Use values from earlier in the flow to set the inputs for the action.
Lock Operation Action of locking or unlocking the document. Only a user with full access to the document
can lock or unlock it. Valid values are:
• lock—To lock edits to the document, enter this value.
• unlock—To let users edit a locked document, enter this value.
296
Automate Your Business Processes Flows
Example: A sales manager wants to lock edits to their reps’ Account Plans after a deal is closed. You can create a flow that uses
the Lock Quip Document core action to lock edits to Account Plans when the Opportunity stage is set to Closed Won.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Quip: Lock Quip Section
To mark sections of a document as complete or to keep them safe from accidental edits, lock them.
EDITIONS
In Flow Builder, add an Action element to your flow. In the Action field, enter Quip, and select
Lock Quip Section. Available in: Lightning
Experience
Set Input Values
Use values from earlier in the flow to set the inputs for the action.
Lock Operation Action of locking or unlocking a document section. Only a user with full access to the
document can lock or unlock its sections. Valid values are:
• lock—To lock edits to the document, enter this value.
• unlock—To let users edit a locked document, enter this value.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Quip: Export Quip Document to PDF
To mark a document as complete and to keep a copy for your records, export it as a PDF. You can
EDITIONS
attach the exported PDF to a document or to a Salesforce record.
Set Input Values Available in: Lightning
Use values from earlier in the flow to set the inputs for the action. Experience
297
Automate Your Business Processes Flows
Sheet Name Name of the sheet in a spreadsheet that you want to export to a PDF. Valid only for
spreadsheet files. If no sheet name is entered, defaults to the first sheet.
Target Document URL Optional. URL of the document where you want to attach the created PDF. The PDF is
added to the end of the document.
Salesforce Organization ID ID of the Salesforce org where you want to attach your new PDF. You can use the same
Salesforce org ID of the triggering record, or attach the PDF to a different org. Valid only
if Target Record ID is specified.
Target Record ID Optional. ID of the Salesforce record you want to attach your document to. PDFs attached
to a record are added to the record’s Files component and Notes and Attachments
component, and are visible to any user with access to the record. Valid values are:
• Alphanumeric series of numbers and letters for a specific Salesforce record.
• {!$Record.Id}To attach the PDF to the same record that triggered the flow,
enter this value.
Status message Error message that explains why the document wasn’t exported to a PDF.
Status of the request Success marker of whether the document was exported to a PDF. Can be success,
failure, or pending.
SEE ALSO:
Flow Elements
Flow Core Action for Quip: Send Message in Quip Chat
Send a message in a chat room.
EDITIONS
In Flow Builder, add an Action element to your flow. In the Action field, enter Quip, and select
Send Message in Quip Chat. Available in: Lightning
Experience
Set Input Values
Use values from earlier in the flow to set the inputs for the action.
298
Automate Your Business Processes Flows
SEE ALSO:
Add and Edit Elements
Flow Core Action for Quip: Send a Message in a Document
Add a message to the conversations pane of a document.
EDITIONS
In Flow Builder, add an Action element to your flow. In the Action field, enter Quip, and select
Send Message in Document. Available in: Lightning
Experience
Set Input Values
Use values from earlier in the flow to set the inputs for the action.
Section Anchor Link Optional. URL of a section in the document where you want the message to appear.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Quip: Add Quip Document to Folder
Add a document to a folder to organize and share your documents.
EDITIONS
In Flow Builder, add an Action element to your flow. In the Action field, enter Quip, and select
Add Quip Document to Folder. Available in: Lightning
Experience
Set Input Values
Use values from earlier in the flow to set the inputs for the action.
299
Automate Your Business Processes Flows
Folder URL URL of the folder where you want to add the document.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Quip: Add Members to Document
Add members with different levels of access to a document.
EDITIONS
In Flow Builder, add an Action element to your flow. In the Action field, enter Quip, and select
Add Members to Document. Available in: Lightning
Experience
Set Input Values
Use values from earlier in the flow to set the inputs for the action.
Add Comment-Access Members Optional. A list of user emails separated by commas that can view and comment on the
by Email Address document. Valid values are:
• person1@quip.com, person2@quip.com, person3@quip.com
• person1@quip.com
Add Edit-Access Member by Optional. A list of user emails separated by commas that can view, comment on, and edit
Email Address the document. Valid values are:
• person1@quip.com, person2@quip.com, person3@quip.com
• person1@quip.com
Add Full-Access Members by Optional. A list of user emails separated by commas that can view, comment on, edit,
Email Address and share the document. Valid values are:
• person1@quip.com, person2@quip.com, person3@quip.com
• person1@quip.com
300
Automate Your Business Processes Flows
Example: A service manager wants to add Tier 3 service reps to a Case Swarm document to solve a customer case. The service
manager also wants to keep sales reps with open opportunities related to the account up to date. You can create a flow that uses
the Add Members to Document core action to add Tier 3 reps to the Case Swarm document and grant the service reps edit-access
to the document. Then you can add the sales reps with open opportunities to the document with comment-access so that they
can see what’s happening and ask questions.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Quip: Add Members to Quip Chat
Add users to a chat room.
EDITIONS
In Flow Builder, add an Action element to your flow. In the Action field, enter Quip, and select
Add Members to Quip Chat. Available in: Lightning
Experience
Set Input Values
Use values from earlier in the flow to set the inputs for the action.
Chat URL URL of the chat room that you want to add members to.
301
Automate Your Business Processes Flows
SEE ALSO:
Add and Edit Elements
Flow Core Action for Quip: Remove Quip Document from Folder
Remove a document from a folder. Make a shared document private again.
EDITIONS
In Flow Builder, add an Action element to your flow. In the Action field, enter Quip, and select
Remove Quip Document from Folder. Available in: Lightning
Experience
Set Input Values
Use values from earlier in the flow to set the inputs for the action.
Folder URL URL of the folder that you want to remove the document from.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Quip: Remove Members from Quip Document
To rescind access to a document for certain users, remove them from the document.
EDITIONS
In Flow Builder, add an Action element to your flow. In the Action field, enter Quip, and select
Remove Members from Quip Document. Available in: Lightning
Experience
Set Input Values
Use values from earlier in the flow to set the inputs for the action.
Remove Members by Email A list of user emails separated by commas to remove from the document. Valid values
Address are:
• person1@quip.com, person2@quip.com, person3@quip.com
302
Automate Your Business Processes Flows
Example: A service manager previously added Tier 3 service reps and sales reps to a Case Swarm document to solve a customer
case. Now that the case is closed, the service manager wants to remove user access to the document to preserve its integrity. You
can create a flow that uses the Remove Members from Quip Document core action to remove Tier 3 reps and sales reps from the
document.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Quip: Remove Members from Quip Chat
Remove users from a chat room.
EDITIONS
In Flow Builder, add an Action element to your flow. In the Action field, enter Quip, and select
Remove Members from Quip Chat. Available in: Lightning
Experience
Set Input Values
Use values from earlier in the flow to set the inputs for the action.
Chat URL URL of the chat room that you want to remove members from.
303
Automate Your Business Processes Flows
SEE ALSO:
Add and Edit Elements
SEE ALSO:
Add and Edit Elements
Flow Core Action for Checkout Flow: Activate Order
304
Automate Your Business Processes Flows
Error Conditions
User Can’t Invoke The caller doesn’t have the appropriate permissions to call the action, including the MAD or B2B Commerce
Action Integrator user perms.
Error Code: BAD_REQUEST
HTTP Status Code: 400
User Doesn’t Have The buyer doesn’t own the cart, doesn’t have read access to the cart, or the cart isn’t shared with the buyer.
Access to the Cart
Error Code: BAD_REQUEST
HTTP Status Code: 400
The Cart Isn’t in the The cart status isn’t in the Checkout state and can’t continue.
Checkout State
Error Code: INVALID_OPERATION
HTTP Status Code: 403
Integration Is Already Only one integration can be processed at a time. This error indicates when an integration is already running.
in Progress
Error Code: ALREADY_IN_PROCESS
305
Automate Your Business Processes Flows
CartValidationOutput The CartValidationOutput object has errors that are related to the cart and must be cleared before order
Object Has Errors activation.
Error Code: INVALID_INPUT
HTTP Status Code: 403
CheckoutSession Isn’t Checkout Session state must be in the Activate state for the order activation to go forward.
in the Activate State
Error Code: INVALID_INPUT
HTTP Status Code: 403
CheckoutSession Is in CheckoutSession can’t be in the Processing state. Processing indicates a separate integration is already running.
the Processing State Error Code: INVALID_INPUT
Invalid Order Status The Order status input that is passed to the API must be the ACTIVATE status code.
Input
Error Code: UNKNOWN_EXCEPTION
HTTP Status Code: 500
Usage
To use the B2B Commerce Activate Order action, these requirements apply.
1. The user has the appropriate permissions to invoke the action.
2. The effective account is valid.
3. The buyer account is a member of the store.
4. The buyer has edit access to the cart.
5. An order in Draft status is generated from the cartToOrder action, and the orderId is in CartCheckoutSession.
306
Automate Your Business Processes Flows
SEE ALSO:
Add and Edit Elements
Flow Core Action for Checkout Flow: Calculate Cart Promotions
Request a full calculation of all line items in the cart that have a promotion.
EDITIONS
In Flow Builder, add an Action element to your flow. Select the B2B Commerce category, and
search for Calculate Cart Promotions. To access this action from the API, use the name Available in: Lightning
calcCartPromotionsAction. Experience
Set Input Values Available in: Performance,
Use values from earlier in the flow to set the inputs. Professional, and Unlimited
Editions with B2B Commerce
Input Description
Parameter
cartId The ID of the cart that you want to reprice.
Error Conditions
User Can’t Invoke The caller doesn’t have the appropriate permissions to call the action, including the MAD or B2B Commerce
Action Integrator user perms.
307
Automate Your Business Processes Flows
User Doesn’t Have The buyer doesn’t own the cart, doesn’t have read access to the cart, or the cart isn’t shared with the buyer.
Access to the Cart
Error Code: BAD_REQUEST
HTTP Status Code: 400
Cart Isn’t in the The cart status isn’t in the Checkout state and can’t continue.
Checkout State
Error Code: INVALID_OPERATION
HTTP Status Code: 403
Integration Is Already Only one integration can be processed at a time. This error indicates when an integration is already running.
in Progress
Error Code: ALREADY_IN_PROCESS
HTTP Status Code: 400
Usage
This action is executed asynchronously using the pricing service configured in StoreIntegratedService.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Checkout Flow: Calculate Cart Shipment Costs
Request the shipping costs of all line items within the cart.
EDITIONS
In Flow Builder, add an Action element to your flow. Select the B2B Commerce category, and
search for Calculate Cart Shipment Costs. To access this action from the API, use the name Available in: Lightning
calcCartShipmentAction. Experience
Set Input Values Available in: Performance,
Use values from earlier in the flow to set the inputs. Professional, and Unlimited
Editions with B2B Commerce
308
Automate Your Business Processes Flows
Error Conditions
User Can’t Invoke The caller doesn’t have the appropriate permissions to call the action, including the MAD or B2B Commerce
Action Integrator user perms.
Error Code: BAD_REQUEST
HTTP Status Code: 400
User Doesn’t Have The buyer doesn’t own the cart, doesn’t have read access to the cart, or the cart isn’t shared with the buyer.
Access to the Cart
Error Code: BAD_REQUEST
HTTP Status Code: 400
Cart Isn’t in the The cart status isn’t in the Checkout state and can’t continue.
Checkout State
Error Code: INVALID_OPERATION
HTTP Status Code: 403
Integration Is Already Only one integration can be processed at a time. This error indicates when an integration is already running.
in Progress
Error Code: ALREADY_IN_PROCESS
HTTP Status Code: 400
309
Automate Your Business Processes Flows
Usage
This action is executed asynchronously using the pricing service configured in StoreIntegratedService.
To use the B2B Commerce Check Cart Shipment Cost action, these requirements apply.
1. The user has the appropriate permissions to invoke the action.
2. The effective account is valid.
3. The buyer account is a member of the store.
4. The buyer has edit access to the cart.
5. The cart status isn’t Closed.
6. Session.IsProcessing isn’t set to False.
7. Session.NextState is set to DeliveryMethod.
8. Session.State can’t be empty.
9. backgroundOperationId can’t be New or Running.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Checkout Flow: Calculate Cart Taxes
Request a tax cost calculation for all line items within the cart.
EDITIONS
In Flow Builder, add an Action element to your flow. Select the B2B Commerce category, and
search for Calculate Cart Taxes. To access this action from the API, use the name Available in: Lightning
calcCartTaxesAction. Experience
Set Input Values Available in: Performance,
Use values from earlier in the flow to set the inputs. Professional, and Unlimited
Editions with B2B Commerce
Input Description
Parameter
cartId The ID of the cart that transitions into a checkout.
Error Conditions
310
Automate Your Business Processes Flows
User Can’t Invoke The caller doesn’t have the appropriate permissions to call the action, including the MAD or B2B Commerce
Action Integrator user perms.
Error Code: BAD_REQUEST
HTTP Status Code: 400
User Doesn’t Have The buyer doesn’t own the cart, doesn’t have read access to the cart, or the cart isn’t shared with the buyer.
Access to the Cart
Error Code: BAD_REQUEST
HTTP Status Code: 400
Cart Isn’t in the The cart status isn’t in the Checkout state and can’t continue.
Checkout State
Error Code: INVALID_OPERATION
HTTP Status Code: 403
Integration Is Already Only one integration can be processed at a time. This error indicates when an integration is already running.
in Progress
Error Code: ALREADY_IN_PROCESS
HTTP Status Code: 400
Usage
This action is executed asynchronously using the pricing service configured in StoreIntegratedService.
To use the B2B Commerce Calculate Cart Taxes action, these requirements apply.
1. The user has the appropriate permissions to invoke the action.
2. The effective account is valid.
3. The buyer account is a member of the store.
4. The buyer has edit access to the cart.
5. The cart status isn’t Closed.
311
Automate Your Business Processes Flows
SEE ALSO:
Add and Edit Elements
Flow Core Action for Checkout Flow: Cancel Cart Async Operation
Cancel the current checkout so the user can return to an unlocked cart. This operation automatically
EDITIONS
executes when cart changes are invoked, such as add to cart.
In Flow Builder, add an Action element to your flow. Select the B2B Commerce category, and Available in: Lightning
search for Cancel Cart Async Operation. To access this action from the API, use the name Experience
cancelCartAsyncOperation.
Available in: Performance,
Set Input Values Professional, and Unlimited
Use values from earlier in the flow to set the inputs. Editions with B2B Commerce
Input Description
Parameter
cartId The ID of the cart that transitions into a checkout.
Error Conditions
Usage
To use the B2B Commerce Cancel Cart Async Operation, these requirements apply.
1. The user has the appropriate permissions to invoke the action.
2. The effective account is valid.
3. The buyer account is a member of the store.
4. The cart status can’t be Closed.
5. There’s an active CartCheckoutSession associated with the cart.
6. There’s a valid BackgroundOperationId.
When the Cancel Cart Async Operation runs, these API interactions occur.
1. The background operation is marked as canceled.
2. The cart transitions to the Active state, unlocking the cart for more updates.
312
Automate Your Business Processes Flows
SEE ALSO:
Add and Edit Elements
Flow Core Action for Checkout Flow: Cart to Order
Create a Salesforce standard order in draft mode.
EDITIONS
In Flow Builder, add an Action element to your flow. Select the B2B Commerce category, and
search for Cart To Order . To access this action from the API, use the name Available in: Lightning
cartToOrderAction. Experience
Set Input Values Available in: Performance,
Use values from earlier in the flow to set the inputs. Professional, and Unlimited
Editions with B2B Commerce
Input Description
Parameter
cartId The ID of the cart that transitions into a checkout.
Error Conditions
User Can’t Invoke The caller doesn’t have the appropriate permissions to call the action, including the MAD or
Action B2BCommerceIntegrator user perms.
Error Code: BAD_REQUEST
HTTP Status Code: 400
User Doesn’t Have The buyer doesn’t own the cart, doesn’t have read access to the cart, or the cart isn’t shared with the buyer.
Access to the Cart
Error Code: BAD_REQUEST
HTTP Status Code: 400
Cart Isn’t in the The cart status isn’t in the Checkout state and can’t continue.
Checkout State
Error Code: INVALID_OPERATION
313
Automate Your Business Processes Flows
Integration Is Already Only one integration can be processed at a time. This error indicates when an integration is already running.
in Progress
Error Code: ALREADY_IN_PROCESS
HTTP Status Code: 400
Usage
To use the B2B Commerce Cart to Order action, these requirements apply.
1. The user has the appropriate permissions to invoke the action.
2. The effective account is valid.
3. The buyer account is a member of the store.
4. The buyer has edit access to the cart.
5. The cart status is CartStatusEnum.CHECKOUT.
6. Session.IsProcessing isn’t set to False.
7. Session.NextState is set to cartToOrder.
8. Session.State can’t be empty.
9. backgroundOperationId can’t be New or Running.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Checkout Flow: Check Cart Inventory
Request a full inventory availability check of all line items in the cart.
EDITIONS
In Flow Builder, add an Action element to your flow. Select the B2B Commerce category, and
search for Check Cart Inventory. To access this action from the API, use the name Available in: Lightning
checkCartInventoryAction. Experience
Set Input Values Available in: Performance,
Use values from earlier in the flow to set the inputs. Professional, and Unlimited
Editions with B2B Commerce
314
Automate Your Business Processes Flows
Error Conditions
User Can’t Invoke The caller doesn’t have the appropriate permissions to call the action, including the MAD or B2B Commerce
Action Integrator user perms.
Error Code: BAD_REQUEST
HTTP Status Code: 400
User Doesn’t Have The buyer doesn’t own the cart, doesn’t have read access to the cart, or the cart isn’t shared with the buyer.
Access to the Cart
Error Code: BAD_REQUEST
HTTP Status Code: 400
The Cart Isn’t in the The cart status isn’t in the Checkout state and can’t continue.
Checkout State
Error Code: INVALID_OPERATION
HTTP Status Code: 403
Integration Is Already Only one integration can be processed at a time. This error indicates when an integration is already running.
in Progress
Error Code: ALREADY_IN_PROCESS
HTTP Status Code: 400
315
Automate Your Business Processes Flows
Usage
This action is executed asynchronously using the pricing service configured in StoreIntegratedService.
To use the B2B Commerce Check Cart Inventory action, these requirements apply.
1. The user has the appropriate permissions to invoke the action.
2. The effective account is valid.
3. The buyer account is a member of the store.
4. The buyer has edit access to the cart.
5. The cart status isn’t Closed.
6. Session.IsProcessing isn’t set to False.
7. Session.NextState is set to CheckInventory.
8. Session.State can’t be empty.
9. backgroundOperationId can’t be New or Running.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Checkout Flow: Checkout Session Action
Get or create a checkout session, and return the ID of the session to the caller.
EDITIONS
In Flow Builder, add an Action element to your flow. Select the B2B Commerce category, and
search for Checkout Session Action. To access this action from the API, use the name Available in: Lightning
checkoutSessionAction. Experience
Set Input Values Available in: Performance,
Use values from earlier in the flow to set the inputs. Professional, and Unlimited
Editions with B2B Commerce
Input Description
Parameter
cartId The ID of the cart that transitions into a checkout.
Error Conditions
316
Automate Your Business Processes Flows
User Can’t Invoke The caller doesn’t have the appropriate permissions to call the action, including the MAD or B2B Commerce
Action Integrator user perms.
Error Code: BAD_REQUEST
HTTP Status Code: 400
User Doesn’t Have The user doesn’t have access to the effective account either because it isn’t a buyer account or they don’t have
Access to the Effective permission to buy for the account.
Account
Error Code: BAD_REQUEST
HTTP Status Code: 400
User Account Isn’t The current logged-in buyer account isn’t associated with the store and therefore isn’t a store member.
Associated With the
Store Error Code: BAD_REQUEST
HTTP Status Code: 400
The Session Wasn’t The session wasn’t created due to an internal service error.
Created
Error Code: UNKNOWN_EXCEPTION
HTTP Status Code: 500
Usage
To use the B2B Commerce Checkout Session Action, these requirements apply.
1. The user has the appropriate permissions to invoke the action.
2. The effective account is valid.
3. The buyer account is a member of the store.
4. The cart status is set to Active or Checkout.
5. The cart must not have any current, active session.
When the Checkout Session Action runs, these API interactions occur.
1. The cart transitions to the Checkout state, preventing more updates to the cart.
2. If it doesn’t exist already, the CartCheckoutSession object is created.
317
Automate Your Business Processes Flows
3. All errors that are mapped to the input cartId, on the CartValidationOutput object, are cleared.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Checkout Flow: Price Cart
Request a reprice of all line items in a cart.
EDITIONS
In Flow Builder, add an Action element to your flow. Select the B2B Commerce category, and
search for Price Cart. To access this action from the API, use the name priceCart. Available in: Lightning
Experience
Set Input Values
Use values from earlier in the flow to set the inputs. Available in: Performance,
Professional, and Unlimited
Input Description Editions with B2B Commerce
Parameter
cartId The ID of the cart containing the items that you want to reprice.
Error Conditions
User Can’t Invoke The caller doesn’t have the appropriate permissions to call the action, including the MAD or B2B Commerce
Action Integrator user perms.
Error Code: BAD_REQUEST
HTTP Status Code: 400
User Doesn’t Have The buyer doesn’t own the cart, doesn’t have read access to the cart, or the cart isn’t shared with the buyer.
Access to the Cart
Error Code: BAD_REQUEST
HTTP Status Code: 400
Cart Isn’t in the The cart status isn’t in the Checkout state and can’t continue.
Checkout State
Error Code: INVALID_OPERATION
HTTP Status Code: 403
318
Automate Your Business Processes Flows
Usage
This action is executed asynchronously using the pricing service configured in StoreIntegratedService.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Checkout Flow: Update Checkout Session Action
The Update Checkout Session action updates the checkout session state if the current state matches
EDITIONS
the expected state. This action provides consistency during checkout handling and guarantees that
if two browsers attempt to update the state, one succeeds and the other fails validation. Available in: Lightning
In Flow Builder, add an Action element to your flow. Select the B2B Commerce category, and Experience
search for Update Checkout Session Action. To access this action from the API, use the name
Available in: Performance,
updateCheckoutSessionAction.
Professional, and Unlimited
Set Input Values Editions with B2B Commerce
Use values from earlier in the flow to set the inputs.
nextState The state the session moves to after it completes the tasks included in the current state.
This input is an Apex-defined variable of enum CheckoutStateEnum.
319
Automate Your Business Processes Flows
Error Conditions
Invalid Session or Either the session doesn’t exist or the user doesn’t have the required permissions.
Inadequate User
Access Error Code: INSUFFICIENT_ACCESS_OR_READONLY
HTTP Status Code: 400
User Can’t Invoke The caller doesn’t have the appropriate permissions to call the action, including the MAD or B2B Commerce
Action Integrator user perms.
Error Code: BAD_REQUEST
HTTP Status Code: 400
Account Associated The effective account associated with the cart isn’t a valid account.
With Cart Is Invalid or
Inaccessible Error Code: INSUFFICIENT_ACCESS_OR_READONLY
HTTP Status Code: 400
User Isn’t a Member of The buyer user isn’t a member of the store.
the Store
Error Code: INSUFFICIENT_ACCESS_OR_READONLY
HTTP Status Code: 400
Usage
To use the B2B Commerce Update Checkout Session Action, these requirements apply.
1. The user has the appropriate permissions to invoke the action.
2. The effective account is valid.
3. The buyer account is a member of the store.
4. The cart status isn’t set to Closed or Processing.
320
Automate Your Business Processes Flows
SEE ALSO:
Add and Edit Elements
Input Description
Parameter
Cart ID of the cart or state of the cart to add an item to. Valid state values are: active
State or and current. A current cart is neither closed nor pending deletion.
ID
effectiveAccountId (Optional) ID of the buyer account or guest buyer profile for which the request
is made. If unspecified, the default value is determined from context.
321
Automate Your Business Processes Flows
Error Conditions
The user doesn’t have Error Message: You don't have access to this cart. If possible, contact the admin for this web store.
access to the cart. Error Code: INSUFFICIENT_ACCESS_OR_READONLY
HTTP Status Code: 400
322
Automate Your Business Processes Flows
Cart Input This input is an Apex-defined variable of class ConnectApi.CartInput, which includes these fields:
• effectiveAccountId — (Optional) ID of the buyer account or guest buyer profile for which the
request is made. If unspecified, the default value is determined from context.
• isSecondary — (Optional) Specifies whether the cart is secondary (true) or not (false). If
unspecified, defaults to false.
• name — (Optional) Name of the cart. The name can have up to 250 Unicode characters. If unspecified,
defaults to the generated name.
• type — (Optional) Type of cart. The only valid value is Cart. If unspecified, defaults to Cart.
• totalChargeAmount — Total amount for shipping and other charges in the currency of the cart.
• totalListPrice — Total list price for the cart.
• totalProductAmount — Total amount including discounts, but excluding shipping and tax, for
product items in the cart.
• totalProductAmountAfterAdjustments — Total product amount, including promotions.
• totalProductCount — Total count of items in the cart.
• totalPromotionalAdjustmentAmount — Total promotional adjustment amount for items in
the cart.
323
Automate Your Business Processes Flows
Error Conditions
The user doesn’t have Error Message: You don't have access to this cart. If possible, contact the admin for this web store.
access to create a cart. Error Code: INSUFFICIENT_ACCESS_OR_READONLY
Input Description
Parameter
Cart ID of the cart or state of the cart to delete. Valid state values are: active and
State or current. A current cart is neither closed nor pending deletion.
ID
effectiveAccountId (Optional) ID of the buyer account or guest buyer profile for which the request
is made. If unspecified, the default value is determined from context.
The user doesn’t have Error Message: You don't have access to this cart. If possible, contact the admin for this web store.
access to the cart.
324
Automate Your Business Processes Flows
325
Automate Your Business Processes Flows
326
Automate Your Business Processes Flows
Flow Core Action for Order Management: Order Routing Rank by Average Distance
Calculate the average distance from sets of inventory locations to an order recipient, and return the sets sorted by that average
distance. Use this action to compare the average shipping distances for different sets of locations that can fulfill an order.
Flow Core Action for Order Management: Release Held Fulfillment Order Capacity
Release held fulfillment order capacity at one or more locations. This action decreases a location’s held capacity without increasing
its assigned fulfillment order count. Release held capacity when you cancel assigning a fulfillment order to a location.
Flow Core Action for Order Management: Return Order Item Summaries Preview
Preview the expected results of a simple return of one or more order product summaries from an order summary without executing
the return. The output of this action contains the values that would be set on the change order created by submitting the proposed
return.
Flow Core Action for Order Management: Return Order Item Summaries Submit
Return one or more order product summaries from an order summary. This action is a simple return that creates a change order but
not a return order.
Flow Core Action for Order Management: Return Return Order Items
Process one or more return order line items belonging to a return order. This action creates a change order record and makes the
processed return order line items read-only. If a processed return order line item has any remaining expected quantity, then the
action creates a separate return order line item representing that quantity.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Order Management: Add Order Item Summary
Add one or more order product summaries to an order summary. This action creates a change order
EDITIONS
record.
In Flow Builder, add an Action element to your flow. Select the Order Management category, and Available in: Lightning
search for Add Order Item Summary. Experience
Important: Don’t call this action via the REST API. Use it only in flows. Available in: Enterprise,
Unlimited, and Developer
Set Input Values Editions with Salesforce
Use values from earlier in the flow to set the inputs. Order Management
Note: For this action’s input values, use records, not record IDs.
The variable has one field, newItems. This field is a list of Apex-defined variables of class
runtime_commerce_oms.AddItem. Each of the variables includes these fields:
• orderItemSummary — The order product summary record to add.
• reasonCode — Reason for the addition. The value must match one of the picklist values on the Reason
field of the Order Product Summary Change object.
• orderItemTaxLineItemSummaries — A list of order product tax line item records associated
with the order product summary.
327
Automate Your Business Processes Flows
Note: The sign of a value in the changeBalances field is the opposite of the corresponding value
on a change order record. For example, a discount is a positive value in changeBalances and a
negative value on a change order record.
• changeBalances — An Apex-defined variable of class ConnectApi.ChangeItemOutputRepresentation,
which includes these fields:
– grandTotalAmount — Change to the total with tax.
– totalAdjDeliveryAmtWithTax — Change to the adjusted delivery subtotal, including tax.
– totalAdjDistAmountWithTax — Change to the total order adjustments, including tax.
– totalAdjProductAmtWithTax — Change to the adjusted product subtotal, including tax.
– totalAdjustedDeliveryAmount — Change to the adjusted delivery subtotal.
– totalAdjustedDeliveryTaxAmount — Change to the adjusted delivery subtotal tax.
– totalAdjustedProductAmount — Change to the adjusted product subtotal.
– totalAdjustedProductTaxAmount — Change to the adjusted product subtotal tax.
– totalAdjustmentDistributedAmount — Change to the total order adjustments.
– totalAdjustmentDistributedTaxAmount — Change to the total order adjustments tax.
– totalAmount — Change to the pretax total.
– totalExcessFundsAmount — The amount of excess funds available on the order payment
summaries related to the order summary. It’s equal to the captured amount that is owed as a refund
but isn’t associated with an invoice or credit memo. Excess funds normally occur when order products
are canceled before fulfillment but after payment has been captured. This situation isn’t common in
the US, where funds are normally authorized but not captured until the fulfillment process begins. This
value includes all excess funds related to the order summary, not only the funds related to the current
action.
– totalRefundableAmount — The total amount available to be refunded. It’s the sum of the
excess funds and any outstanding change order grand total amounts that apply to post-fulfillment
changes. This value includes all refundable amounts related to the order summary, not only the amount
related to the current action.
328
Automate Your Business Processes Flows
Note: This amount isn’t necessarily an amount that needs to be captured. For example, in an
even exchange flow, the order amount reduction from canceling the exchanged products
offsets the required funds amount of the replacement products.
Usage
To set up the Order Item Summary Input:
1. Use create elements to create an order product summary and any associated order product adjustment line summaries and order
product tax line item summaries.
Important: For this action, create summary records. The action generates underlying order product, order adjustment line,
and order product tax line item records.
• Required fields for the order product summary:
329
Automate Your Business Processes Flows
– Id
– OrderSummaryId
– AdjustedLineAmount
– PricebookEntryId
– AdjustedLineAmtWithTax
– Product2Id
– Name
– OrderDevlieryGroupSummaryId
– Quantity
– TotalLineAmount
– UnitPrice
– Type
• Required fields for the order product tax line item summaries:
– Id
– Amount
– Name
– Type
– TaxEffectiveDate
2. Use an assignment element to set the orderItemSummary field on a runtime_commerce_oms.AddItem variable to the order
product summary record.
3. For each adjustment to include for the product being added, use an assignment element to set the
orderItemAdjustmentLineSummary field on a runtime_commerce_oms.AddItemAdjustment variable to the order
product adjustment line summary. Use assignment elements to add the order product tax line summary records associated with it
to the orderItemTaxLineItemSummaries field on the same runtime_commerce_oms.AddItemAdjustment variable.
4. Use an assignment element to add the runtime_commerce_oms.AddItemAdjustment variables to the
orderItemAdjustmentLineSummaries field on the runtime_commerce_oms.AddItem variable.
5. For each tax to include for the product being added, use an assignment elements to add the order product tax line summary record
to the orderItemTaxLineItemSummaries field on the runtime_commerce_oms.AddItem variable.
6. Use an assignment element to set the reasonCode field on the runtime_commerce_oms.AddItem variable to a valid reason.
7. Use an assignment element to add the runtime_commerce_oms.AddItem variable to the newItems field on a
runtime_commerce_oms.AddOrderItemSummaries variable.
8. Repeat steps 1-6 for each order product that you want to include in the action, adding the inputs to the same
runtime_commerce_oms.AddOrderItemSummaries variable.
9. Use the runtime_commerce_oms.AddOrderItemSummaries variable in the action input.
330
Automate Your Business Processes Flows
Flow Core Action for Order Management: Adjust Order Item Summaries Preview
Preview the expected results of adjusting the price of one or more order product summaries on an
EDITIONS
order summary, without executing the adjustment. You can only apply a discount, not an increase.
The output of this action contains the values that would be set on the change orders created by Available in: Lightning
submitting the proposed adjustment. Experience
In Flow Builder, add an Action element to your flow. Select the Order Management category, and
Available in: Enterprise,
search for Adjust Order Item Summaries Preview.
Unlimited, and Developer
Set Input Values Editions with Salesforce
Use values from earlier in the flow to set the inputs. Order Management
Input Description
Parameter
Order ID of the order summary associated with the order product summaries that you
Summary want to preview adjusting the prices of.
Id
331
Automate Your Business Processes Flows
Note: The sign of a value in the changeBalances field is the opposite of the corresponding value
on a change order record. For example, a discount is a positive value in changeBalances and a
negative value on a change order record.
The orderSummaryId field is the ID of the order summary specified in the input.
The changeBalances field is an Apex-defined variable of class
ConnectApi.ChangeItemOutputRepresentation, which includes these fields:
• grandTotalAmount —Change to the total with tax.
• totalAdjDeliveryAmtWithTax —Change to the adjusted delivery subtotal, including tax.
• totalAdjDistAmountWithTax —Change to the total order adjustments, including tax.
• totalAdjProductAmtWithTax —Change to the adjusted product subtotal, including tax.
• totalAdjustedDeliveryAmount —Change to the adjusted delivery subtotal.
• totalAdjustedDeliveryTaxAmount —Change to the adjusted delivery subtotal tax.
• totalAdjustedProductAmount —Change to the adjusted product subtotal.
• totalAdjustedProductTaxAmount —Change to the adjusted product subtotal tax.
• totalAdjustmentDistributedAmount —Change to the total order adjustments.
• totalAdjustmentDistributedTaxAmount —Change to the total order adjustments tax.
• totalAmount —Change to the pretax total.
• totalExcessFundsAmount —The amount of excess funds available on the order payment summaries
related to the order summary. It’s equal to the captured amount that is owed as a refund but isn’t associated
with an invoice or credit memo. Excess funds normally occur when order products are canceled before
fulfillment but after payment has been captured. This situation isn’t common in the US, where funds are
normally authorized but not captured until the fulfillment process begins. This value includes all excess
funds related to the order summary, not only the funds related to the current action.
332
Automate Your Business Processes Flows
Usage
When a price adjustment is applied to an order product summary, its quantities are considered in three groups:
Pre-fulfillment
QuantityAvailableToFulfill, which is equal to QuantityOrdered - QuantityCanceled - QuantityAllocated
In-fulfillment
QuantityAllocated - QuantityFulfilled
Post-fulfillment
QuantityAvailableToReturn, which is equal to QuantityFulfilled - QuantityReturnInitiated
You can apply adjustments to these groups in three different ways, controlled by the allocatedItemsChangeOrderType
input property:
• Distribute the adjustment evenly between pre-fulfillment and post-fulfillment quantities. Ignore in-fulfillment quantities. Submitting
the adjustment would create one change order for the adjustments to pre-fulfillment quantities and one change order for the
adjustments to post-fulfillment quantities.
• Distribute the adjustment evenly between pre-fulfillment, in-fulfillment, and post-fulfillment quantities. Submitting the adjustment
would create one change order for the adjustments to both pre-fulfillment and in-fulfillment quantities, and one change order for
the adjustments to post-fulfillment quantities.
• Distribute the adjustment evenly between pre-fulfillment, in-fulfillment, and post-fulfillment quantities. Submitting the adjustment
would create one change order for the adjustments to pre-fulfillment quantities, one change order for the adjustments to in-fulfillment
quantities, and one change order for the adjustments to post-fulfillment quantities.
To set up the Adjust Order Product Summaries Input:
1. Use Assignment elements to set the orderItemSummaryId, description, adjustmentType, discountValue,
and reason field values on one or more ConnectApi.AdjustItemInputRepresentation variables.
2. Use an Assignment element to add the ConnectApi.AdjustItemInputRepresentation variables to the
changeItems field on a ConnectApi.AdjustOrderItemSummaryInputRepresentation variable.
3. Use an Assignment element to set the allocatedItemsChangeOrderType field on the
ConnectApi.AdjustOrderItemSummaryInputRepresentation variable.
4. Use the ConnectApi.AdjustOrderItemSummaryInputRepresentation variable and the order summary ID in
the action input.
333
Automate Your Business Processes Flows
In a flow for adjusting the prices of order product summaries, display the output of this action for the user to review before executing
the adjustment. When the user verifies the expected results, pass the same input to an Adjust Order Item Summaries Submit action.
SEE ALSO:
Flow Core Action for Order Management: Adjust Order Item Summaries Submit
Add and Edit Elements
Flow Core Action for Order Management: Adjust Order Item Summaries Submit
Adjust the price of one or more order product summaries on an order summary. You can only apply
EDITIONS
a discount, not an increase. This action creates one or more change order records.
In Flow Builder, add an Action element to your flow. Select the Order Management category, and Available in: Lightning
search for Adjust Order Item Summaries Submit. Experience
Set Input Values Available in: Enterprise,
Use values from earlier in the flow to set the inputs. Unlimited, and Developer
Editions with Salesforce
Input Description Order Management
Parameter
Order ID of the order summary associated with the order product summaries that you
Summary want to adjust the prices of.
Id
334
Automate Your Business Processes Flows
Note: The sign of a value in the changeBalances field is the opposite of the corresponding value
on a change order record. For example, a discount is a positive value in changeBalances and a
negative value on a change order record.
The orderSummaryId field is the ID of the order summary specified in the input.
The changeBalances field is an Apex-defined variable of class
ConnectApi.ChangeItemOutputRepresentation, which includes these fields:
• grandTotalAmount —Change to the total with tax.
• totalAdjDeliveryAmtWithTax —Change to the adjusted delivery subtotal, including tax.
• totalAdjDistAmountWithTax —Change to the total order adjustments, including tax.
• totalAdjProductAmtWithTax —Change to the adjusted product subtotal, including tax.
• totalAdjustedDeliveryAmount —Change to the adjusted delivery subtotal.
• totalAdjustedDeliveryTaxAmount —Change to the adjusted delivery subtotal tax.
• totalAdjustedProductAmount —Change to the adjusted product subtotal.
• totalAdjustedProductTaxAmount —Change to the adjusted product subtotal tax.
• totalAdjustmentDistributedAmount —Change to the total order adjustments.
• totalAdjustmentDistributedTaxAmount —Change to the total order adjustments tax.
• totalAmount —Change to the pretax total.
• totalExcessFundsAmount —The amount of excess funds available on the order payment summaries
related to the order summary. It’s equal to the captured amount that is owed as a refund but isn’t associated
335
Automate Your Business Processes Flows
Usage
When a price adjustment is applied to an order product summary, its quantities are considered in three groups:
Pre-fulfillment
QuantityAvailableToFulfill, which is equal to QuantityOrdered - QuantityCanceled - QuantityAllocated
In-fulfillment
QuantityAllocated - QuantityFulfilled
Post-fulfillment
QuantityAvailableToReturn, which is equal to QuantityFulfilled - QuantityReturnInitiated
You can apply adjustments to these groups in three different ways, controlled by the allocatedItemsChangeOrderType
input property:
• Distribute the adjustment evenly between pre-fulfillment and post-fulfillment quantities. Ignore in-fulfillment quantities. Create one
change order for the adjustments to pre-fulfillment quantities and one change order for the adjustments to post-fulfillment quantities.
• Distribute the adjustment evenly between pre-fulfillment, in-fulfillment, and post-fulfillment quantities. Create one change order
for the adjustments to both pre-fulfillment and in-fulfillment quantities, and one change order for the adjustments to post-fulfillment
quantities.
• Distribute the adjustment evenly between pre-fulfillment, in-fulfillment, and post-fulfillment quantities. Create one change order
for the adjustments to pre-fulfillment quantities, one change order for the adjustments to in-fulfillment quantities, and one change
order for the adjustments to post-fulfillment quantities.
To set up the Adjust Order Product Summaries Input:
1. Use Assignment elements to set the orderItemSummaryId, description, adjustmentType, discountValue,
and reason field values on one or more ConnectApi.AdjustItemInputRepresentation variables.
336
Automate Your Business Processes Flows
Important: Excess funds aren’t reduced until the payment processor issues a refund. If you don’t process refunds promptly,
subsequent refunds can be inaccurate. Consider the following example.
1. An order with a total amount of $100 is placed, and the amount is captured immediately.
2. A product is canceled from the order, resulting in $20 of excess funds.
3. Before the excess funds are sent to the payment provider in an ensure refunds action, another product is canceled. This
cancellation adds another $20 of excess funds. However, because the original $20 hasn’t been refunded yet, the cancel action
returns a total excess funds amount of $40.
4. The first excess funds amount ($20) is sent to the payment provider in an ensure refunds request.
5. The second excess funds amount ($40) is sent to the payment provider in an ensure refunds request.
6. The payment provider receives requests for $60 of refunds, when the correct refund total is $40. Because the total refund
amount is less than the total captured amount of $100, the payment provider issues $60 in refunds.
SEE ALSO:
Flow Core Action for Order Management: Adjust Order Item Summaries Preview
Add and Edit Elements
Flow Core Action for Order Management: Authorize Payment
337
Automate Your Business Processes Flows
Authorize a payment on a credit card. You can include details for a new credit card or reference an
EDITIONS
existing PaymentMethod.
In Flow Builder, add an Action element to your flow. Select the Order Management category, and Available in: Lightning
search for Authorize Payment. To access this action from REST API, use the name Experience
authorizePayment.
Available in: Enterprise,
Note: This action is available with the PaymentsAPIUser user permission. Unlimited, and Developer
Editions with Salesforce
Set Input Values Order Management
Use values from earlier in the flow to set the inputs.
• paymentMethod —Payment method for the authorization. The payload must either reference an
existing payment method or include details for a new payment method, but not both. This field is an
Apex-defined variable of class ConnectApi.AuthApiPaymentMethodRequest, which includes these fields:
Note: This input includes the fields from the parent class,
ConnectApi.BaseApiPaymentMethodRequest.
– address—Address for the payment method. This field is an Apex-defined variable of class
ConnectApi.AddressRequest. It includes these fields, all of which are optional:
• city
• companyName
• country
• postalCode
• state
• street
338
Automate Your Business Processes Flows
339
Automate Your Business Processes Flows
• paymentGroup —Details about the payment group. This field is an Apex-defined variable of class
ConnectApi.PaymentGroupResponse, which includes these fields:
– currencyIsoCode —Three-letter ISO 4217 currency code associated with the payment group
record.
– id—ID of the payment group record.
– sourceObjectId—Source object ID of the payment group record.
• paymentMethod —Details about the payment method. This field is an Apex-defined variable of class
ConnectApi.PaymentMethodResponse, which includes these fields:
– accountId —ID of the account for the payment method.
– id—ID of the payment method.
– status—Status of the payment method.
Usage
340
Automate Your Business Processes Flows
Use this action in custom flows that require payment authorization, such as adding an item to an order or an uneven exchange. Before
using it, verify with your payment provider that it supports payment authorization calls from Salesforce Order Management.
Flow Core Action for Order Management: Cancel Fulfillment Order Item
Cancel fulfillment order products from a fulfillment order. You can cancel more than one product
EDITIONS
and specify a quantity to cancel for each of them. This action doesn’t cancel the associated order
product summaries, it only reduces their allocated quantities. Usually, you reallocate the canceled Available in: Lightning
quantities to a new fulfillment order. Experience
In Flow Builder, add an Action element to your flow. Select the Order Management category, and
Available in: Enterprise,
search for Cancel Fulfillment Order Item.
Unlimited, and Developer
Set Input Values Editions with Salesforce
Use values from earlier in the flow to set the inputs. Order Management
Input Description
Parameter
Cancel This input is an Apex-defined variable of class
Fulfillment ConnectApi.FulfillmentOrderLineItemsToCancelInputRepresentation.
Order The variable has one field, fulfillmentOrderLineItemsToCancel,
Items which is a list of Apex-defined variables of class
Input ConnectApi.FulfillmentOrderLineItemInputRepresentation. Each of those variables
includes these fields:
• fulfillmentOrderLineItemId — Reference to the fulfillment
order product to cancel.
• quantity — Quantity to cancel.
Fulfillment Reference to the fulfillment order that you want to cancel fulfillment order items
Order Id from.
Usage
To set up the Cancel Fulfillment Order Items Input, first use Assignment elements to set the fulfillmentOrderLineItemId
and quantity field values on one or more ConnectApi.FulfillmentOrderLineItemInputRepresentation
variables. Then use an Assignment element to add those variables to the FulfillmentOrderLineItemsToCancel field on
341
Automate Your Business Processes Flows
SEE ALSO:
Add and Edit Elements
Add and Edit Elements
Flow Core Action for Order Management: Cancel Order Item Summaries Preview
Preview the expected results of canceling one or more order product summaries from an order
EDITIONS
summary without executing the cancel. The output of this action contains the values that would
be set on the change order created by submitting the proposed cancel. Available in: Lightning
In Flow Builder, add an Action element to your flow. Select the Order Management category, and Experience
search for Cancel Order Item Summaries Preview.
Available in: Enterprise,
Set Input Values Unlimited, and Developer
Use values from earlier in the flow to set the inputs. Editions with Salesforce
Order Management
Input Description
Parameter
Cancel This input is an Apex-defined variable of class
Order ConnectApi.ChangeInputRepresentation.
Product The variable has one field, changeItems. This field is a list of Apex-defined
Summary variables of class ConnectApi.ChangeItemInputRepresentation. Each of the
Items variables includes these fields:
Input
• orderItemSummaryId — ID of an order product summary to cancel.
It can’t be a shipping charge product.
• quantity — Quantity to cancel.
• reason — Cancel reason. The value must match one of the picklist values
on the Reason field of the Order Product Summary Change object.
• shippingReductionFlag — Boolean flag that specifies whether to
prorate any related delivery charge based on the price change.
Order Reference to the order summary that you want to preview canceling order
Summary product summaries from.
Id
342
Automate Your Business Processes Flows
Usage
To set up the Cancel Order Product Summary Items Input:
1. Use Assignment elements to set the orderItemSummaryId, quantity, reason, and shippingReductionFlag
field values on one or more ConnectApi.ChangeItemInputRepresentation variables.
2. Use an Assignment element to add the ConnectApi.ChangeItemInputRepresentation variables to the
changeItems field on a ConnectApi.ChangeInputRepresentation variable.
3. Use the ConnectApi.ChangeInputRepresentation variable and the order summary ID in the action input.
In a flow for canceling order product summaries, display the output of this action for the user to review before executing the cancel.
When the user verifies the expected results, pass the same input to a Cancel Order Item Summaries Submit action.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Order Management: Cancel Order Item Summaries Submit
343
Automate Your Business Processes Flows
Cancel one or more order product summaries from an order summary. This action creates a change
EDITIONS
order record.
In Flow Builder, add an Action element to your flow. Select the Order Management category, and Available in: Lightning
search for Cancel Order Item Summaries Submit. Experience
Set Input Values Available in: Enterprise,
Use values from earlier in the flow to set the inputs. Unlimited, and Developer
Editions with Salesforce
Input Description Order Management
Parameter
Cancel This input is an Apex-defined variable of class
Order ConnectApi.ChangeInputRepresentation.
Product The variable has one field, changeItems. This field is a list of Apex-defined
Summary variables of class ConnectApi.ChangeItemInputRepresentation. Each of the
Items variables includes these fields:
Input
• orderItemSummaryId — ID of an order product summary to cancel.
It can’t be a shipping charge product.
• quantity — Quantity to cancel.
• reason — Cancel reason. The value must match one of the picklist values
on the Reason field of the Order Product Summary Change object.
• shippingReductionFlag — Boolean flag that specifies whether to
prorate any related delivery charge based on the price change.
Order Reference to the order summary that you want to cancel order product summaries
Summary from.
Id
344
Automate Your Business Processes Flows
Usage
To set up the Cancel Order Product Summary Items Input:
1. Use Assignment elements to set the orderItemSummaryId, quantity, reason, and shippingReductionFlag
field values on one or more ConnectApi.ChangeItemInputRepresentation variables.
2. Use an Assignment element to add the ConnectApi.ChangeItemInputRepresentation variables to the
changeItems field on a ConnectApi.ChangeInputRepresentation variable.
3. Use the ConnectApi.ChangeInputRepresentation variable and the order summary ID in the action input.
In a flow for canceling order product summaries, run a Cancel Order Item Summaries Preview action before running the action. Then
display its output for the user to review. When the user verifies the expected results, pass the same input to this action.
SEE ALSO:
Flow Core Action for Order Management: Cancel Order Item Summaries Preview
Add and Edit Elements
Flow Core Action for Order Management: Confirm Held Fulfillment Order Capacity
Confirm held fulfillment order capacity at one or more locations. This action decreases a location’s
EDITIONS
held capacity and increases its assigned fulfillment order count. Confirm held capacity when you
assign a fulfillment order to a location. Available in: Lightning
In Flow Builder, add an Action element to your flow. Select the Order Management category, and Experience
search for Confirm Held Fulfillment Order Capacity.
Available in: Enterprise,
Set Input Values Unlimited, and Developer
Use values from earlier in the flow to set the inputs. Editions with Salesforce
Order Management
345
Automate Your Business Processes Flows
– success —Indicates whether the request was successful (true) or not (false).
346
Automate Your Business Processes Flows
Order Summary Reference to the order summary associated with the change orders.
Id
Usage
To set up the Credit Memo Input, first use Assignment elements to add the change order IDs to a list of strings variable. Then use that
variable in the action input.
SEE ALSO:
Flow Core Action for Order Management: Ensure Refunds Async
Add and Edit Elements
Flow Core Action for Order Management: Create Fulfillment Order
Create one or more fulfillment orders and fulfillment order products for an order delivery group
EDITIONS
summary, which defines a recipient and delivery method. You specify the order product summaries
to fulfill and the fulfillment locations to handle them. If you specify multiple fulfillment locations, a Available in: Lightning
fulfillment order is created for each one. Experience
In Flow Builder, add an Action element to your flow. Select the Order Management category, and
Available in: Enterprise,
search for Create Fulfillment Order.
Unlimited, and Developer
Set Input Values Editions with Salesforce
Use values from earlier in the flow to set the inputs. Order Management
Input Description
Parameter
Fulfillment This input is an Apex-defined variable of class
Order ConnectApi.FulfillmentOrderInputRepresentation.
Input The variable has three fields:
• fulfillmentGroups — A list of Apex-defined variables of class
ConnectApi.FulfillmentGroupInputRepresentation. A fulfillment order is
created for each fulfillment group. A group represents a set of order product
summaries to fulfill from a single location, using the same fulfillment type.
Each fulfillment group variable has these fields:
347
Automate Your Business Processes Flows
– referenceId — Reference to the fulfillment group input. This action doesn’t use this value.
Usage
To set up the Fulfillment Order Input:
1. Use Assignment elements to set the orderItemSummaryId and quantity field values on one or more
ConnectApi.OrderItemSummaryInputRepresentation variables for each fulfillment group.
2. Use Assignment elements to add the ConnectApi.OrderItemSummaryInputRepresentation variables to the
orderItemSummaries fields on one or more ConnectApi.FulfillmentGroupInputRepresentation variables,
one for each fulfillment group.
3. Use Assignment elements to set the fulfilledFromLocationId and fulfillmentType field values on the fulfillment
group variables.
4. Use Assignment elements to add the fulfillment group variables to the fulfillmentGroups field on a
ConnectApi.FulfillmentOrderInputRepresentation variable.
5. Use Assignment elements to set the orderDeliveryGroupSummaryId and orderSummaryId field values on the
ConnectApi.FulfillmentOrderInputRepresentation variable.
6. Use the ConnectApi.FulfillmentOrderInputRepresentation variable in the action input.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Order Management: Create Fulfillment Orders
348
Automate Your Business Processes Flows
Create fulfillment orders and fulfillment order products for multiple order delivery group summaries,
EDITIONS
each of which defines a recipient and delivery method. You specify the order product summaries
to fulfill and the fulfillment locations to handle them. If you specify multiple fulfillment locations Available in: Lightning
for one order delivery group summary, a fulfillment order is created for each one. Experience
In Flow Builder, add an Action element to your flow. Select the Order Management category, and
Available in: Enterprise,
search for Create Fulfillment Orders.
Unlimited, and Developer
Set Input Values Editions with Salesforce
Use values from earlier in the flow to set the inputs. Order Management
Input Description
Parameter
Fulfillment This input is an Apex-defined variable of class
Orders ConnectApi.MultipleFulfillmentOrderInputRepresentation.
Input The variable has one field, fulfillmentOrders. This field is a list of
Apex-defined variables of class ConnectApi.FulfillmentOrderInputRepresentation.
Each variable has three fields:
• fulfillmentGroups — A list of Apex-defined variables of class
ConnectApi.FulfillmentGroupInputRepresentation. A fulfillment order is
created for each fulfillment group. A group represents a set of order product
summaries to fulfill from a single location using the same fulfillment type.
Each fulfillment group variable has these fields:
– fulfilledFromLocationId — Reference to the fulfillment
location.
– fulfillmentType — The fulfillment type. Specify one of the values
that you defined for the Type field picklist on the Fulfillment Order
object.
– orderItemSummaries — A list of Apex-defined variables of class
ConnectApi.OrderItemSummaryInputRepresentation. Each variable has
these fields:
• orderItemSummaryId — Reference to an order product
summary.
• quantity — The quantity of the order product summary to
allocate to the fulfillment order.
349
Automate Your Business Processes Flows
• orderSummaryId — Reference to the order summary associated with the order product summaries.
This value is included if the creation failed, so you can resubmit it.
• referenceId — Reference to the fulfillment group input. Use this value to troubleshoot a failure.
Usage
To set up the Fulfillment Orders Input:
1. For each order delivery group:
a. Use Assignment elements to set the orderItemSummaryId and quantity field values on one or more
ConnectApi.OrderItemSummaryInputRepresentation variables.
b. Use Assignment elements to add the ConnectApi.OrderItemSummaryInputRepresentation variables to the
orderItemSummaries fields on one or more ConnectApi.FulfillmentGroupInputRepresentation
variables, one for each fulfillment group.
c. Use Assignment elements to set the fulfilledFromLocationId, fulfillmentType, and referenceId field
values on the ConnectApi.FulfillmentGroupInputRepresentation variables.
d. Use Assignment elements to add the ConnectApi.FulfillmentGroupInputRepresentation variables to the
fulfillmentGroups field on a ConnectApi.FulfillmentOrderInputRepresentation variable.
e. Use Assignment elements to set the orderDeliveryGroupSummaryId and orderSummaryId field values on the
ConnectApi.FulfillmentOrderInputRepresentation variable.
SEE ALSO:
Add and Edit Elements
350
Automate Your Business Processes Flows
Flow Core Action for Order Management: Create an Invoice from Fulfillment Order
Create an invoice for a fulfillment order that doesn’t have one.
EDITIONS
In Flow Builder, add an Action element to your flow. Select the Order Management category, and
search for Create an Invoice from Fulfillment Order. Available in: Lightning
Experience
Set Input Values
Use values from earlier in the flow to set the inputs. Available in: Enterprise,
Unlimited, and Developer
Input Description Editions with Salesforce
Parameter Order Management
SEE ALSO:
Flow Core Action for Order Management: Ensure Funds Async
Add and Edit Elements
Flow Core Action for Order Management: Create Order Payment Summary
Create an order payment summary for a payment authorization or payments that use the same
EDITIONS
payment method and are attached to the same order summary.
In Flow Builder, add an Action element to your flow. Select the Order Management category, and Available in: Lightning
search for Create Order Payment Summary. Experience
Set Input Values Available in: Enterprise,
Use values from earlier in the flow to set the inputs. Include at least one payment authorization or Unlimited, and Developer
list of payments. You don’t need both. Editions with Salesforce
Order Management
Input Description
Parameter
Order This input is an Apex-defined variable of class
Payment ConnectApi.CreateOrderPaymentSummaryInputRepresentation.
Summary The variable includes these fields:
Create
Input • orderSummaryId — Reference to the order summary associated with
the payments. In orgs with the multicurrency feature enabled, the order
payment summary inherits the ISO Currency value from the order
summary.
• paymentAuthorizationId — Reference to the payment
authorization to associate with the summary.
351
Automate Your Business Processes Flows
Usage
To set up the Order Payment Summary Create Input for payments, first use Assignment elements to add the payment IDs to a list of
strings variable. Then use that variable in the action input.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Order Management: Create Order Summary
Create an order summary based on an order. That order is considered the original order for the
EDITIONS
order summary. Subsequent change orders that apply to the order summary are also represented
as order records. Available in: Lightning
In Flow Builder, add an Action element to your flow. Select the Order Management category, and Experience
search for Create Order Summary.
Available in: Enterprise,
Set Input Values Unlimited, and Developer
Use values from earlier in the flow to set the inputs. Editions with Salesforce
Order Management
Input Description
Parameter
Order This input is an Apex-defined variable of class
Summary ConnectApi.OrderSummaryInputRepresentation.
Create The variable has four fields:
Input
• name—Optional. Order summary number to assign to the order summary.
• orderId—The ID of the original order to create an order summary for.
• orderLifeCycleType—Optional. Specifies whether the order is
managed in Salesforce Order Management or by an external system. It can
have one of these values:
– MANAGED—The order is managed in Salesforce Order Management. If
no value is specified, the default is MANAGED.
– UNMANAGED—The order is managed by an external system.
352
Automate Your Business Processes Flows
SEE ALSO:
Add and Edit Elements
Flow Core Action for Order Management: Create Return Order
Create a return order and return order items for order items belonging to an order summary.
EDITIONS
In Flow Builder, add an Action element to your flow. Select the Order Management category, and
search for Create Return Order. Available in: Lightning
Experience
Set Input Values
Use values from earlier in the flow to set the inputs. Available in: Enterprise,
Unlimited, and Developer
Input Description Editions with Salesforce
Parameter Order Management and
Returns
Return This input is an Apex-defined variable of class
Order ConnectApi.ReturnOrderInputRepresentation.
Input The variable has four fields:
• orderSummaryId—ID of the order summary containing the items to
be returned. The order summary’s order lifecycle type must be Managed.
• returnOrderLifeCycleType—The LifeCycleType of the return
order. Possible values are:
– Managed—Process the return order using the actions and APIs. It can
generate change orders and effects financial fields and rollup calculations.
– Unmanaged—The return order is for tracking purposes only. It isn’t
involved in any financial calculations and doesn’t generate any change
orders. The system doesn’t prevent the creation of duplicate return order
line items in an unmanaged return order for the same order item.
353
Automate Your Business Processes Flows
• status—Status to assign to the return order. The value must match one of the picklist values on the
Status field of the Return Order object.
Usage
To set up the Create Return Order Input:
1. Use Assignment elements to set the canReduceShipping, orderItemSummaryId, quantityExpected,
quantityReceived, and reasonForReturn field values on one or more
ConnectApi.ReturnOrderLineItemInputRepresentation variables.
2. Use an Assignment element to add the ConnectApi.ReturnOrderLineItemInputRepresentation variables to
the returnOrderLineItems field on a ConnectApi.ReturnOrderInputRepresentation variable.
3. Use Assignment elements to set the orderSummaryId, returnOrderLifeCycleType, and status field values on
the ConnectApi.ReturnOrderInputRepresentation variable.
4. Use the ConnectApi.ReturnOrderInputRepresentation variable in the action input.
SEE ALSO:
Flow Core Action for Order Management: Return Return Order Items
Add and Edit Elements
Flow Core Action for Order Management: Ensure Funds Async
Ensure funds for an invoice, and apply them to it. If needed, capture authorized funds by sending
EDITIONS
a request to a payment provider. This action inserts a background operation into an asynchronous
job queue and returns the ID of that operation so you can track its status. Payment gateway responses Available in: Lightning
appear in the payment gateway log and don’t affect the background operation status. Experience
In Flow Builder, add an Action element to your flow. Select the Order Management category, and
Available in: Enterprise,
search for Ensure Funds Async.
Unlimited, and Developer
Set Input Values Editions with Salesforce
Use values from earlier in the flow to set the inputs. Order Management
354
Automate Your Business Processes Flows
Order Summary Reference to the order summary associated with the invoice.
Id
Usage
This action checks the order payment summaries associated with the specified order summary for funds to pay the invoice balance as
follows:
Note: If multiple order payment summaries have equal amounts, their order of selection is random.
1. Verify that the invoice balance doesn’t exceed the total amount of all the order payment summaries.
2. Look for an order payment summary with a captured amount equal to the invoice balance. If one exists, apply those funds.
3. If no exact match was found, identify all order payment summaries with captured amounts greater than the invoice balance. If any
exist, select the smallest one and apply funds from it equal to the invoice balance.
4. If no captured amounts greater than the invoice balance were found, traverse the order payment summaries in order of captured
amount, from largest to smallest. Apply each captured amount to the invoice until the invoice balance is zero or all captured funds
are applied.
5. If the invoice still has a balance, look for an order payment summary with an authorized amount equal to the remaining invoice
balance. If one exists, capture and apply those funds.
6. If no exact match was found, identify all order payment summaries with authorized amounts greater than the invoice balance. If
any exist, select the smallest one and apply funds from it equal to the invoice balance.
7. If no authorized amounts greater than the invoice balance were found, traverse the order payment summaries in order of authorized
amount, from largest to smallest. Capture and apply funds until the invoice balance is zero.
SEE ALSO:
Flow Core Action for Order Management: Create an Invoice from Fulfillment Order
Flow Core Action for Order Management: Ensure Refunds Async
Add and Edit Elements
Flow Core Action for Order Management: Ensure Refunds Async
355
Automate Your Business Processes Flows
Ensure refunds for a credit memo or excess funds by sending a request to a payment provider. This
EDITIONS
action inserts a background operation into an asynchronous job queue and returns the ID of that
operation so you can track its status. Payment gateway responses appear in the payment gateway Available in: Lightning
log and don’t affect the background operation status. Experience
In Flow Builder, add an Action element to your flow. Select the Order Management category, and
Available in: Enterprise,
search for Ensure Refunds Async.
Unlimited, and Developer
Set Input Values Editions with Salesforce
Use values from earlier in the flow to set the inputs. Order Management
Input Description
Parameter
Ensure This input is an Apex-defined variable of class
Refunds ConnectApi.EnsureReundsAsyncInputRepresentation.
Async The variable has two fields. You must specify at least one of them.
Input
• creditMemoId — The ID of the credit memo to ensure refunds for.
• excessFundsAmount — The amount of excess funds to apply the
refunds against.
Order Reference to the order summary associated with the credit memo.
Summary
Id
Usage
This action checks the order payment summaries associated with the specified order summary for amounts to refund following this
logic:
Note: If multiple order payment summaries have equal amounts, their order of selection is random.
1. If a credit memo is specified, identify order payment summaries with captured amounts that were applied to the corresponding
invoice.
a. Examine those order payment summaries. If one has a captured amount matching the credit memo amount, apply the refund
to that payment.
b. If no exact match was found, look for captured amounts greater than the credit memo amount. If any exist, apply the refund to
the smallest one.
356
Automate Your Business Processes Flows
c. If no greater amounts were found, traverse the order payment summaries in order of captured amount, from largest to smallest.
Apply the refund to them until it’s fully applied.
2. If an excess funds amount is specified, identify order payment summaries with captured amounts that weren’t applied to any invoice.
a. Examine those order payment summaries. If one has a captured amount matching the excess funds amount, apply the refund
to that payment.
b. If no exact match was found, look for captured amounts greater than the excess funds amount. If any exist, apply the refund to
the smallest one.
c. If no greater amounts were found, traverse the order payment summaries in order of captured amount, from largest to smallest.
Apply the refund to them until it’s fully applied.
SEE ALSO:
Flow Core Action for Order Management: Create Credit Memo
Flow Core Action for Order Management: Ensure Funds Async
Add and Edit Elements
Flow Core Action for Order Management: Find Routes with Fewest Splits
Evaluate ordered product quantities against available inventory to determine the smallest
EDITIONS
combination of locations that can fulfill the order. If multiple combinations of the minimum number
of locations can fulfill the order, the action returns multiple options. Optionally, you can specify a Available in: Lightning
maximum allowable number of locations. Experience
In Flow Builder, add an Action element to your flow. Select the Order Management category, and
Available in: Enterprise,
search for Find Routes With Fewest Splits.
Unlimited, and Developer
Set Input Values Editions with Salesforce
Use values from earlier in the flow to set the inputs. Order Management
Input Description
Parameter
Order This input is an Apex-defined variable of class
Routing ConnectApi.FindRoutesWithFewestSplitsInputRepresentation.
Minimize The locationAvailableInventory field is a list of Apex-defined
Shipments variables of class ConnectApi.LocationAvailabilityInputRepresentation. Each of
Input the variables represents a fulfillment location to consider and includes these
fields:
• externalReferenceId — External reference ID of the inventory
location.
• quantity — Available quantity of the product.
• stockKeepingUnit — Stock Keeping Unit (SKU) of the product.
The maximumNumberOfSplits field is the maximum allowable number
of shipment splits. The action doesn’t return routing options that involve more
than this number of splits.
357
Automate Your Business Processes Flows
single shipment. A maximum of 1 returns combinations of locations that can fulfill the order in one or
two shipments, and so on.
The orderedQuantities field is a list of Apex-defined variables of class
ConnectApi.QuantityWithSkuInputRepresentation. Each of the variables represents an ordered product quantity
to fulfill, and includes these fields:
• quantity — Ordered quantity of the product.
• stockKeepingUnit — SKU of the product.
Usage
To set up the Order Routing Minimize Shipments Input:
1. Use Assignment elements to set the externalReferenceId, quantity, and stockKeepingUnit field values on one
or more ConnectApi.LocationAvailabilityInputRepresentation variables.
2. Use Assignment elements to set the quantity and stockKeepingUnit field values on one or more
ConnectApi.QuantityWithSkuInputRepresentation variables.
3. Use an Assignment element to add the ConnectApi.LocationAvailabilityInputRepresentation variables to
the locationAvailableInventory field on a
ConnectApi.FindRoutesWithFewestSplitsInputRepresentation variable.
4. Optionally, use an Assignment element to set the maximumNumberOfSplits field on the
ConnectApi.FindRoutesWithFewestSplitsInputRepresentation variable.
5. Use an Assignment element to add the ConnectApi.QuantityWithSkuInputRepresentation variables to the
orderedQuantities field on the ConnectApi.FindRoutesWithFewestSplitsInputRepresentation
variable.
6. Use the ConnectApi.FindRoutesWithFewestSplitsInputRepresentation variable in the action input.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Order Management: Find Routes with Fewest Splits Using OCI
358
Automate Your Business Processes Flows
Evaluate ordered product quantities against available inventory to determine the smallest
EDITIONS
combination of locations that can fulfill the order. If multiple combinations of the minimum number
of locations can fulfill the order, the action returns multiple options. Optionally, you can specify a Available in: Lightning
maximum allowable number of locations and a list of locations to exclude from the calculation. Experience
This action combines the Omnichannel Inventory Get Availability action and the Order Management
Find Routes with Fewest Splits actions. Instead of calling Get Availability and including the output Available in: Enterprise,
in the Find Routes with Fewest Splits input, call this action and specify a location or location group Unlimited, and Developer
to fulfill each ordered product. This action handles the inventory check. Editions with Salesforce
Order Management
In Flow Builder, add an Action element to your flow. Select the Order Management category, and
search for Find Routes With Fewest Splits Using OCI.
Note: Each split represents an additional shipment. Specifying a maximum of 0 returns only locations
that can fulfill the entire order in a single shipment. A maximum of 1 returns combinations of locations
that can fulfill the order in one or two shipments, and so on.
359
Automate Your Business Processes Flows
Usage
To set up the Find Routes With Fewest Splits Using OCI Input:
1. Use assignment elements to set the values for the locationGroupIdentifier, quantity, and stockKeepingUnit
field values on one or more ConnectApi.FindRoutesWithFewestSplitsUsingOCIItemInputRepresentation variables.
2. Use assignment elements to add the ConnectApi.FindRoutesWithFewestSplitsUsingOCIItemInputRepresentation variables to the
orderedItems field on a ConnectApi.FindRoutesWithFewestSplitsGroupUsingOCIInputRepresentation variable.
3. Optionally, use an assignment element to set the value for the maximumNumberOfSplits field on the
ConnectApi.FindRoutesWithFewestSplitsGroupUsingOCIInputRepresentation variable.
4. Use an assignment element to add the ConnectApi.FindRoutesWithFewestSplitsGroupUsingOCIInputRepresentation variable to the
findRoutesWithFewestSplitsUsingOCIInputs field on a
ConnectApi.FindRoutesWithFewestSplitsUsingOCIInputRepresentation variable.
5. Repeat steps 1-4 for each order that you want to include in the action, adding the inputs to the same
ConnectApi.FindRoutesWithFewestSplitsUsingOCIInputRepresentation variable.
6. Use the ConnectApi.FindRoutesWithFewestSplitsUsingOCIInputRepresentation variable in the action input.
Flow Core Action for Order Management: Get Fulfillment Order Capacity Values
Get information about the current fulfillment order capacity of one or more locations.
EDITIONS
In Flow Builder, add an Action element to your flow. Select the Order Management category, and
search for Get Fulfillment Order Capacity Values. Available in: Lightning
Experience
Set Input Values
Use values from earlier in the flow to set the inputs. Available in: Enterprise,
Unlimited, and Developer
Input Description Editions with Salesforce
Parameter Order Management
360
Automate Your Business Processes Flows
– heldCapacity —Number of fulfillment orders that the location is holding capacity for.
– locationId —ID of the location.
Flow Core Action for Order Management: Hold Fulfillment Order Capacity
Hold capacity to process fulfillment orders at one or more locations. This action increases a location’s
EDITIONS
held capacity. Hold capacity when you plan to assign a fulfillment order to a location.
In Flow Builder, add an Action element to your flow. Select the Order Management category, and Available in: Lightning
search for Hold Fulfillment Order Capacity. Experience
Set Input Values Available in: Enterprise,
Use values from earlier in the flow to set the inputs. Unlimited, and Developer
Editions with Salesforce
Input Description Order Management
Parameter
Hold This input is an Apex-defined variable of class
Fulfillment ConnectApi.HoldFOCapacityRequestInputRepresentation, which includes these
Order fields:
Capacity • allOrNothing —(Optional) Controls whether a single failed request
Input cancels all other requests in the list (true) or whether some requests can
succeed if others fail (false). The default value is false.
• capacityRequests —This field is a list of Apex-defined variables of
class ConnectApi.CapacityRequestInputRepresentation. Each of the variables
represents a request to hold capacity for one fulfillment order at one location,
and includes these fields:
– actionRequestId —Unique string that identifies the request. Can
be a UUID. Use the action request IDs in response data to identify which
requests succeeded or failed.
– locationId —ID of the location associated with the request.
361
Automate Your Business Processes Flows
– success —Indicates whether the request was successful (true) or not (false).
Flow Core Action for Order Management: Order Routing Rank by Average Distance
Calculate the average distance from sets of inventory locations to an order recipient, and return
EDITIONS
the sets sorted by that average distance. Use this action to compare the average shipping distances
for different sets of locations that can fulfill an order. Available in: Lightning
In Flow Builder, add an Action element to your flow. Select the Order Management category, and Experience
search for Order Routing Rank By Average Distance.
Available in: Enterprise,
Set Input Values Unlimited, and Developer
Use values from earlier in the flow to set the inputs. Editions with Salesforce
Order Management
Input Description
Parameter
Order This input is an Apex-defined variable of class
Routing ConnectApi.RankAverageDistanceInputRepresentation.
Rank By The deliveryCountryCode field is the country code of the order recipient.
Average
Distance The deliveryPostalCode field is the postal code of the order recipient.
Input The distanceUnit field specifies whether to return average distances in
miles or kilometers, respectively. The value can be mi or km.
The sortResult field specifies whether to sort the location sets in ascending
or descending order by average distance. The value can be ASC or DESC.
The targetLocations field is a list of Apex-defined variables of class
ConnectApi.TargetLocationInputRepresentation. Each of the variables represents
a set of fulfillment locations that can fulfill an order together, and includes one
field, locations. This field is a list of Apex-defined variables of class
ConnectApi.LocationInputRepresentation, each of which represents one location
in the list and contains these fields:
• countryCode — Country code of the location.
362
Automate Your Business Processes Flows
• rank — This result’s rank among all results by average distance to the order recipient.
Usage
To set up the Order Routing Rank By Average Distance Input:
1. Use Assignment elements to set the countryCode, locationIdentifier, and postalCode field values on one or
more ConnectApi.LocationInputRepresentation variables to represent the locations in a set.
2. Use an Assignment element to add the ConnectApi.LocationInputRepresentation variables to the locations
field on a ConnectApi.TargetLocationInputRepresentation variable.
3. Repeat the previous two steps for each set of fulfillment locations.
4. Use an Assignment element to add the ConnectApi.TargetLocationInputRepresentation variables to the
targetLocations field on a ConnectApi.RankAverageDistanceInputRepresentation variable.
5. Use Assignment elements to set the deliveryCountryCode, deliveryPostalCode, distanceUnit, and
sortResult field values on the ConnectApi.RankAverageDistanceInputRepresentation variable.
6. Use the ConnectApi.RankAverageDistanceInputRepresentation variable in the action input.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Order Management: Release Held Fulfillment Order Capacity
363
Automate Your Business Processes Flows
Release held fulfillment order capacity at one or more locations. This action decreases a location’s
EDITIONS
held capacity without increasing its assigned fulfillment order count. Release held capacity when
you cancel assigning a fulfillment order to a location. Available in: Lightning
In Flow Builder, add an Action element to your flow. Select the Order Management category, and Experience
search for Release Held Fulfillment Order Capacity.
Available in: Enterprise,
Set Input Values Unlimited, and Developer
Use values from earlier in the flow to set the inputs. Editions with Salesforce
Order Management
Input Description
Parameter
Fulfillment This input is an Apex-defined variable of class
Order ConnectApi.ReleaseHeldFOCapacityRequestInputRepresentation, which includes
Location these fields:
Release • allOrNothing —(Optional) Controls whether a single failed request
Held cancels all other requests in the list (true) or whether some requests can
Capacity succeed if others fail (false). The default value is false.
Input
• capacityRequests —This field is a list of Apex-defined variables of
class ConnectApi.CapacityRequestInputRepresentation. Each of the variables
represents a request to release capacity for one fulfillment order at one
location, and includes these fields:
– actionRequestId —Unique string that identifies the request. Can
be a UUID. Use the action request IDs in response data to identify which
requests succeeded or failed.
– locationId —ID of the location associated with the request.
– success —Indicates whether the request was successful (true) or not (false).
Flow Core Action for Order Management: Return Order Item Summaries Preview
364
Automate Your Business Processes Flows
Preview the expected results of a simple return of one or more order product summaries from an
EDITIONS
order summary without executing the return. The output of this action contains the values that
would be set on the change order created by submitting the proposed return. Available in: Lightning
In Flow Builder, add an Action element to your flow. Select the Order Management category, and Experience
search for Return Order Item Summaries Preview.
Available in: Enterprise,
Set Input Values Unlimited, and Developer
Use values from earlier in the flow to set the inputs. Editions with Salesforce
Order Management
Input Description
Parameter
Order Reference to the order summary that you want to preview returning order product
Summary summaries from.
Id
365
Automate Your Business Processes Flows
Usage
To set up the Return Order Product Summary Items Input:
1. Use Assignment elements to set the orderItemSummaryId, quantity, reason, and shippingReductionFlag
field values on one or more ConnectApi.ChangeItemInputRepresentation variables.
2. Use an Assignment element to add the ConnectApi.ChangeItemInputRepresentation variables to the
changeItems field on a ConnectApi.ChangeInputRepresentation variable.
3. Use the ConnectApi.ChangeInputRepresentation variable and the order summary ID in the action input.
In a flow for returning order product summaries, display the output of this action for the user to review before executing the return.
When the user verifies the expected results, pass the same input to a Return Order Item Summaries Submit action.
SEE ALSO:
Flow Core Action for Order Management: Return Order Item Summaries Submit
Add and Edit Elements
Flow Core Action for Order Management: Return Order Item Summaries Submit
366
Automate Your Business Processes Flows
Return one or more order product summaries from an order summary. This action is a simple return
EDITIONS
that creates a change order but not a return order.
In Flow Builder, add an Action element to your flow. Select the Order Management category, and Available in: Lightning
search for Return Order Item Summaries Submit. Experience
Set Input Values Available in: Enterprise,
Use values from earlier in the flow to set the inputs. Unlimited, and Developer
Editions with Salesforce
Input Description Order Management
Parameter
Order Reference to the order summary that you want to return order product summaries
Summary from.
Id
367
Automate Your Business Processes Flows
Usage
To set up the Return Order Product Summary Items Input:
1. Use Assignment elements to set the orderItemSummaryId, quantity, reason, and shippingReductionFlag
field values on one or more ConnectApi.ChangeItemInputRepresentation variables.
2. Use an Assignment element to add the ConnectApi.ChangeItemInputRepresentation variables to the
changeItems field on a ConnectApi.ChangeInputRepresentation variable.
3. Use the ConnectApi.ChangeInputRepresentation variable and the order summary ID in the action input.
In a flow for returning order product summaries, run a Return Order Item Summaries Preview action before running this action. Then
display its output for the user to review. When the user verifies the expected results, pass the same input to this action.
SEE ALSO:
Flow Core Action for Order Management: Return Order Item Summaries Preview
Add and Edit Elements
Flow Core Action for Order Management: Return Return Order Items
Process one or more return order line items belonging to a return order. This action creates a change
EDITIONS
order record and makes the processed return order line items read-only. If a processed return order
line item has any remaining expected quantity, then the action creates a separate return order line Available in: Lightning
item representing that quantity. Experience
In Flow Builder, add an Action element to your flow. Select the Order Management category, and
Available in: Enterprise,
search for Return Return Order Items.
Unlimited, and Developer
Set Input Values Editions with Salesforce
Use values from earlier in the flow to set the inputs. Order Management and
Returns
368
Automate Your Business Processes Flows
Return Items This input is an Apex-defined variable of class ConnectApi.ReturnItemsInputRepresentation. It has two fields.
Input The returnOrderItemDeliveryCharges field is an optional list of Apex-defined variables of class
ConnectApi.ReturnOrderItemDeliveryChargeInputRepresentation. Each of the variables includes one field:
• returnOrderLineItemId—ID of a return order line item representing a shipping charge to return.
The returnOrderItems field is a list of Apex-defined variables of class
ConnectApi.ReturnOrderItemInputRepresentation. Each of the variables includes these fields:
• quantityReceived—(Optional) The quantity of the return order line item that has been received.
The value must be zero or greater. This value isn’t used by any standard features, but is provided for use in
customizations.
• quantityRejected—(Optional) The quantity of the return order line item that has been rejected for
return. The value must be zero or greater. This value isn’t used by any standard features, but is provided for
use in customizations.
• quantityReturned—The quantity of the return order line item that has been returned. The value
must be greater than zero. If this value plus quantityToCancel is less than the expected return quantity,
then the remaining quantity to be returned is added to a new return order line item.
• quantityToCancel—(Optional) The quantity of the return order line item to remove because it’s not
being returned. The value must be zero or greater. If this value plus quantityReturned is less than the
expected return quantity, then the remaining quantity to be returned is added to a new return order line
item.
• reasonForRejection—(Optional) The reason why the rejected quantity, if any, was rejected. This
value isn’t used by any standard features, but is provided for use in customizations.
• returnOrderLineItemId—The return order line item ID.
Note: After a change order is created for a return order line item, that return order line item is read-only.
If this action is used to return a partial quantity, it creates a new “split” return order line item to hold the
remaining quantity to be returned. In that case, it returns the IDs of the original and split return order
line items in an element of the returnLineItemSplits output list property.
369
Automate Your Business Processes Flows
Usage
To set up the Return Return Order Items Input:
1. Use Assignment elements to set the quantityReceived, quantityRejected, quantityReturned,
quantityToCancel, reasonForRejection, and returnOrderLineItemId field values on one or more
ConnectApi.ReturnOrderItemInputRepresentation variables.
2. Use Assignment elements to set the returnOrderLineItemId field value on one or more
ConnectApi.ReturnOrderItemDeliveryChargeInputRepresentation variables.
3. Use an Assignment element to add the ConnectApi.ReturnOrderItemInputRepresentation variables to the
returnOrderItems field on a ConnectApi.ReturnItemsInputRepresentation variable.
4. Use an Assignment element to add the ConnectApi.ReturnOrderItemDeliveryChargeInputRepresentation
variables to the returnOrderItemDeliveryCharges field on a
ConnectApi.ReturnItemsInputRepresentation variable.
5. Use the ConnectApi.ReturnItemsInputRepresentation variable and the return order ID in the action input.
SEE ALSO:
Flow Core Action for Order Management: Create Return Order
Add and Edit Elements
SEE ALSO:
Add and Edit Elements
370
Automate Your Business Processes Flows
371
Automate Your Business Processes Flows
Usage
To set up the Omnichannel Inventory Create Service Reservation Input:
1. For each product to reserve, use Assignment elements to set the locationGroupIdentifier or locationIdentifier
field, quantity field, and stockKeepingUnit field values on a
ConnectApi.OCICreateReservationSingleInputRepresentation variable.
2. Use Assignment elements to add the ConnectApi.OCICreateReservationSingleInputRepresentation
variables to the createRecords field on a ConnectApi.OCICreateReservationInputRepresentation
variable.
3. Use Assignment elements to set the actionRequestId, allowPartialReservations, expirationSeconds,
externalRefId, and reservationTime field values on the
ConnectApi.OCICreateReservationInputRepresentation variable.
4. Use the ConnectApi.OCICreateReservationInputRepresentation variable in the action input.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Omnichannel Inventory: Fulfill Reservation
372
Automate Your Business Processes Flows
373
Automate Your Business Processes Flows
Usage
To set up the Omnichannel Inventory Service Fulfill Reservation Input:
1. For each reservation to fulfill, use Assignment elements to set the actionRequestId, externalRefId,
locationIdentifier, quantity, and stockKeepingUnit field values on a
ConnectApi.OCIFulfillReservationSingleInputRepresentation variable.
2. Use Assignment elements to add the ConnectApi.OCIFulfillReservationSingleInputRepresentation
variables to the fulfillmentRecords field on a ConnectApi.OCIFulfillReservationInputRepresentation
variable.
3. Use the ConnectApi.OCIFulfillReservationInputRepresentation variable in the action input.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Omnichannel Inventory: Get Availability
Get inventory availability data for one or more products at one or more inventory locations or
EDITIONS
location groups.
In Flow Builder, add an Action element to your flow. Select the Omnichannel Inventory Service Available in: Lightning
category, and search for Omnichannel Inventory Service Get Availability. Experience
Note: Set the flow’s runtime API version to 52.0 or later. Available in: Enterprise,
Unlimited, and Developer
Set Input Values Editions with Salesforce
Use values from earlier in the flow to set the inputs. Omnichannel Inventory
Input Description
Parameter
Omnichannel This input is an Apex-defined variable of class
Inventory ConnectApi.OCIGetInventoryAvailabilityInputRepresentation.
Service The variable has these fields:
Get
Availability • locationGroupIdentifier—Optional. Can’t combine with
Input locationGroupIdentifiers or locationIdentifiers. The
identifier of a location group to retrieve inventory availability data for.
Specifying this value retrieves inventory data for all locations belonging to
this group.
• locationGroupIdentifiers—Optional; can’t combine with
locationGroupIdentifier or locationIdentifiers. A list
of up to 100 identifiers of location groups to retrieve inventory availability
data for.
374
Automate Your Business Processes Flows
375
Automate Your Business Processes Flows
Usage
To set up the Omnichannel Inventory Service Get Availability Input:
1. Use Assignment elements to set the locationGroupIdentifier, locationGroupIdentifiers, or
locationIdentifiers field value, stockKeepingUnit or stockKeepingUnits field value, and useCache
field value on a ConnectApi.OCIGetInventoryAvailabilityInputRepresentation variable.
2. Use the ConnectApi.OCIGetInventoryAvailabilityInputRepresentation variable in the action input.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Omnichannel Inventory: Release Reservation
Release one or more inventory reservations.
EDITIONS
In Flow Builder, add an Action element to your flow. Select the Omnichannel Inventory Service
category, and search for Omnichannel Inventory Service Release Reservation. Available in: Lightning
Experience
Note: Set the flow’s runtime API version to 52.0 or later.
Available in: Enterprise,
Set Input Values Unlimited, and Developer
Use values from earlier in the flow to set the inputs. Editions with Salesforce
Omnichannel Inventory
376
Automate Your Business Processes Flows
Usage
To set up the Omnichannel Inventory Service Release Reservation Input:
377
Automate Your Business Processes Flows
1. For each reservation to release, use Assignment elements to set the actionRequestId, externalRefId,
locationGroupIdentifier or locationIdentifier, quantity, and stockKeepingUnit field values on a
ConnectApi.OCIReleaseReservationSingleInputRepresentation variable.
2. Use Assignment elements to add the ConnectApi.OCIReleaseReservationSingleInputRepresentation
variables to the releaseRecords field on a ConnectApi.OCIReleaseReservationInputRepresentation
variable.
3. Use the ConnectApi.OCIReleaseReservationInputRepresentation variable in the action input.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Omnichannel Inventory: Transfer Reservation
Transfer one or more inventory reservations between locations or location groups. This action
EDITIONS
reduces the reserved quantity at the source and increases it at the destination. It doesn’t change
physical quantities. Available in: Lightning
In Flow Builder, add an Action element to your flow. Select the Omnichannel Inventory Service Experience
category, and search for Omnichannel Inventory Service Transfer Reservation.
Available in: Enterprise,
Note: Set the flow’s runtime API version to 52.0 or later. Unlimited, and Developer
Editions with Salesforce
Set Input Values Omnichannel Inventory
Use values from earlier in the flow to set the inputs.
378
Automate Your Business Processes Flows
Usage
To set up the Omnichannel Inventory Service Transfer Reservation Input:
379
Automate Your Business Processes Flows
1. For each reservation to transfer, use Assignment elements to set the actionRequestId, externalRefId,
fromLocationGroupIdentifier or fromLocationIdentifier, quantity, stockKeepingUnit, and
toLocationGroupIdentifier or toLocationIdentifier field values on a
ConnectApi.OCITransferReservationSingleInputRepresentation variable.
2. Use Assignment elements to add the ConnectApi.OCITransferReservationSingleInputRepresentation
variables to the transferRecords field on a ConnectApi.OCITransferReservationInputRepresentation
variable.
3. Use an Assignment element to set the allOrNothingTransferId field on the
ConnectApi.OCITransferReservationInputRepresentation variable.
4. Use the ConnectApi.OCITransferReservationInputRepresentation variable in the action input.
SEE ALSO:
Add and Edit Elements
Field Description
Custom Notification The ID of the Custom Notification Type being used for the notification.
Type ID
This parameter accepts single-value resources of any type. That value is treated as text.
Note: The content of mobile push notifications depends on the Display full content push
notifications setting.
380
Automate Your Business Processes Flows
Field Description
This parameter accepts single-value resources of any type. That value is treated as text and is limited
to 750 characters.
Target ID Optional. The Record ID for the target record of the notification.
Specify either a Target ID or a Target Page Reference.
This parameter accepts single-value resources of any type. That value is treated as text.
Target Page Optional. The Page Reference for the navigation target of the notification.
Reference
Specify either a Target ID or a Target Page Reference.
This parameter accepts single-value resources of any type. That value is treated as text.
Note: To see how to specify the target using JSON, see pageReference.
Usage
• Each notification can have up to 10,000 users as recipients. However, you can add an action to the same process within Process
Builder or to the same flow in Flow Builder to have more recipients.
• Your org saves your most recent 1 million custom notifications for view in notification trays. Your org can save up to 1.2 million
custom notifications, but it trims the amount to the most recent 1 million notifications when you reach the 1.2 million limit.
• An org can execute up to 10,000 notification actions per hour. When you exceed this limit, no more notifications are sent in that
hour, and all unsent notifications are lost. Notification actions resume in the next hour.
381
Automate Your Business Processes Flows
For example, your notification action processes are triggered 10,250 times between 4:00 and 4:59. Salesforce executes the first 10,000
of those actions. The remaining 250 notifications aren’t sent and are lost. Salesforce begins executing notification actions again at
5:00.
SEE ALSO:
Send Custom Notifications
Which Context Do Flows Run In?
Flow Elements
Add and Edit Elements
Customize What Happens When a Flow Fails
Route a Flow
In Flow Builder, add an Action element to your flow. In the Action field, enter Email, and select Available in: Essentials,
Send Email. Professional, Enterprise,
Performance, Unlimited,
Set Input Values and Developer Editions
Use values from earlier in the flow to set the inputs for the email. Specify at least one recipient for
the email.
Field Description
Body Text for the body of the email. The email is treated as plain text. HTML formatting isn’t respected.
This parameter accepts single-value resources of any type. That value is treated as text.
382
Automate Your Business Processes Flows
Field Description
Sender Address The organization-wide email address that’s used to send the email. Required only if Sender Type
is set to OrgWideEmailAddress.
This parameter accepts single-value resources of any type. That value is treated as text.
Sender Type Optional. Email address used as the email’s From and Reply-To addresses. Valid values are:
• CurrentUser—Email address of the user running the flow. (Default)
• DefaultWorkflowUser—Email address of the default workflow user.
• OrgWideEmailAddress—The organization-wide email address that is specified in Sender
Address.
Usage
At run time, the email isn’t sent until the interview’s transaction completes. Transactions are complete when the interview either finishes
or executes a Screen, Local Action, or Pause element.
Each licensed org can send single emails to a maximum of 5,000 external email addresses per day based on Greenwich Mean Time
(GMT). For orgs created before Spring ’19, the daily limit is enforced only for emails sent via Apex and Salesforce APIs except for the REST
API. For orgs created in Spring ’19 and later, the daily limit is also enforced for email alerts, simple email actions, Send Email actions in
flows, and REST API. If one of the newly counted emails can’t be sent because your org has reached the limit, we notify you by email
and add an entry to the debug logs. Single emails sent using the email author or composer in Salesforce don't count toward this limit.
There’s no limit on sending single emails to contacts, leads, person accounts, and users in your org directly from account, contact, lead,
opportunity, case, campaign, or custom object pages. In Developer Edition orgs and orgs evaluating Salesforce during a trial period, you
can send to a maximum of 50 recipients per day, and each single email can have up to 15 recipients.
SEE ALSO:
Add and Edit Elements
Options for Sending Emails from a Flow
Flow Resource: Text Template
Customize What Happens When a Flow Fails
Route a Flow
Note: If you deactivate a survey after it’s added to a flow and then activate it, the Flow Builder Available in: Essentials,
renders an incorrect Action layout for that survey. Professional, Enterprise,
Performance, Unlimited,
Example: You want to collect feedback from all the participants when a case is closed. First, and Developer Editions
create a flow and get all records where the status of the case object is closed. Then, create
an action that selects the survey to send to the participants for feedback.
383
Automate Your Business Processes Flows
Field Description
Label Name for the action.
Survey Subject Optional. Select a survey subject that you want to perform the action on. For example, to get all case
records, select the survey subject as Case, or create a required resource for the subject.
This parameter accepts flow variables of type Text.
Recipient Type Select the type of recipient of the survey. Choose the Lead or Contact recipient type only when there’s
a default Experience Cloud site selected for sending public surveys.
This parameter accepts flow variable of type Text.
Unique link Optional. Each participant receives a unique survey invitation. The responses are mapped to the
participant name.
Anonymize responses Optional. The responses received aren’t mapped to any participant.
Don’t require Optional. By default, surveys sent to lead or contact require authentication. However, you can enable
authentication this option to allow access to the survey without any authentication.
Invitation expires Optional. Define the number of days after which the access to the survey is restricted.
in days
SEE ALSO:
Add and Edit Elements
Important: Slack core actions execute in user context. The flow has access to whatever the Available in: both Salesforce
running user of the flow has access to. Classic and Lightning
Experience
Note: This feature is a Beta Service. Customer may opt to try such Beta Service in its sole
Available in: Essentials,
discretion. Any use of the Beta Service is subject to the applicable Beta Services Terms provided
Professional, Enterprise,
at Agreements and Terms.
Performance, Unlimited,
In Flow Builder, add an Action element to your flow. Select the Slack category, and search for an and Developer Editions
action.
384
Automate Your Business Processes Flows
Flow Core Actions for Slack: Check If Users Are Connected to Slack (Beta)
Determine whether a collection of Salesforce users is connected to a given Slack workspace.
Flow Core Actions for Slack: Create Slack Channel (Beta)
Create a Slack channel in a Slack workspace.
Flow Core Actions for Slack: Edit Slack Message (Beta)
Edit a message that was previously sent to Slack.
Flow Core Actions for Slack: Get Information About Slack Conversation (Beta)
Retrieve the name of a Slack channel and find out whether it’s archived. Archived channels are closed to new activity, but users can
still view and search an archived channel’s message history.
Flow Core Actions for Slack: Invite Users to Slack Channel (Beta)
Add users who are connected to a given Slack app to a Slack channel or direct message.
Flow Core Actions for Slack: Pin or Unpin Slack Message (Beta)
Pin or unpin a message in a Slack channel or direct message. Pin messages so that they’re readily available from the conversation
header.
Flow Core Actions for Slack: Send Slack Message (Beta)
Send a message to a Slack channel, direct message, or the Messages tab of a Slack app.
Flow Core Actions for Slack: Send Message to Launch Flow (Beta)
Send a message to a Slack channel, direct message, or the Messages tab of a Slack app that includes a button that a recipient can
use to launch a screen flow.
Flow Core Actions for Slack: Archive Slack Channel (Beta)
Archive a Slack channel in a Slack workspace.
EDITIONS
Note: This feature is a Beta Service. Customer may opt to try such Beta Service in its sole
discretion. Any use of the Beta Service is subject to the applicable Beta Services Terms provided Available in: both Salesforce
at Agreements and Terms. Classic and Lightning
Experience
In Flow Builder, add an Action element to your flow. In the New Action window, select Slack, and
then select Archive Slack Channel (Beta). Available in: Essentials,
Professional, Enterprise,
Set Connection Values for Slack Performance, Unlimited,
The flow sends the connection values that you provide to Slack to retrieve an access token. and Developer Editions
Slack Workspace ID Required. The Slack workspace where the Slack app is installed.
Select a value or resource. The input value evaluates to the Slack
workspace ID.
You can obtain the Slack workspace ID by logging in to Slack.com
and launching Slack in your browser. The workspace ID is the
penultimate parameter in the URL. For example, in this URL, the
workspace ID is T01234ABCDE:
https://app.slack.com/client/T01234ABCDE/C56789FGHIJ
385
Automate Your Business Processes Flows
Usage
This action is available only if you enable the connection to Slack in Setup and the user who runs the flow is connected to Slack. Otherwise,
the action fails.
Flow Core Actions for Slack: Check If Users Are Connected to Slack (Beta)
Determine whether a collection of Salesforce users is connected to a given Slack workspace.
EDITIONS
Note: This feature is a Beta Service. Customer may opt to try such Beta Service in its sole
discretion. Any use of the Beta Service is subject to the applicable Beta Services Terms provided Available in: both Salesforce
at Agreements and Terms. Classic and Lightning
Experience
In Flow Builder, add an Action element to your flow. In the New Action window, select Slack, and
then select Check If Users Are Connected to Slack (Beta). Available in: Essentials,
Professional, Enterprise,
Set Connection Values for Slack Performance, Unlimited,
and Developer Editions
Input Parameter Description
Slack App Required. The Slack app that executes the action. Only Slack apps
that are installed for the org are available. The input value
evaluates to the Slack app ID.
386
Automate Your Business Processes Flows
Salesforce User ID Required. The collection resource that contains the Salesforce user IDs to check. The
Collection Resource maximum number of user IDs is 1,000.
Collection of Salesforce A collection resource that contains the Salesforce user IDs not connected to Slack.
User IDs Not Connected to
Slack
Usage
This action is available only if you enable the connection to Slack in Setup. Otherwise, the action fails. Additionally, the user that initiates
the flow and any users impacted by the action must have logged in to a Salesforce Slack app at least once.
Flow Core Actions for Slack: Create Slack Channel (Beta)
Create a Slack channel in a Slack workspace.
EDITIONS
Note: This feature is a Beta Service. Customer may opt to try such Beta Service in its sole
discretion. Any use of the Beta Service is subject to the applicable Beta Services Terms provided Available in: both Salesforce
at Agreements and Terms. Classic and Lightning
Experience
In Flow Builder, add an Action element to your flow. In the New Action window, select Slack, and
then select Create Slack Channel (Beta). Available in: Essentials,
Professional, Enterprise,
Set Connection Values for Slack Performance, Unlimited,
The flow sends the connection values that you provide to Slack to retrieve an access token. and Developer Editions
Slack Workspace ID Required. The Slack workspace where the Slack app is installed.
Select a value or resource. The input value evaluates to the Slack
workspace ID.
387
Automate Your Business Processes Flows
Execute Action As The entity that executes the action. Valid values are:
Slack App
Execute the action as the Slack app that you selected in the Slack App field. This is
the default value.
The Slack app must be a member of the conversation to execute the action on.
User Who Runs the Flow
Execute the action as the user who runs the flow. The user can execute the action
only when the flow runs in the user context. If the flow runs in the system context,
it’s executed by the Slack app.
The user must be a member of the conversation to execute the action on.
Slack Workspace ID for Indicates whether to associate the new channel with a different workspace ID than the
Channel workspace ID of the Slack app. If you turn this option on, select a value or resource.
Usage
This action is available only if you enable the connection to Slack in Setup and the user who runs the flow is connected to Slack. Otherwise,
the action fails.
388
Automate Your Business Processes Flows
Slack Conversation Required. The ID of the channel or direct message to send the
ID message to. Alternatively, specify a Slack user ID if the message
was sent to the user via the Messages tab of the Slack app. Enter
a value or select a resource.
You can obtain the Slack conversation ID by logging in to
Slack.com and launching Slack in your browser. The conversation
ID is the last parameter in the URL. For example, in this URL, the
conversation ID is C56789FGHIJ:
https://app.slack.com/client/T01234ABCDE/C56789FGHIJ
Slack Message Required. The message to send. For best results, include no more
than 4,000 characters. Slack truncates messages containing more
than 40,000 characters. Enter a value or select a resource.
Slack supports text formatting with Slack mrkdown. To disable
formatting for a plain text message that contains Slack
mrkdown, use an escape sequence.
Slack does not support text formatting with HTML and renders
rich text messages as plain text.
Slack Message Required. The timestamp of the sent message. Enter a value or
Timestamp select a resource. For example, enter 1234567890.123456.
The numerals before the period character (.) specify a Unix
timestamp. The numerals after the period character specify
microseconds.
You can store the Slack Message Timestamp output parameter
of the Send Slack Message (Beta), Edit Slack Message (Beta), or
Send Message To Launch Flow (Beta) action as a resource to use
later.
389
Automate Your Business Processes Flows
Usage
This action is available only if you enable the connection to Slack in Setup and the user who runs the flow is connected to Slack. Otherwise,
the action fails.
Flow Core Actions for Slack: Get Information About Slack Conversation (Beta)
Retrieve the name of a Slack channel and find out whether it’s archived. Archived channels are
EDITIONS
closed to new activity, but users can still view and search an archived channel’s message history.
Note: This feature is a Beta Service. Customer may opt to try such Beta Service in its sole Available in: both Salesforce
discretion. Any use of the Beta Service is subject to the applicable Beta Services Terms provided Classic and Lightning
Experience
at Agreements and Terms.
In Flow Builder, add an Action element to your flow. In the New Action window, select Slack, and Available in: Essentials,
then select Get Information About Slack Conversation (Beta). Professional, Enterprise,
Performance, Unlimited,
Set Connection Values for Slack and Developer Editions
The flow sends the connection values that you provide to Slack to retrieve an access token.
Slack Workspace ID Required. The Slack workspace where the Slack app is installed. Select a value or resource.
The input value evaluates to the Slack workspace ID.
You can obtain the Slack workspace ID by logging in to Slack.com and launching Slack
in your browser. The workspace ID is the penultimate parameter in the URL. For example,
in this URL, the workspace ID is T01234ABCDE:
https://app.slack.com/client/T01234ABCDE/C56789FGHIJ
Execute Action As The entity that executes the action. Valid values are:
Slack App
Execute the action as the Slack app that you selected in the Slack App field. This is
the default value.
The Slack app must be a member of the conversation to execute the action on.
390
Automate Your Business Processes Flows
Slack Conversation ID The ID of the Slack conversation that you retrieved information about.
Slack Conversation Name The name of the Slack conversation that you retrieved information about.
Usage
This action is available only if you enable the connection to Slack in Setup and the user who runs the flow is connected to Slack. Otherwise,
the action fails.
Flow Core Actions for Slack: Invite Users to Slack Channel (Beta)
Add users who are connected to a given Slack app to a Slack channel or direct message.
EDITIONS
Note: This feature is a Beta Service. Customer may opt to try such Beta Service in its sole
discretion. Any use of the Beta Service is subject to the applicable Beta Services Terms provided Available in: both Salesforce
at Agreements and Terms. Classic and Lightning
Experience
In Flow Builder, add an Action element to your flow. In the New Action window, select Slack, and
then select Invite Users to Slack Channel (Beta). Available in: Essentials,
Professional, Enterprise,
Set Connection Values for Slack Performance, Unlimited,
and Developer Editions
391
Automate Your Business Processes Flows
Slack Workspace Required. The Slack workspace where the Slack app is installed. Select a value or resource.
The input value evaluates to the Slack workspace ID.
You can obtain the Slack workspace ID by logging in to Slack.com and launching Slack
in your browser. The workspace ID is the penultimate parameter in the URL. For example,
in this URL, the workspace ID is T01234ABCDE:
https://app.slack.com/client/T01234ABCDE/C56789FGHIJ
Execute Action As The entity that executes the action. Valid values are:
Slack App
Execute the action as the Slack app that you selected in the Slack App field. This is
the default value.
The Slack app must be a member of the conversation to execute the action on.
User Who Runs the Flow
Execute the action as the user who runs the flow. The user can execute the action
only when the flow runs in the user context. If the flow runs in the system context,
it’s executed by the Slack app.
The user must be a member of the conversation to execute the action on.
Slack Workspace ID for Required. The Slack workspace that contains the channel. Select a value or resource. The
Channel input value evaluates to the Slack workspace ID.
You can obtain the Slack workspace ID by logging in to Slack.com and launching Slack
in your browser. The workspace ID is the penultimate parameter in the URL. For example,
in this URL, the workspace ID is T01234ABCDE:
https://app.slack.com/client/T01234ABCDE/C56789FGHIJ
Salesforce User ID The collection resource that contains the Salesforce user IDs to invite to the channel. The
Collection Resource maximum number of user IDs is 1,000.
392
Automate Your Business Processes Flows
Usage
This action is available only if you enable the connection to Slack in Setup and the user who runs the flow is connected to Slack. Otherwise,
the action fails. Additionally, the user that initiates the flow and any users impacted by the action must have logged in to a Salesforce
Slack app at least once.
Flow Core Actions for Slack: Pin or Unpin Slack Message (Beta)
Pin or unpin a message in a Slack channel or direct message. Pin messages so that they’re readily
EDITIONS
available from the conversation header.
Note: This feature is a Beta Service. Customer may opt to try such Beta Service in its sole Available in: both Salesforce
discretion. Any use of the Beta Service is subject to the applicable Beta Services Terms provided Classic and Lightning
Experience
at Agreements and Terms.
In Flow Builder, add an Action element to your flow. In the New Action window, select Slack, and Available in: Essentials,
then select Pin or Unpin Slack Message (Beta). Professional, Enterprise,
Performance, Unlimited,
Set Connection Values for Slack and Developer Editions
Slack Workspace ID Required. The Slack workspace where the Slack app is installed.
Select a value or resource. The input value evaluates to the Slack
workspace ID.
You can obtain the Slack workspace ID by logging in to Slack.com
and launching Slack in your browser. The workspace ID is the
penultimate parameter in the URL. For example, in this URL, the
workspace ID is T01234ABCDE:
https://app.slack.com/client/T01234ABCDE/C56789FGHIJ
Execute Action As The entity that executes the action. Valid values are:
Slack App
Execute the action as the Slack app that you selected in the
Slack App field. This is the default value.
The Slack app must be a member of the conversation to
execute the action on.
User Who Runs the Flow
Execute the action as the user who runs the flow. The user
can execute the action only when the flow runs in the user
context. If the flow runs in the system context, it’s executed
by the Slack app.
The user must be a member of the conversation to execute
the action on.
393
Automate Your Business Processes Flows
Slack Message Timestamp Required. The timestamp of the sent message. Enter a value or select a resource. For
example, enter 1234567890.123456.
The numerals before the period character (.) specify a Unix timestamp. The numerals after
the period character specify microseconds.
You can store the Slack Message Timestamp output parameter of the Send Slack Message
(Beta), Edit Slack Message (Beta), or Send Message To Launch Flow (Beta) action as a
resource to use later.
Pin or Unpin Message Select a value or Boolean resource. Valid values are:
Pin
Pins the message to the conversation header.
Unpin
Unpins the message from the conversation header.
If you select a Boolean value that evaluates to true, the action pins the message. If you
select a Boolean value that evaluates to false, the action unpins the message. The default
is Pin.
Usage
This action is available only if you enable the connection to Slack in Setup and the user who runs the flow is connected to Slack. Otherwise,
the action fails.
Flow Core Actions for Slack: Send Slack Message (Beta)
Send a message to a Slack channel, direct message, or the Messages tab of a Slack app.
EDITIONS
Note: This feature is a Beta Service. Customer may opt to try such Beta Service in its sole
discretion. Any use of the Beta Service is subject to the applicable Beta Services Terms provided Available in: both Salesforce
at Agreements and Terms. Classic and Lightning
Experience
In Flow Builder, add an Action element to your flow. In the New Action window, select Slack, and
then select Send Slack Message (Beta). Available in: Essentials,
Professional, Enterprise,
Set Connection Values for Slack Performance, Unlimited,
and Developer Editions
Input Parameter Description
Slack App Required. The Slack app that executes the action. Only Slack apps
that are installed for the org are available. The input value
evaluates to the Slack app ID.
394
Automate Your Business Processes Flows
Execute Action As The entity that executes the action. Valid values are:
Slack App
Execute the action as the Slack app that you selected in the Slack App field. This is
the default value.
The Slack app must be a member of the conversation to execute the action on.
User Who Runs the Flow
Execute the action as the user who runs the flow. The user can execute the action
only when the flow runs in the user context. If the flow runs in the system context,
it’s executed by the Slack app.
The user must be a member of the conversation to execute the action on.
Slack Message Required. The message to send. For best results, include no more than 4,000 characters.
Slack truncates messages containing more than 40,000 characters. Enter a value or select
a resource.
Slack supports text formatting with Slack mrkdown. To disable formatting for a plain
text message that contains Slack mrkdown, use an escape sequence.
Slack does not support text formatting with HTML and renders rich text messages as plain
text.
Slack Message Timestamp The timestamp of the Slack message. Specify a timestamp to start a Slack thread. Enter a
value or select a resource. For example, enter 1234567890.123456.
The numerals before the period character (.) specify a Unix timestamp. The numerals after
the period character specify microseconds.
395
Automate Your Business Processes Flows
Usage
This action is available only if you enable the connection to Slack in Setup and the user who runs the flow is connected to Slack. Otherwise,
the action fails.
Flow Core Actions for Slack: Send Message to Launch Flow (Beta)
Send a message to a Slack channel, direct message, or the Messages tab of a Slack app that includes
EDITIONS
a button that a recipient can use to launch a screen flow.
Note: This feature is a Beta Service. Customer may opt to try such Beta Service in its sole Available in: both Salesforce
discretion. Any use of the Beta Service is subject to the applicable Beta Services Terms provided Classic and Lightning
Experience
at Agreements and Terms.
In Flow Builder, add an Action element to your flow. In the New Action window, select Slack, and Available in: Essentials,
then select the name of the flow to send. Professional, Enterprise,
Performance, Unlimited,
Set Connection Values for Slack and Developer Editions
Slack Workspace Required. The Slack workspace where the Slack app is installed.
Select a value or resource. The input value evaluates to the Slack
workspace ID.
You can obtain the Slack workspace ID by logging in to Slack.com
and launching Slack in your browser. The workspace ID is the
penultimate parameter in the URL. For example, in this URL, the
workspace ID is T01234ABCDE:
https://app.slack.com/client/T01234ABCDE/C56789FGHIJ
396
Automate Your Business Processes Flows
Slack Message Required. The message to send. For best results, include no more than 4,000 characters.
Slack truncates messages containing more than 40,000 characters. Enter a value or select
a resource.
Slack supports text formatting with Slack mrkdown. To disable formatting for a plain
text message that contains Slack mrkdown, use an escape sequence.
Slack does not support text formatting with HTML and renders rich text messages as plain
text.
Button Label Required. The label for the button that appears below the message. The user clicks the
button to launch the flow from Slack.
Slack supports text formatting with Slack mrkdown. To disable formatting for a plain
text message that contains Slack mrkdown, use an escape sequence.
Slack does not support text formatting with HTML and renders rich text messages as plain
text.
Slack Bot Name The name of the bot that sends the message in Slack. Enter a value or select a resource.
397
Automate Your Business Processes Flows
Usage
This action is available only if you enable the connection to Slack in Setup and the user who runs the flow is connected to Slack. Otherwise,
the action fails.
SEE ALSO:
Make a Flow Available in Slack (Beta)
Flow Environments
Approval The unique name or ID of the approval process that you want to submit
Process Name the record to. The process must have the same object type as the record
or ID you specified in Record ID.
Required if Skip Entry Criteria is set to true.
398
Automate Your Business Processes Flows
Next Approver IDs The ID of the user to be assigned the approval request when the approval process doesn’t assign the
approver.
This parameter accepts collection variables of type Text that include exactly one item.
Skip Entry Criteria If set to true, the record isn’t evaluated against the entry criteria set on the process that is defined
in Approval Process Name or ID.
This parameter accepts any single-value resource of type Boolean.
Submission Comments Text that you want to accompany the submission. Don’t reference merge fields or formula expressions.
Submission comments appear in the approval history for the specified record. This text also appears
in the initial approval request email if the template uses the {!ApprovalRequest.Comments}
merge field.
This parameter accepts single-value resources of any type. That value is treated as text.
Submitter ID The ID for the user who submitted the record for approval. The user receives notifications about
responses to the approval request.
The user must be one of the allowed submitters for the process.
If you don’t set this field, the user who launched the flow is the submitter. If a workflow rule triggers
a flow that includes this element, the submitter is the user who triggered the workflow rule. Workflow
rules can be triggered when a user creates or edits a record. When the record is approved or rejected,
the user who launched the flow or triggered the workflow rule is notified.
This parameter accepts single-value resources of any type. That value is treated as text.
399
Automate Your Business Processes Flows
New Work Item IDs The IDs of the new items submitted to the approval request. There can be 0 or 1 approval processes.
This parameter accepts collection variables of type Text.
Next Approver IDs The IDs of the users who are assigned as the next approvers.
This parameter accepts collection variables of type Text.
Record ID The ID of the record that the flow submitted for approval.
This parameter accepts single-value variables of type Text, Picklist, or Multi-Select Picklist.
Usage
At run time, the approval request isn’t created until the interview’s transaction is completed. Transactions are complete when the
interview either finishes or executes a Screen, Local Action, or Pause element.
SEE ALSO:
Flow Elements
Add and Edit Elements
Customize What Happens When a Flow Fails
Route a Flow
Flow Core Action for Salesforce Anywhere: Create a Salesforce Anywhere Chat (Beta)
Create a Salesforce Anywhere chat by specifying participants, and optionally, an initial message and chat title.
Flow Core Action for Salesforce Anywhere: Add a Message to a Salesforce Anywhere Chat (Beta)
Add a message to an existing Salesforce Anywhere chat by specifying the chat URL and message content.
Flow Core Action for Salesforce Anywhere: Add Users to a Salesforce Anywhere Chat (Beta)
Add users to an existing Salesforce Anywhere chat by specifying the chat URL and the users to be added.
400
Automate Your Business Processes Flows
Flow Core Action for Salesforce Anywhere: Send Salesforce Anywhere Alerts to Users (Beta)
Notify users about Salesforce Anywhere chat by specifying the chat URL and the users to be added.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Salesforce Anywhere: Create a Salesforce Anywhere Chat (Beta)
Create a Salesforce Anywhere chat by specifying participants, and optionally, an initial message
EDITIONS
and chat title.
Note: Salesforce Anywhere Beta is a Non-GA Service and not a “Service” or part of the Available in: Lightning
“Services”, as defined in the Main Services Agreement ("MSA") with Salesforce. Such Non-GA Experience
Service is subject to the terms and conditions of the Universal Pilot Research Agreement Available in: Enterprise,
("UPRA"), including the Data Processing Addendum to the UPRA. Use of this Non-GA Service Performance, Professional,
is at your sole discretion, and any purchase decisions should be made only on the basis of Developer, and Unlimited
Salesforce generally available products and features. Editions
In Flow Builder, add an Action element to your flow. Select the Salesforce Anywhere category, and
search for chat. Select Create Chat.
Set Input Values
Use values from earlier in the flow to set the inputs for the chat.
userEmails A comma-separated list of email addresses belonging to one or more users getting added to the chat. Must
list at least two email addresses and no more than 50 email addresses.
Email addresses must be part of your Salesforce Anywhere organization. If an email address isn’t included in
your Salesforce Anywhere organization, the user isn’t included in the chat.
This parameter accepts single-value resources of any type. That value is treated as text.
401
Automate Your Business Processes Flows
Usage
In Flow Builder, this action does not check the number of email addresses or the validity of the email addresses. When either criteria is
invalid, the flow fails at run time.
The API used for this action has a rate limit of 50 requests per minute and 750 requests per hour.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Salesforce Anywhere: Add a Message to a Salesforce Anywhere Chat (Beta)
Add a message to an existing Salesforce Anywhere chat by specifying the chat URL and message
EDITIONS
content.
Note: Salesforce Anywhere Beta is a Non-GA Service and not a “Service” or part of the Available in: Lightning
“Services”, as defined in the Main Services Agreement ("MSA") with Salesforce. Such Non-GA Experience
Service is subject to the terms and conditions of the Universal Pilot Research Agreement Available in: Enterprise,
("UPRA"), including the Data Processing Addendum to the UPRA. Use of this Non-GA Service Performance, Professional,
is at your sole discretion, and any purchase decisions should be made only on the basis of Developer, and Unlimited
Salesforce generally available products and features. Editions
In Flow Builder, add an Action element to your flow. Select the Salesforce Anywhere category, and
search for message. Select Add Message to Chat.
Set Input Values
Use values from earlier in the flow to set the inputs for the message.
recordId The ID of the Salesforce record to send to the chat. The record's compact layout is displayed in the chat.
This parameter accepts single-value resources of any type. That value is treated as text.
402
Automate Your Business Processes Flows
Usage
Only existing chat members can trigger this action. For example, only an existing chat member can successfully run a flow that sends a
message to a chat about a service case when that case record is updated.
A flow can’t create a record and then reference that new record ID as an input for this action.
The API used for this action has a rate limit of 50 requests per minute and 750 requests per hour.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Salesforce Anywhere: Add Users to a Salesforce Anywhere Chat (Beta)
Add users to an existing Salesforce Anywhere chat by specifying the chat URL and the users to be
EDITIONS
added.
Note: Salesforce Anywhere Beta is a Non-GA Service and not a “Service” or part of the Available in: Lightning
“Services”, as defined in the Main Services Agreement ("MSA") with Salesforce. Such Non-GA Experience
Service is subject to the terms and conditions of the Universal Pilot Research Agreement Available in: Enterprise,
("UPRA"), including the Data Processing Addendum to the UPRA. Use of this Non-GA Service Performance, Professional,
is at your sole discretion, and any purchase decisions should be made only on the basis of Developer, and Unlimited
Salesforce generally available products and features. Editions
In Flow Builder, add an Action element to your flow. Select the Salesforce Anywhere category, and
search for users. Select Add Users to Chat.
Set Input Values
Use values from earlier in the flow to set the inputs for the new users.
userEmails Required. A comma-separated list of email addresses belonging to up to 50 users getting added to the chat.
Email addresses must be part of your Salesforce Anywhere organization. If an email address isn’t included in
your Salesforce Anywhere organization, the user isn’t be included in the chat.
This parameter accepts single-value resources of any type. That value is treated as text.
403
Automate Your Business Processes Flows
Usage
In Flow Builder, this action doesn’t check the number of email addresses or the validity of the email addresses. When either criteria is
invalid, the flow fails at run time.
Only existing chat members can trigger this action. For example, only an existing chat member can successfully run a flow that adds
new users to a chat about a service case when that case record is updated.
The API used for this action has a rate limit of 50 requests per minute and 750 requests per hour.
SEE ALSO:
Add and Edit Elements
Flow Core Action for Salesforce Anywhere: Send Salesforce Anywhere Alerts to Users (Beta)
Notify users about Salesforce Anywhere chat by specifying the chat URL and the users to be added.
EDITIONS
Note: Salesforce Anywhere Beta is a Non-GA Service and not a “Service” or part of the
“Services”, as defined in the Main Services Agreement ("MSA") with Salesforce. Such Non-GA Available in: Lightning
Service is subject to the terms and conditions of the Universal Pilot Research Agreement Experience
("UPRA"), including the Data Processing Addendum to the UPRA. Use of this Non-GA Service Available in: Enterprise,
is at your sole discretion, and any purchase decisions should be made only on the basis of Performance, Professional,
Salesforce generally available products and features. Developer, and Unlimited
In Flow Builder, add an Action element to your flow. Select the Salesforce Anywhere category, and Editions
search for alert. Select Send Alert.
Set Input Values
Use values from earlier in the flow to set the inputs for the alert.
recordId The ID of the Salesforce record to send to the chat. The record's compact layout is displayed in the chat.
This parameter accepts single-value resources of any type. That value is treated as text.
404
Automate Your Business Processes Flows
SEE ALSO:
Platform Events Developer Guide : Platform Events Considerations
Add and Edit Elements
Note: Looking for the Fast Create and Record Create elements from Cloud Flow Designer? Available in: both Salesforce
The Create Records element combines the functionality of both elements. For the equivalent Classic and Lightning
Experience
of the Record Create element, create one record and set the record fields using separate
variables, resources, and literal values. Choosing the other options is the equivalent of the Available in: Essentials,
Fast Create element. Professional, Enterprise,
How many records you choose to create and how to set the field values determines what to enter Performance, Unlimited,
in the rest of the Create Records element. and Developer Editions
Example: A user enters a name and address into the flow. Verify that a matching user exists by using the Get Records element.
If a matching contact doesn’t exist, create a record for that user by using the Create Records element.
Usage
To prevent the flow from failing, make sure that:
• All required fields are populated with values. If you don’t know which fields are required, check the object definition.
• For record variables and record collection variables, the ID field values are blank. The flow populates the ID fields after the record is
created.
405
Automate Your Business Processes Flows
Note: The record isn’t created until the interview’s transaction is completed. Transactions are complete when the interview either
finishes or executes a Screen, Local Action, or Pause element.
SEE ALSO:
Flow Operators in Data Elements and Record Choice Sets
Customize What Happens When a Flow Fails
Route a Flow
Flow Elements
Tip: If you choose to store values from only the first record, filter by a unique field, such as ID. Otherwise, you can’t guarantee
which record’s field values are stored.
You can store field values from the first record together in a record variable or in separate variables.
To store the values together, select the record variable, and identify the fields whose values you want to store.
To store the values in separate variables, select each field you want to store, and select the variable to store each field value in.
To store field values manually for more than one record
To store field values for multiple records, you must store the values in a record collection variable.
When you use a record collection variable to create, update, or delete multiple records at once, you reduce the number of DML
requests in your flow. That means you’re more likely to stay within your org’s limits. For more information, see Flow Bulkification in
Transactions.
Example:
• Find the product name or description for a product with a specific bar code.
• Confirm stock availability for a particular item.
• Verify a caller’s identity.
406
Automate Your Business Processes Flows
For example, your filters check whether a case’s Type equals Problem (1), Type equals Feature Request (2), and Escalated equals true
(3). At run time, the filters are combined to (1 OR 2) AND 3.
• The available filter operators depend on the data type of the selected fields. For details, see Flow Operators in Data Elements and
Record Choice Sets.
SEE ALSO:
Flow Operators in Data Elements and Record Choice Sets
Flow Elements
Customize What Happens When a Flow Fails
Route a Flow
Outcome The requirement for uniqueness applies only to elements within the current
API Name flow. Two elements can have the same API name, provided they're used in
different flows. An API name can include underscores and alphanumeric
characters without spaces. It must begin with a letter and can’t end with an
underscore. It also can’t have two consecutive underscores.
Condition Determines whether the flow takes this outcome’s path. Sets logic and conditions
Requirements for each outcome that determine if the flow follows its path.
to Execute
Outcome
Note: This option checks if the triggering record didn't previously meet
the condition requirements and if the $Record variable now meets the
condition requirements. If your flow changes any of the $Record variable’s
fields before it runs the configured Decision element, the Decision checks
if the $Record’s new field values now meet the condition requirements.
407
Automate Your Business Processes Flows
Tip: Configure your flow so that it does different things based on what a user selects for a Picklist screen component. To do
so, add a decision after the screen to create the branches of the flow based on the choices available in the picklist. Then you
can represent each choice in your decision and connect it to a branch of your flow.
Usage
When a flow executes a Decision element, it evaluates each decision outcome in order. For the first outcome whose conditions are met,
the flow takes the associated path. If no outcome’s conditions are met, the flow takes the path for the default outcome.
SEE ALSO:
Flow Elements
Define Conditions in a Flow
Flow Operators in Decision and Pause Elements
Route a Flow
Note: Looking for the Fast Delete and Record Delete elements from Cloud Flow Designer? Available in: both Salesforce
The Delete Records element combines the functionality of both elements. Classic and Lightning
Experience
• For the equivalent of the Fast Delete element, use the IDs from a record variable or record
collection variable. Available in: Essentials,
Professional, Enterprise,
• For the equivalent of the Record Delete element, specify the conditions to identify the
Performance, Unlimited,
records to delete.
and Developer Editions
How you choose to identify the records to delete determines what to enter in the rest of the Delete
Records element.
Use a record variable or record collection variable
If you store the IDs of the records to delete in a record variable or record collection variable, choose to use the IDs from a record
variable or record collection variable. Then select the variable to use.
Important: For the variable that you select, make sure that each record’s ID value is set. The flow identifies which records to
delete based on the ID value.
When you use a record collection variable to delete multiple records at once, you reduce the number of DML requests in your flow.
That means you’re more likely to stay within your org’s limits. For more information, see Flow Bulkification in Transactions.
Specify conditions
To use conditions to identify the records to delete, choose the object, and add at least one condition to filter down the list of records.
Example: When a customer accepts a quote, delete the remaining quotes from the opportunity.
408
Automate Your Business Processes Flows
• The available filter operators depend on the data type of the selected fields. For details, see Flow Operators in Data Elements and
Record Choice Sets.
Usage
Warning:
• Be careful when testing flows that contain delete elements. Even if the flow is inactive, it triggers the delete operation.
• To prevent deleting records by mistake, be as specific in your filter criteria as possible.
• Records are deleted from your org the moment the flow executes the delete element.
• Deleted records are sent to the Recycle Bin and remain there for 15 days before they are permanently deleted.
• Flows can delete records that are pending approval.
Note: At run time, the record isn’t deleted until the interview’s transaction is completed. Transactions are complete when the
interview either finishes or executes a Screen, Local Action, or Pause element.
SEE ALSO:
Flow Operators in Data Elements and Record Choice Sets
Customize What Happens When a Flow Fails
Route a Flow
Flow Elements
409
Automate Your Business Processes Flows
Field Description
Record ID Select a variable that contains the ID for the record that you want the email to reference. If the email alert uses
merge fields, this record is the starting point for those merge fields.
This field accepts single-value variables of any type. The value is treated as text. The object type of the referenced
record must match the object type of the email alert.
Usage
At run time, the email isn’t sent until the interview’s transaction is completed. Transactions are complete when the interview either
finishes or executes a Screen, Local Action, or Pause element.
Flow Builder displays email alerts from managed packages only if the email alert isn’t protected.
SEE ALSO:
Options for Sending Emails from a Flow
Customize What Happens When a Flow Fails
Route a Flow
Daily Allocations for Email Alerts
Direction Determines whether the flow starts with the first item or the last item in the
collection variable.
Loop The variable that the flow uses to contain the current item’s values during a
Variable loop iteration.
• If Collection Variable is set to a non-record collection variable,
this field accepts a variable with the same data type.
• If Collection Variable is set to a record collection variable, this
field accepts a record variable with the same object type.
410
Automate Your Business Processes Flows
Usage
After you add a Loop element and the elements that you want the loop to include, from the Loop element:
• Determine which element to execute first when a new item’s values are copied into the loop variable by using the “For each item”
connector.
• Determine which element to execute after the loop has processed all the items in the collection by using the “After last item”
connector.
SEE ALSO:
Route a Flow
Flow Elements
Flow Resource: Variable
411
Automate Your Business Processes Flows
This section of the flow uses a single query to look up the list of accounts and a single DML statement to update those accounts. If you
updated the records by setting the fields individually, you would use:
• One Update Records element to find all accounts that John owns and have more than 10,000 employees (1 query). Then update
those records’ OwnerId to Madison’s Id (1 DML statement).
• One Update Records element to find all accounts that John owns and don’t have more than 10,000 employees (1 query). Then
update those records’ OwnerId to Amber’s Id (1 DML statement).
412
Automate Your Business Processes Flows
SEE ALSO:
Customize What Happens When a Flow Fails
Route a Flow
Flow Elements
Configure the Process Trigger
413
Automate Your Business Processes Flows
The second event occurs 14 days before the contract’s end date. Its pause conditions check whether the rating for the contract’s
account is not equal to “Hot.” If the account is hot, the interview doesn’t wait for the second event.
• The flow waits for multiple events to occur, such as to send periodic email reminders. For an example of this scenario, see
Sample Flow That Pauses Until Multiple Resume Events Occur on page 428.
SEE ALSO:
Define Conditions in a Flow
Flow Element: Pause
Flow Resume Events
Define Conditions in a Flow
Flow Element: Pause
Flow Resume Events
SEE ALSO:
Flow Element: Pause
Flow Pause Conditions
Parameter Description
Base Time A date/time value. You can manually enter a date/time value or reference a merge field or flow
resource.
Offset Number Optional. The number of days or hours to offset the selected field’s value. Required if you provide
an offset unit.
Manually enter the integer. You can’t use a merge field or flow resource for this value.
To resume the flow before the base time, use a negative number. To resume the flow after the base
time, use a positive number.
414
Automate Your Business Processes Flows
Parameter Description
Offset Unit Optional. The unit to offset the selected field’s value. Required if you provide an offset number.
Manually enter Days or Hours. You can’t use a merge field or flow resource for this value.
Example: To resume the flow 3 days after the flow paused, use the $Flow.CurrentDate global variable as the base time,
set the offset number to 3, and set the offset unit to Days.
Define Resume Time: Record-Based Time
When the time source is a record field, configure the resume time with these fields. The base resume time is a date/time field value on
a record.
Parameter Description
Object The API name of the object to use for the base resume time. See Record-Based Time: Supported
Objects on page 416.
Manually enter the string. You can’t use a merge field or flow resource for this value.
Field The API name for a date/time field. The field must belong to the specified object.
Manually enter the string. You can’t use a merge field or flow resource for this value.
Record ID The ID of the record to use for the base time. The record’s object must match what’s entered in
Object. The record’s value for the selected field is used as the base resume time.
You can enter a string or select a merge field or flow resource.
Offset Number Optional. The number of days or hours to offset the selected field’s value. Required if you provide
an offset unit.
Manually enter the integer. You can’t use a merge field or flow resource for this value.
To resume the flow before the base time, use a negative number. To resume the flow after the base
time, use a positive number.
Offset Unit Optional. The unit to offset the selected field’s value. Required if you provide an offset number.
Manually enter Days or Hours. You can’t use a merge field or flow resource for this value.
Example: You want to resume the flow 3 days before a contract ends. To identify the base resume time, set Object to
Contract, Field to EndDate, and Record ID to {!varContractId}. To offset the base resume time, set the offset number
to -3, and set the offset unit to Days.
Store Output Values in Variables
Reference information from the resume event in your flow by storing its outputs in flow variables.
415
Automate Your Business Processes Flows
416
Automate Your Business Processes Flows
• CarePreauth
• CarePreauthItem
• CareProgram
• CareProgramCampaign
• CareProgramEnrollee
• CareProgramTeamMember
• CareRequest
• CareRequestDrug
• CareRequestItem
• Case
• CaseComment
• Certification
• CertificationDef
• CertificationSectionDef
• CertificationStep
• CertificationStepDef
• ChannelProgram
• ChannelProgramLevel
• ChannelProgramMember
• ChatterActivity
• Claim
• CollaborationGroup
• CollaborationGroupMember
• ConsumptionRate
• ConsumptionSchedule
• Contact
• ContactEmail
• ContactPhone
• ContactPointConsent
• ContactPointTypeConsent
• ContactRequest
• ContactWeb
• Contract
• ContractLineItem
• CoverageBenefit
• CoverageBenefitItem
• CoverageLimit
• CoverageType
• CustomerAssetAuto
• CustomerAssetHome
417
Automate Your Business Processes Flows
• DandBCompany
• DataSharingCustomerLocal
• DataUsePurpose
• DigitalSignature
• DuplicateRecordItem
• DuplicateRecordSet
• EmailMessage
• EngagementProgramNode
• EngagementProgramVersion
• Entitlement
• EntitlementContact
• EntityMilestone
• EnvironmentHubMember
• EnvironmentHubMemberRel
• Event
• ExchangeUserMapping
• ExpressionFilter
• ExpressionFilterCriteria
• ExternalEventMapping
• FeedItem
• Goal
• GoalLink
• HealthCareDiagnosis
• HealthCareProcedure
• Idea
• IdentityDocument
• IdentityProvEventLog
• Image
• InStoreLocation
• Individual
• InsurancePolicy
• InsurancePolicyAsset
• InsurancePolicyBeneficiary
• InsurancePolicyCoverageLimit
• InsurancePolicyMember
• InsurancePolicyOwner
• InsuranceProfile
• KeyPerformanceIndicator
• Lead
• LinkedArticle
418
Automate Your Business Processes Flows
• LiveAgentSession
• LiveChatTranscript
• LiveChatTranscriptEvent
• LiveChatTranscriptSkill
• Location
• Macro
• MacroAction
• MacroInstruction
• MaintenanceAsset
• MaintenancePlan
• MemberPlan
• MessagingEndUser
• MessagingSession
• Metric
• MobileDeviceCommand
• NetworkMember
• OperatingHours
• Opportunity
• OpportunityLineItem
• OpportunityScore
• OpportunitySplit
• OpportunityTeamMember
• Order
• OrderDeliveryGroup
• OrderDeliveryGroupLine
• OrderDeliveryMethod
• OrderItem
• OrderItemSummary
• OrderPriceAdjustDistrLine
• OrderPriceAdjustmentLine
• OrderSummary
• OrgDeleteRequest
• OrgSnapshot
• Organization
• PartnerFundAllocation
• PartnerFundClaim
• PartnerFundRequest
• PartnerMarketingBudget
• PaymentAuthorizationReversal
• PendingServiceRouting
419
Automate Your Business Processes Flows
• PersonAccount
• PersonEducation
• PersonEmployment
• PersonLifeEvent
• PlanBenefit
• PlanBenefitItem
• Producer
• Product2
• ProductCategoryProduct
• ProductConsumed
• ProductCoverage
• ProductCoverageLimit
• ProductItem
• ProductItemTransaction
• ProductRequest
• ProductRequestLineItem
• ProductRequired
• ProductTransfer
• ProfileSkill
• ProfileSkillEndorsement
• ProfileSkillUser
• PurchaserPlan
• PurchaserPlanAssn
• Question
• QuickText
• Quote
• QuoteLineItem
• Reply
• RequestsForAccessSIQ
• ResourceAbsence
• ResourcePreference
• RetailLocationGroup
• RetailStore
• RetailStoreKpi
• RetailStoreVisitTemplate
• RetailVisitKpi
• RetailVisitTemplate
• RetailVisitTemplateWorkTask
• RetailVisitWorkTask
• RetailWorkTask
420
Automate Your Business Processes Flows
• RetailWorkTaskKpi
• ReturnOrder
• ReturnOrderLineItem
• SOSSession
• SOSSessionActivity
• SalesAgreement
• SalesAgreementProduct
• SalesAgreementProductSchedule
• ScoreIntelligence
• ScratchOrgInfo
• ServiceAppointment
• ServiceAppointmentCapacityUsage
• ServiceContract
• ServiceCrew
• ServiceCrewMember
• ServiceReport
• ServiceResource
• ServiceResourceCapacity
• ServiceResourceSkill
• ServiceTerritory
• ServiceTerritoryLocation
• ServiceTerritoryMember
• ServiceTerritoryWorkType
• SettingUsageMap
• Shipment
• SignupRequest
• Site
• SkillRequirement
• SocialPersona
• SocialPost
• Solution
• SsoUserMapping
• StreamActivityAccess
• StreamingChannel
• Survey
• SurveyInvitation
• SurveyPage
• SurveyQuestion
• SurveyQuestionChoice
• SurveyQuestionResponse
421
Automate Your Business Processes Flows
• SurveyQuestionScore
• SurveyResponse
• SurveySubject
• SurveyVersion
• Task
• TimeSheet
• TimeSheetEntry
• TimeSlot
• Topic
• TopicAssignment
• UsageEntitlementPeriod
• User
• UserLicense
• UserProvisioningRequest
• UserServicePresence
• Visit
• WebStore
• WebStoreNetwork
• WebStorePricebook
• WorkBadge
• WorkBadgeDefinition
• WorkCapacityLimit
• WorkCapacityUsage
• WorkCoaching
• WorkFeedback
• WorkFeedbackQuestion
• WorkFeedbackQuestionSet
• WorkFeedbackRequest
• WorkFeedbackTemplate
• WorkGoal
• WorkOrder
• WorkOrderLineItem
• WorkPerformanceCycle
• WorkReward
• WorkRewardFund
• WorkRewardFundType
• WorkThanks
• WorkType
• WorkTypeGroup
• WorkUpgradeAction
422
Automate Your Business Processes Flows
• WorkUpgradeCustomer
• WorkUpgradeUser
• article__kav
SEE ALSO:
Flow Resume Events
Note: To create a record variable to store values from the platform event message, you must have the Customize Application
permission.
SEE ALSO:
Define Platform Events
Flow Resume Events
423
Automate Your Business Processes Flows
SEE ALSO:
Flow Element: Pause
Within the Pause element, a single resume event is defined (1 day after activated). The flow sends the feedback request one day after
the contract is activated, so configure a flow-based resume time. The base time is the {!$Flow.CurrentDateTime} global
variable (3), and the offset is one day (4).
424
Automate Your Business Processes Flows
Because there’s only one pause configuration and you only want the feedback request to be sent once, don’t set any pause conditions
for this pause configuration. However, just in case something goes wrong, don’t forget to set a fault path. In this example, the fault path
sends an email that contains the fault message to the user who created the flow.
SEE ALSO:
Flow Element: Pause
Flow Resume Event: Specific Time
Sample Flow That Pauses Until Only the First Resume Event Occurs
This flow waits for the first of multiple events to occur before proceeding. The base times for these
EDITIONS
events are field values, so this example's resume events use record-based time.
You’re designing a flow that reminds account owners to follow up with their customers a week Available in: both Salesforce
before either the account renews or the contract ends. The flow sends a reminder email for whichever Classic and Lightning
date occurs first. Experience
425
Automate Your Business Processes Flows
Tip: Every time-based resume event consists of a base time and an offset. For record-based time, the flow needs three pieces of
information to determine the base time: the object, the date/time field, and the specific record. The offset for record-based time
works the same as it does for flow-based time. The flow needs to know the unit (either Days or Hours) and the number of
those units. For both of these events, the base time is offset by -7 days, because weeks isn’t an acceptable offset unit.
The base time for the first event (“Week before account renews”) is the value of Account.Renewal_Date__c (1) on the record
whose ID is stored in {!accountId} (2). The offset is -7 days (3).
426
Automate Your Business Processes Flows
The base time for the second event (“Week before contract expires”) is the value of Contract.EndDate (4) on the record whose
ID is stored in {!contractId} (5). The offset is -7 days (6).
You only want to send one follow-up reminder and the flow always waits for both events, so neither of these events need pause
conditions. However, just in case something goes wrong, set a fault path. In this example, the fault path sends an email that contains
the fault message to the user who created the flow.
SEE ALSO:
Flow Element: Pause
Flow Resume Event: Specific Time
Flow Pause Conditions
427
Automate Your Business Processes Flows
Because the flow sends the reminder emails both two weeks and a week before the contract’s end date, the Pause element defines two
time-based resume events that use record-based time.
Tip: Every time-based resume event consists of a base time and an offset. For record-based time, the flow needs three pieces of
information to determine the base time: the object, the date/time field, and the specific record. The offset for record-based time
works the same as it does for flow-based time. The flow needs to know the unit (either Days or Hours) and the number of
those units. To wait for a number of days or hours before the record field, set Offset Number to a negative integer.
428
Automate Your Business Processes Flows
For both of these events, the offset is declared in Days, because weeks isn’t an acceptable offset unit.
The base time for the first event (“2 Weeks”) is the value of Contract.EndDate (1) on the record whose ID is stored in
{!contractId} (2). The offset is -14 days (3) to represent two weeks.
You want to use the same Pause element for every reminder, so after a flow interview sends one email reminder, it returns to the Pause
element. But first, to ensure that the interview doesn’t send the same email again and again, use pause conditions. When an interview
executes a Pause element, it first checks the conditions for each pause configuration to determine whether to wait for those events. If
a pause configuration has conditions set and those conditions aren’t met, the interview doesn’t wait for the associated resume event.
For the first resume event, the interview checks whether the Boolean variable {!twoWeekVisited} is set to false. The variable’s
default value is set to {!$GlobalConstant.False}, so the flow waits for the event until the variable’s value is changed.
Indicate what the flow does when the “2 Weeks” event occurs by connecting the Pause element to other elements. Then, before you
return the flow path to the Pause element, change the value of {!twoWeeksVisited} to {!$GlobalConstant.True}.
You can do so with an Assignment element. If the value for {!twoWeeksVisited} isn’t false when the Pause element is executed,
the flow doesn’t wait for the “2 Weeks” event to occur. Essentially, the interview checks whether the first resume event has occurred yet,
since the variable is changed to true only in the associated pause configuration’s path. If that resume event has occurred (and the variable
isn’t set to false), the interview knows not to wait for that event.
The second event (“1 Week”) has the same base time as the first event; the offset is -7 days to represent a week.
429
Automate Your Business Processes Flows
For the second event, the flow checks whether the Boolean variable {!oneWeekVisited} is set to false. If it isn’t, the flow doesn’t
wait for this event.
Like with the first pause configuration, use an Assignment element to change the value of {!oneWeekVisited} to
{!$GlobalConstant.True} before the flow path returns to the Pause element. As long as {!oneWeekVisited} isn’t false,
the flow doesn’t wait for the “1 Weeks” event to occur.
Tip: When a flow executes a Pause element and all the pause configurations have conditions that aren’t met, the flow executes
the default path. Because this flow is finished after it sends the final reminder, don’t connect the default path to another element.
Just in case something goes wrong, set a fault path. In this example, the fault path sends an email that contains the fault message to
the user who created the flow.
430
Automate Your Business Processes Flows
Note: This flow is part of a larger example. It gets launched by a process that starts when a Available in: Performance,
Printer Status platform event message is received. For details about the process, see Sample Unlimited, Enterprise, and
Process: Printer Management. Developer Editions
The Order Printer Supplies flow starts when the Printer Management process launches it. The process
populates the following variables in the flow.
• {!assetId}—The asset’s ID
• {!assetOwner}—The asset’s owner
• {!inkManufacturer}—The manufacturer of the printer’s ink
• {!inkNeeded}—Whether the printer needs more ink
• {!inkType}—Specific type of ink that the printer uses
• {!paperNeeded}—Whether the printer needs more paper
• {!paperSize}—Paper size that the printer uses
• {!serialNumber}—The asset’s serial number
First, the flow determines whether to order ink or paper. Based on the decision, it submits an order of ink or paper with the vendor by
using an Apex action. Then it pauses until the vendor sends a platform event message that says the order has been shipped. When
Salesforce receives the specified event message, the flow resumes and creates a task for the asset’s owner to install the new supplies.
Decision Element
The decision includes two outcomes: Ink and Paper. The Ink outcome is true if the variable {!inkNeeded} is true. The Paper outcome
is true if the variable {!paperNeeded} is true.
431
Automate Your Business Processes Flows
The second Apex action provides information about which paper to order.
432
Automate Your Business Processes Flows
In both Apex actions, the action returns an order number. The flow stores that value in the {!orderNumber} variable to reference
in the Pause element.
Pause Element
After the Apex action submits the supply order, the flow waits for confirmation that the order has been shipped. That confirmation is
received through the Vendor Response platform event.
The flow pauses until Salesforce receives a Vendor Request event message with specific values. The order number must be the same as
the order number that the Apex action provided. And the order status must be Shipped.
When the correct event message is received and the flow resumes, the flow stores the event message’s data in a record variable. That
way, you can reference the expected delivery date to calculate when the supplies are scheduled to be installed.
433
Automate Your Business Processes Flows
For the task’s field values, the flow uses these resources.
• {!installDate}—A formula that calculates the day after the event’s expected delivery date.
• {!taskDescription}—A text template that gives more details about the installation.
• {!assetOwner}—Provided by the process that launches the flow
• {!assetId}—Provided by the process that launches the flow
434
Automate Your Business Processes Flows
435
Automate Your Business Processes Flows
Operator Select Equals to set the value in a field. Select Add to add the
text that you enter or select for Value to the end of
Recommendation Field.
Einstein Next Best Action always requires certain recommendation fields to display a recommendation. However, the Recommendation
Assignment element only requires these fields if you select a source collection that contains non-recommendation records. If you select
a source collection with recommendations, Recommendation Assignment doesn’t require the fields because it’s possible that your
source collection already has values in those fields. However, the fields are still required to display the recommendation.
• AcceptanceLabel
• ActionReference
436
Automate Your Business Processes Flows
• Description
• Name
• RejectionLabel
Usage
Recommendation Assignment outputs a collection with the assembled recommendation records and doesn’t change the contents of
the source collection. The output collection is null until its corresponding Recommendation Assignment element runs.
Note: A Recommendation Assignment’s output collection is named after its API name. For example, if a Recommendation
Assignment element is named CreateRecs, its output collection is called Recommendations from CreateRecs.
However, recommendations display to users only if they’re in the outputRecommendations variable. To add recommendations to the
outputRecommendations collection, use an Assignment element.
SEE ALSO:
Get Started with Einstein Next Best Action
Create Recommendations
Recommendation Fields
Einstein Next Best Actions Considerations
Tip:
• If you hide the footer but want to let the user navigate between screens, expose the actions with Lightning components.
• If the screen element is preceded by a data element, such as Update Records, or an action, such as Post to Chatter, deselect
Previous.
• To force the flow user to go back, such as to correct an earlier input, deselect Next or Finish.
437
Automate Your Business Processes Flows
• Use Pause Confirmation Message to tell the user where to resume the flow. For the components that list a user’s paused
flows, see Make It Easy for Users to Find Their Paused Flow Interviews.
• Customize the flow’s interview label.
• In your org’s Process Automation settings, enable Let users pause flows.
Provide Help
Give your users more context for this screen. The text you enter is available in an info bubble in the screen’s header. If you hide the
header but want to expose the help text, use a custom screen component.
Screen Components
The Components tab contains all the standard input components, standard display components, and custom components that are
available for the screen. Click and drag a component to add it to the screen.
Tip: If you have many custom components, enter text in the search field to find the one you need. You can access third-party
custom components on AppExchange using the button at the bottom of the pane.
Record Fields
Build screen flows faster by adding your existing Salesforce record fields directly from the Fields tab. When you add a record field to a
flow screen, the field’s name, data type, help text, requiredness, and existing values are automatically configured for you. To add a record
field, select or create a record variable, then click and drag a field to add it to the screen.
SEE ALSO:
Flow Elements
Build Rich Screens with Custom Screen Components
Route a Flow
Provided Flow Screen Components
438
Automate Your Business Processes Flows
USER PERMISSIONS
Example:
• Validate the format of an email address
REGEX({!Email_Address},"[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}")
439
Automate Your Business Processes Flows
440
Automate Your Business Processes Flows
Usage
Flow Builder doesn’t display descriptions for input and output values. For details about each variable in the referenced flow, ask the
admin who built the flow for more information.
At run time, the flow calls the active version of each referenced flow by default. If a referenced flow has no active version, the flow calls
the latest version of the referenced flow. To run only the latest version of each referenced flow, you have two options:
• In Flow Builder, click Debug, select Run the latest version of each flow called by subflow elements, and then click Run.
• Append the URL for the master flow with ?latestSub=true.
441
Automate Your Business Processes Flows
Note: Only flow admins can run inactive flows. For other users, the flow fails at run time if a Subflow element calls a flow with no
active version.
SEE ALSO:
Flow Elements
Add and Edit Elements
Customize What Happens When a Flow Fails
Route a Flow
Flow Lightning Runtime Considerations
Important: For the variable that you select, make sure that each record’s ID value is set. That ID value is how the flow identifies
which records to update.
When you use a record collection variable to update multiple records at once, you reduce the number of DML requests in your flow.
That means you’re more likely to stay within your org’s limits. For more information, see Flow Bulkification in Transactions.
Use conditions and set fields individually
Otherwise, choose to use conditions and set fields individually. Choose the object whose records you want to update, add conditions
to filter down the list of records, and set the field values to change for those records. You can update any field on the record, but the
Update Records element doesn’t know which fields are required for this object.
Important: Configure at least one filter condition, or the flow updates all the records for the object.
Example: On an opportunity record, when a user clicks the “Won” button, a flow updates the opportunity’s stage.
442
Automate Your Business Processes Flows
• The available filter operators depend on the data type of the selected fields. For details, see Flow Operators in Data Elements and
Record Choice Sets.
Usage
Note: At run time, the record isn’t updated until the interview’s transaction is completed. Transactions are complete when the
interview either finishes or executes a Screen, Local Action, or Pause element.
SEE ALSO:
Flow Operators in Data Elements and Record Choice Sets
Customize What Happens When a Flow Fails
Route a Flow
Flow Elements
Tip: If you need more functionality, install a custom screen component from an external Available in: both Salesforce
library, such as LightningFlow.net, or have a developer build one for you. Classic and Lightning
Experience
443
Automate Your Business Processes Flows
444
Automate Your Business Processes Flows
For information about adding screen components to your flow screen, see Flow Element: Screen.
Attribute Description
API Name An API name can include underscores and alphanumeric characters without spaces. It must begin
with a letter and can’t end with an underscore. It also can’t have two consecutive underscores.
City Value To give City a default value, set this attribute's value.
This attribute accepts single-value resources. The value is treated as text.
Country Options The active countries and territories configured in state and country/territory picklists. To override the
options, set this attribute to a comma-delimited set of countries and territories. This field populates a
dropdown menu of options.
This attribute accepts single-value resources. The value is treated as text.
Country Value To give Country a default value, set this attribute's value.
This attribute accepts single-value resources. The value is treated as text.
Label The label for the heading that appears above the group of address fields.
This attribute accepts single-value resources. The value is treated as text.
445
Automate Your Business Processes Flows
Attribute Description
Postal Code Value To give Postal Code a default value, set this attribute's value.
This attribute accepts single-value resources. The value is treated as text.
State/Province The active states configured in state and country/territory picklists. To override the options, set this
Options attribute to a comma-delimited set of states. This field populates a dropdown menu of options.
This attribute accepts single-value resources. The value is treated as text.
State Value The state or province field of the address. If State/Province Options is configured, this
value is selected by default. To give State a default value, set this attribute's value.
This attribute accepts single-value resources. The value is treated as text.
Street Value To give Street a default value, set this attribute's value.
This attribute accepts single-value resources. The value is treated as text.
Attribute Description
City Value What the user entered in the City Value field.
This value can be stored in a single-value Text variable or a Text field on a record variable.
Country Value What the user entered in the Country Value field.
This value can be stored in a single-value Text variable or a Text field on a record variable.
Postal Code Value What the user entered in the Postal Code Value field.
This value can be stored in a single-value Text variable or a Text field on a record variable.
State Value What the user entered in the State Value field.
This value can be stored in a single-value Text variable or a Text field on a record variable.
Street Value What the user entered in the Street Value field.
This value can be stored in a single-value Text variable or a Text field on a record variable.
Tip: By default, screen components that require Lightning runtime have no memory. If a user enters a value, navigates to another
screen, and returns to the component’s screen, the user-entered value is lost. To enable a flow to remember the value of an
446
Automate Your Business Processes Flows
attribute, set the attribute. The flow stores the value automatically. If you store values manually, store the attribute’s output value
in a variable.
SEE ALSO:
Provided Flow Screen Components
API Name An API name can include underscores and alphanumeric characters Available in: Essentials,
without spaces. It must begin with a letter and can’t end with an Professional, Enterprise,
Performance, Unlimited,
underscore. It also can’t have two consecutive underscores.
and Developer Editions
Default Value Pre-populated value for the component. If the associated screen isn’t
executed or the conditions for component visibility aren’t met, the stored
value of the component is null.
Provide Help Give your users more context with this screen component. The text you
enter is available in an info bubble next to the component.
Validate Input Provide a formula that evaluates whether what the user entered is valid
and the error message to display if invalid.
Example: Let users opt into a marketing campaign, agree to a follow-up call after a purchase, or confirm that they understand
an important policy.
Usage
When the user selects the checkbox, the screen component evaluates to true. If the user doesn’t select the checkbox, the screen
component evaluates to false. If the associated screen isn’t executed, the screen component evaluates to null.
SEE ALSO:
Flow Resource: Global Constant
Provided Flow Screen Components
447
Automate Your Business Processes Flows
API Name An API name can include underscores and alphanumeric characters Available in: Essentials,
without spaces. It must begin with a letter and can’t end with an Professional, Enterprise,
Performance, Unlimited,
underscore. It also can’t have two consecutive underscores.
and Developer Editions
Choice Add at least one choice, record choice set, or picklist choice set to this
component. Available only when you add a choice component to the
screen component.
Note: You can’t reorder choices or select the same choice twice.
Choices must be compatible with the component’s Data Type
setting.
If the user can select only one option, these component types become
available:
• Picklist
• Radio Buttons
If the user can select multiple options, these component types become
available:
• Checkbox Group
• Multi-select Picklist
Data Type Only Text choices are supported for this component.
Default Value Pre-selected choice for the component. If the associated screen isn’t
executed or the conditions for component visibility aren’t met, the stored
value of the component is null.
Provide Help Give your users more context with this screen component. The text you
enter is available in an info bubble next to the component.
Require Requires users to select a value before they can move to the next screen.
Set Component Configure when the component is displayed using conditional logic.
Visibility You can set the components to:
• Always be displayed
• When all conditions are met (AND)
• When any condition is met (OR)
• When custom conditional logic is met
448
Automate Your Business Processes Flows
Considerations
When a user clicks the info bubble for a Checkbox Group component, the help text appears in a separate window. For other types of
Salesforce-provided components, the help text appears in a popover.
SEE ALSO:
Provided Flow Screen Components
API Name An API name can include underscores and alphanumeric characters Available in: Essentials,
without spaces. It must begin with a letter and can’t end with an Professional, Enterprise,
Performance, Unlimited,
underscore. It also can’t have two consecutive underscores.
and Developer Editions
Decimal Places Controls the number of digits to the right of the decimal point up to 17
places. If you leave this field blank or set it to zero, only whole numbers
appear when your flow runs.
Default Value Pre-populated value for the component. If the associated screen isn’t
executed or the conditions for component visibility aren’t met, the stored
value of the component is null.
Provide Help Give your users more context with this screen component. The text you
enter is available in an info bubble next to the component.
Require Requires users to enter a value before they can move to the next screen.
Validate Input Provide a formula that evaluates whether what the user entered is valid
and the error message to display if invalid.
SEE ALSO:
Provided Flow Screen Components
449
Automate Your Business Processes Flows
API Name An API name can include underscores and alphanumeric characters Available in: Essentials,
without spaces. It must begin with a letter and can’t end with an Professional, Enterprise,
Performance, Unlimited,
underscore. It also can’t have two consecutive underscores.
and Developer Editions
Default Value Pre-populated value for the component. If the associated screen isn’t
executed or the conditions for component visibility aren’t met, the stored
value of the component is null.
Provide Help Give your users more context with this screen component. The text you
enter is available in an info bubble next to the component.
Require Requires users to enter a value before they can move to the next screen.
Validate Input Provide a formula that evaluates whether what the user entered is valid
and the error message to display if invalid.
SEE ALSO:
Provided Flow Screen Components
Configure the Date & Time Component Available in: both Salesforce
Classic and Lightning
Attribute Description Experience
API Name An API name can include underscores and alphanumeric characters Available in: Essentials,
without spaces. It must begin with a letter and can’t end with an Professional, Enterprise,
Performance, Unlimited,
underscore. It also can’t have two consecutive underscores.
and Developer Editions
Default Value Pre-populated value for the component. If the associated screen isn’t
executed or the conditions for component visibility aren’t met, the stored
value of the component is null.
Provide Help Give your users more context with this screen component. The text you
enter is available in an info bubble next to the component.
Require Requires users to enter a value before they can move to the next screen.
450
Automate Your Business Processes Flows
Attribute Description
Validate Input Provide a formula that evaluates whether what the user entered is valid and the error message to
display if invalid.
SEE ALSO:
Provided Flow Screen Components
Attribute Description
API Name An API name can include underscores and alphanumeric characters without spaces. It must begin
with a letter and can’t end with an underscore. It also can’t have two consecutive underscores.
Object API Name The API name of the object. The picklist fields that you identify in Picklist 1 API Name, Picklist 2 API
Name, and Picklist 3 API Name must be associated with this object.
This attribute accepts single-value resources. The value is treated as text.
Picklist 1 API Name The API name of the first picklist field. For the specified object, this picklist field must be the controlling
field in a field dependency between Picklist 1 and Picklist 2.
This attribute accepts single-value resources. The value is treated as text.
Picklist 1 Value The default selection for the first picklist field. Configuring this attribute pre-selects an option for the
field.
This attribute accepts single-value resources. The value is treated as text.
451
Automate Your Business Processes Flows
Attribute Description
Picklist 2 API Name The API name of the second picklist field. For the specified object, this picklist field must be the
dependent field in a field dependency between Picklist 1 and Picklist 2. If you display a third picklist
field, Picklist 2 must be the controlling field in a field dependency between Picklist 2 and Picklist 3.
This attribute accepts single-value resources. The value is treated as text.
Picklist 2 Value The default selection for the second picklist field. Configuring this attribute pre-selects an option for
the field.
This attribute accepts single-value resources. The value is treated as text.
Picklist 3 API Name The API name of the third picklist field. For the specified object, this picklist field must be the dependent
field in a field dependency between Picklist 2 and Picklist 3.
This attribute accepts single-value resources. That value is treated as text.
Picklist 3 Value The default selection for the third picklist field. Configuring this attribute pre-selects an option for the
field.
This attribute accepts single-value resources. The value is treated as text.
Attribute Description
Picklist 1 Value What the user selected for the first picklist field.
You can store this value in a single-value Text variable or a Text field on a record variable.
Picklist 2 Value What the user selected for the second picklist field.
You can store this value in a single-value Text variable or a Text field on a record variable.
Picklist 3 Value What the user selected for the third picklist field.
You can store this value in a single-value Text variable or a Text field on a record variable.
452
Automate Your Business Processes Flows
Tip: By default, screen components that require Lightning runtime have no memory. If a user enters a value, navigates to another
screen, and returns to the component’s screen, the user-entered value is lost. To enable a flow to remember the value of an
attribute, set the attribute. The flow stores the value automatically. If you store values manually, store the attribute’s output value
in a variable.
Example: In a Dinner Order flow, users select a specific dessert. Each dessert comes in different flavors, and the flavor options
change based on the dessert that the user selects.
1. On the Order custom object, define two picklist fields: Dessert and Flavor.
2. Define a field dependency between Dessert and Flavor, where Dessert is the controlling picklist. Identify which Flavor options
apply to each Dessert option.
3. In your flow screen, add a Dependent Picklists screen component. Configure the component with these values.
Attribute Value
Object API Name Order__c
When a user runs the flow, the options for Flavor change based on what’s selected for Dessert.
453
Automate Your Business Processes Flows
Considerations
Screen input component values are set to null when they’re hidden by conditional visibility. But hidden picklists in a Dependent Picklists
component aren’t set to null unless the entire Dependent Picklists component is hidden.
SEE ALSO:
Provided Flow Screen Components
Define Field Dependencies
API Name An API name can include underscores and alphanumeric characters
without spaces. It must begin with a letter and can’t end with an
underscore. It also can’t have two consecutive underscores.
Horizontal If you don't want the browser to determine the image's horizontal
Alignment alignment, enter a specific alignment value. Valid values are: left, center,
or right.
This attribute accepts single-value resources. The value is treated as text.
Image Alt Text Alternative text for screen readers and other assistive technology and for
browsers that can’t load the image. Provide a meaningful description
unless the image is purely decorative or redundant.
To have assistive technology skip the image, set Image Alt Text
to {!$GlobalConstant.EmptyString}.
454
Automate Your Business Processes Flows
Attribute Description
If you don't set this attribute, assistive technology reads the file path from the image source (img
src), which can confuse your users and potentially create an accessibility compliance issue.
This attribute accepts single-value resources. The value is treated as text.
Image CSS Override the CSS for your image by providing your own CSS string. Example: border-radius:
8px; box-shadow: 10px 5px 5px blue; opacity: 0.75;
This attribute accepts single-value resources. The value is treated as text.
Image Height If you don't want the browser to determine the image height, enter a specific height value. Valid values
are a number and unit, or a percentage of the container. Examples: 200px, 2cm, 50%. If you enter a
number value and don’t enter a unit value, the unit value defaults to pixels.
This attribute accepts single-value resources. The value is treated as text.
Image Name Required. The name of a static resource that contains an image file. The image should be a .png or
.jpg file.
This attribute accepts single-value resources. The value is treated as text.
Image Width If you don't want the browser to determine the image width, enter a specific width value. Valid values
are a number and unit, or a percentage of the container. Examples: 200px, 2cm, 50%. If you enter a
number value and don’t enter a unit value, the unit value defaults to pixels.
This attribute accepts single-value resources. The value is treated as text.
Tip: By default, screen components that require Lightning runtime have no memory. If a user enters a value, navigates to another
screen, and returns to the component’s screen, the user-entered value is lost. To enable a flow to remember the value of an
attribute, set the attribute. The flow stores the value automatically. If you store values manually, store the attribute’s output value
in a variable.
SEE ALSO:
Provided Flow Screen Components
455
Automate Your Business Processes Flows
Attribute Description
API Name An API name can include underscores and alphanumeric characters without spaces. It must begin
with a letter and can’t end with an underscore. It also can’t have two consecutive underscores.
Disabled If set to $GlobalConstant.True, the user can’t modify or copy the value.
This attribute accepts single-value Boolean resources.
Placeholder Text Text that appears in the field when it’s empty. Use placeholder text to give users a hint about what
to enter in the field.
This attribute accepts single-value resources. The value is treated as text.
Read Only If set to $GlobalConstant.True, the user can’t modify the value, but the user can copy it.
This attribute accepts single-value Boolean resources.
Value The value of the email field. Setting this attribute prepopulates the field. To use the value that the user
enters, store this attribute’s output in a variable.
The Email component validates that the entered email address follows this pattern:
local-part@domain. For example, user@example, user@example.com, and
user.name@example.com are all valid
This attribute accepts single-value resources. The value is treated as text.
456
Automate Your Business Processes Flows
Tip: By default, screen components that require Lightning runtime have no memory. If a user enters a value, navigates to another
screen, and returns to the component’s screen, the user-entered value is lost. To enable a flow to remember the value of an
attribute, set the attribute. The flow stores the value automatically. If you store values manually, store the attribute’s output value
in a variable.
SEE ALSO:
Provided Flow Screen Components
457
Automate Your Business Processes Flows
Attribute Description
Accepted Formats Using the format .ext, enter a comma-separated list of the file extensions that the user can upload.
This attribute accepts single-value resources. The value is treated as text.
Allow Multiple Files If set to $GlobalConstant.True, the user can upload multiple files.
This attribute accepts single-value Boolean resources.
API Name An API name can include underscores and alphanumeric characters without spaces. It must begin
with a letter and can’t end with an underscore. It also can’t have two consecutive underscores.
File Upload Label Required. Label that appears above the upload button.
This attribute accepts single-value resources. The value is treated as text.
Hover Text Tooltip that appears when the user hovers over the component.
This attribute accepts single-value resources. The value is treated as text.
Related Record ID Required. ID of the record to associate the files with. If no value is passed, the component is disabled.
This attribute accepts single-value resources. The value is treated as text.
Note: Custom fields added to the ContentVersion object page are rendered in Experience Cloud sites through the
contentVersionEditWizard. The contentVersionEditWizard is supported on desktop, but not mobile. Since there’s no screen in
mobile to edit or add details to custom fields, file uploads fail when custom fields are marked as required.
Attribute Description
Content Document IDs The IDs of the uploaded files.
You can store this value in a Text collection variable.
458
Automate Your Business Processes Flows
select Allow site guest users to upload files. This setting is only valid if the Secure guest user record access setting is enabled in the
org.
Note: The file upload component isn’t supported on mobile app or browser when used with flows that are accessed through
URLs. This restriction doesn’t apply when the file upload component is used in Lightning App Builder or Experience Builder.
Lightning Out doesn’t support the File Upload component.
SEE ALSO:
Provided Flow Screen Components
Configure the Long Text Area Component Available in: both Salesforce
Classic and Lightning
Attribute Description Experience
API Name An API name can include underscores and alphanumeric characters Available in: Essentials,
without spaces. It must begin with a letter and can’t end with an Professional, Enterprise,
Performance, Unlimited,
underscore. It also can’t have two consecutive underscores.
and Developer Editions
Default Value Pre-populated value for the component. If the associated screen isn’t
executed or the conditions for component visibility aren’t met, the stored
value of the component is null.
Provide Help Give your users more context with this screen component. The text you
enter is available in an info bubble next to the component.
Require Requires users to enter a value before they can move to the next screen.
Validate Input Provide a formula that evaluates whether what the user entered is valid
and the error message to display if invalid.
SEE ALSO:
Provided Flow Screen Components
459
Automate Your Business Processes Flows
API Name An API name can include underscores and alphanumeric characters Available in: Essentials,
without spaces. It must begin with a letter and can’t end with an Professional, Enterprise,
Performance, Unlimited,
underscore. It also can’t have two consecutive underscores.
and Developer Editions
Field API Name The API name of a lookup field on the source object.
Require Requires users to enter a value before they can move to the next screen.
Attribute Description
Record ID The ID of the record that the user selects.
You can store this value in a Text variable.
Record Name The name of the record that the user selects.
You can store this value in a Text variable.
Tip: By default, screen components that require Lightning runtime have no memory. If a user enters a value, navigates to another
screen, and returns to the component’s screen, the user-entered value is lost. To enable a flow to remember the value of an
attribute, set the attribute. The flow stores the value automatically. If you store values manually, store the attribute’s output value
in a variable.
Considerations
• Dependent lookup filters aren't enforced for the Lookup component in a flow. Other lookup filters are enforced the same as they
are in Lightning Experience record pages. When the flow accesses the Salesforce database, lookup filters are enforced. For example,
when the flow executes the Create Records element, the flow fails if the value of the lookup field doesn't meet the lookup filter
requirements.
460
Automate Your Business Processes Flows
• The running user of a flow must have the Create permission on the source object. For example, to search a contact’s account, the
running user must have the Create permission on the Contact object.
• A custom lookup field to a user record isn’t supported.
Tip: To let a flow user choose from a list of user records, employ a standard User lookup field like CreatedById or
LastModifiedById. OwnerId isn’t supported.
• At run time, when the flow user types two characters in the field, it shows up to five recent records whose Name field matches the
query.
• Dependent lookup filters aren’t supported.
• During run time, the lookup component displays Search undefined... if the lookup field defined in Field API Name
isn’t on an assigned page layout. To display the correct text, add the defined lookup field to all of the source object’s page layouts
that are assigned to running users.
SEE ALSO:
Provided Flow Screen Components
Considerations for Lookup Filters
Customize Page Layouts with the Enhanced Page Layout Editor
API Name An API name can include underscores and alphanumeric characters Available in: Essentials,
without spaces. It must begin with a letter and can’t end with an Professional, Enterprise,
Performance, Unlimited,
underscore. It also can’t have two consecutive underscores.
and Developer Editions
Choice Add at least one choice, record choice set, or picklist choice set to this
component. Available only when you add a choice component to the
screen component.
Note: You can’t reorder choices or select the same choice twice.
Choices must be compatible with the component’s Data Type
setting.
If the user can select only one option, these component types become
available:
• Picklist
• Radio Buttons
If the user can select multiple options, these component types become
available:
• Checkbox Group
461
Automate Your Business Processes Flows
Attribute Description
• Multi-select Picklist
Data Type Only Text choices are supported for this component.
Default Value Pre-selected choice for the component. If the associated screen isn’t executed or the conditions for
component visibility aren’t met, the stored value of the component is null.
Let Users Select Specifies whether the user can choose only one option or multiple options. When you select Yes for
Multiple Options Let Users Select Multiple Options, Data Type is automatically set to Text, and non-text Choice resources
are cleared from the component configuration.
Provide Help Give your users more context with this screen component. The text you enter is available in an info
bubble next to the component.
Require Requires users to select a value before they can move to the next screen.
Set Component Configure when the component is displayed using conditional logic.
Visibility You can set the components to:
• Always be displayed
• When all conditions are met (AND)
• When any condition is met (OR)
• When custom conditional logic is met
SEE ALSO:
Provided Flow Screen Components
462
Automate Your Business Processes Flows
Attribute Description
API Name An API name can include underscores and alphanumeric characters without spaces. It must begin
with a letter and can’t end with an underscore. It also can’t have two consecutive underscores.
Disabled If set to $GlobalConstant.True, the user can’t modify or copy the value.
This attribute accepts single-value Boolean resources.
Fields to Display By default, the component displays only the First Name and Last Name fields, but other fields are
available. To customize which fields to display at run time, set this attribute to a comma-separated
list of the field names.
• For First Name, use firstName
• For Last Name, use lastName
• For Middle Name, use middleName
• For Informal Name, use informalName
• For Salutation, use salutation
• For Suffix, use suffix
Note: This attribute doesn’t control the order that the fields display in.
For example, to display all the fields, set this attribute to firstName, lastName,
middleName, informalName, salutation, suffix.
This attribute accepts single-value resources. The value is treated as text.
First Name The value of the First Name field. Setting this attribute prepopulates the field. To use the value that
the user enters, store this attribute’s output in a variable.
This attribute accepts single-value resources. The value is treated as text.
Informal Name The value of the Informal Name field. Setting this attribute prepopulates the field. To use the value
that the user enters, store this attribute’s output in a variable.
This attribute accepts single-value resources. The value is treated as text.
Last Name The value of the Last Name field. Setting this attribute prepopulates the field. To use the value that
the user enters, store this attribute’s output in a variable.
This attribute accepts single-value resources. The value is treated as text.
463
Automate Your Business Processes Flows
Attribute Description
Middle Name The value of the Middle Name field. Setting this attribute prepopulates the field. To use the value that
the user enters, store this attribute’s output in a variable.
This attribute accepts single-value resources. The value is treated as text.
Read Only If set to $GlobalConstant.True, the user can’t modify the value, but the user can copy it.
This attribute accepts single-value Boolean resources.
Salutation The value of the Salutation field. Setting this attribute prepopulates the field. To use the value that
the user enters, store this attribute’s output in a variable.
This attribute accepts single-value resources. The value is treated as text.
Salutation Options By default, the options for Salutation are Mr., Mrs., and Ms. To override these options, set this attribute
to a comma-separated list of values.
This attribute accepts single-value resources. The value is treated as text.
Suffix The value of the Suffix field. Setting this attribute prepopulates the field. To use the value that the user
enters, store this attribute’s output in a variable.
This attribute accepts single-value resources. The value is treated as text.
Attribute Description
First Name What the user entered in the First Name field.
This value can be stored in a single-value Text variable or a Text field on a record variable.
Informal Name What the user entered in the Informal Name field.
This value can be stored in a single-value Text variable or a Text field on a record variable.
Last Name What the user entered in the Last Name field.
This value can be stored in a single-value Text variable or a Text field on a record variable.
Middle Name What the user entered in the Middle Name field.
This value can be stored in a single-value Text variable or a Text field on a record variable.
464
Automate Your Business Processes Flows
Attribute Description
Suffix What the user entered in the Suffix field.
This value can be stored in a single-value Text variable or a Text field on a record variable.
Tip: By default, screen components that require Lightning runtime have no memory. If a user enters a value, navigates to another
screen, and returns to the component’s screen, the user-entered value is lost. To enable a flow to remember the value of an
attribute, set the attribute. The flow stores the value automatically. If you store values manually, store the attribute’s output value
in a variable.
SEE ALSO:
Provided Flow Screen Components
API Name An API name can include underscores and alphanumeric characters Available in: Essentials,
without spaces. It must begin with a letter and can’t end with an Professional, Enterprise,
Performance, Unlimited,
underscore. It also can’t have two consecutive underscores.
and Developer Editions
Decimal Places Controls the number of digits to the right of the decimal point up to 17
places. If you leave this field blank or set it to zero, only whole numbers
appear when your flow runs.
Default Value Pre-populated value for the component. If the associated screen isn’t
executed or the conditions for component visibility aren’t met, the stored
value of the component is null.
Provide Help Give your users more context with this screen component. The text you
enter is available in an info bubble next to the component.
Require Requires users to enter a value before they can move to the next screen.
Validate Input Provide a formula that evaluates whether what the user entered is valid
and the error message to display if invalid.
SEE ALSO:
Provided Flow Screen Components
465
Automate Your Business Processes Flows
Note: This screen component doesn’t encrypt the value entered by the user. When the flow Available in: both Salesforce
references a Password screen component, such as in an Assignment element or a Display Classic and Lightning
Experience
Text screen component, the value isn’t masked.
Available in: Essentials,
Configure the Password Component Professional, Enterprise,
Performance, Unlimited,
and Developer Editions
Attribute Description
API Name An API name can include underscores and alphanumeric characters
without spaces. It must begin with a letter and can’t end with an
underscore. It also can’t have two consecutive underscores.
Default Value Pre-populated value for the component. If the associated screen isn’t
executed or the conditions for component visibility aren’t met, the stored
value of the component is null.
Provide Help Give your users more context with this screen component. The text you
enter is available in an info bubble next to the component.
Require Requires users to enter a value before they can move to the next screen.
Validate Input Provide a formula that evaluates whether what the user entered is valid
and the error message to display if invalid.
SEE ALSO:
Provided Flow Screen Components
466
Automate Your Business Processes Flows
Attribute Description
API Name An API name can include underscores and alphanumeric characters without spaces. It must begin
with a letter and can’t end with an underscore. It also can’t have two consecutive underscores.
Placeholder Text Text that appears in the field when it’s empty. Use placeholder text to give users a hint about what
to enter in the field.
This attribute accepts single-value resources. The value is treated as text.
Read Only If set to $GlobalConstant.True, the user can’t modify the value, but the user can copy it.
This attribute accepts single-value Boolean resources.
Value The value of the phone field. Setting this attribute prepopulates the field. To use the value that the
user enters, store this attribute’s output in a variable.
This attribute accepts single-value resources. The value is treated as text.
Tip: By default, screen components that require Lightning runtime have no memory. If a user enters a value, navigates to another
screen, and returns to the component’s screen, the user-entered value is lost. To enable a flow to remember the value of an
attribute, set the attribute. The flow stores the value automatically. If you store values manually, store the attribute’s output value
in a variable.
SEE ALSO:
Provided Flow Screen Components
467
Automate Your Business Processes Flows
API Name An API name can include underscores and alphanumeric characters Available in: Essentials,
without spaces. It must begin with a letter and can’t end with an Professional, Enterprise,
Performance, Unlimited,
underscore. It also can’t have two consecutive underscores.
and Developer Editions
Choice Add at least one choice, record choice set, or picklist choice set to this
component. Available only when you add a choice component to the
screen component.
Note: You can’t reorder choices or select the same choice twice.
Choices must be compatible with the component’s Data Type
setting.
If the user can select only one option, these component types become
available:
• Picklist
• Radio Buttons
If the user can select multiple options, these component types become
available:
• Checkbox Group
• Multi-select Picklist
Data Type Controls which choices are available for this component. For example, if
you choose Number, you can’t select a Text choice.
Decimal Places Controls the number of digits to the right of the decimal point up to 17
places. If you leave this field blank or set it to zero, only whole numbers
appear when your flow runs.
Available only when the data type is Number or Currency.
Default Value Pre-selected choice for the component. If the associated screen isn’t
executed or the conditions for component visibility aren’t met, the stored
value of the component is null.
Let Users Specifies whether the user can choose only one option or multiple options.
Select When you select Yes for Let Users Select Multiple Options, Data Type is
Multiple automatically set to Text, and non-text Choice resources are cleared from
Options the component configuration.
468
Automate Your Business Processes Flows
Attribute Description
Provide Help Give your users more context with this screen component. The text you enter is available in an info
bubble next to the component.
Require Requires users to select a value before they can move to the next screen.
Set Component Configure when the component is displayed using conditional logic.
Visibility You can set the components to:
• Always be displayed
• When all conditions are met (AND)
• When any condition is met (OR)
• When custom conditional logic is met
Starting with Flow Run-time API version 52, the first option listed for all picklists is --None--. If you don’t set a default value for a picklist
in Flow Builder, the --None-- option is automatically selected at run time. --None-- is treated as a null value. If you set the picklist as
required and the user selects --None--, then the flow run time prevents the user from proceeding to the next screen.
SEE ALSO:
Provided Flow Screen Components
API Name An API name can include underscores and alphanumeric characters Available in: Essentials,
without spaces. It must begin with a letter and can’t end with an Professional, Enterprise,
Performance, Unlimited,
underscore. It also can’t have two consecutive underscores.
and Developer Editions
Choice Add at least one choice, record choice set, or picklist choice set to this
component. Available only when you add a choice component to the
screen component.
Note: You can’t reorder choices or select the same choice twice.
Choices must be compatible with the component’s Data Type
setting.
All multi-select choice components use a text data type, but radio buttons
and picklists can also use numbers or Boolean choices.
If the user can select only one option, these component types become
available:
469
Automate Your Business Processes Flows
Attribute Description
• Picklist
• Radio Buttons
If the user can select multiple options, these component types become available:
• Checkbox Group
• Multi-select Picklist
Data Type Controls which choices are available for this component. For example, if you choose Number, you
can’t select a Text choice.
Decimal Places Controls the number of digits to the right of the decimal point up to 17 places. If you leave this field
blank or set it to zero, only whole numbers appear when your flow runs.
Available only when the data type is Number or Currency.
Default Value Pre-selected choice for the component. If the associated screen isn’t executed or the conditions for
component visibility aren’t met, the stored value of the component is null.
Let Users Select Specifies whether the user can choose only one option or multiple options. When you select Yes for
Multiple Options Let Users Select Multiple Options, Data Type is automatically set to Text, and non-text Choice resources
are cleared from the component configuration.
Provide Help Give your users more context with this screen component. The text you enter is available in an info
bubble next to the component.
Require Requires users to select a value before they can move to the next screen.
Set Component Configure when the component is displayed using conditional logic.
Visibility You can set the components to:
• Always be displayed
• When all conditions are met (AND)
• When any condition is met (OR)
• When custom conditional logic is met
SEE ALSO:
Provided Flow Screen Components
470
Automate Your Business Processes Flows
Attribute Description
API Name An API name can include underscores and alphanumeric characters without spaces. It must begin
with a letter and can’t end with an underscore. It also can’t have two consecutive underscores.
Range Maximum The maximum value of the slider range. The default is 100.
This parameter accepts single-value Number resources.
Range Minimum The minimum value of the slider range. The default is 0.
This parameter accepts Number resources.
Slider Size Controls the size of the slider. The accepted values are x-small, small, medium, or large.
This parameter accepts single-value resources of any type. That value is treated as text.
Step Size Divides the slider into a set of steps. The default is 1.
For example, for a range of 0–100, set the Step Size to 10 to let the user select every 10th value. Other
example step sizes are 0.1 and 5.
This parameter accepts single-value Number resources.
Value The default value represented by the slider position. Setting this attribute from the Inputs tab pre-sets
the value.
This parameter accepts single-value Number resources.
471
Automate Your Business Processes Flows
Tip: By default, screen components that require Lightning runtime have no memory. If a user enters a value, navigates to another
screen, and returns to the component’s screen, the user-entered value is lost. To enable a flow to remember the value of an
attribute, set the attribute. The flow stores the value automatically. If you store values manually, store the attribute’s output value
in a variable.
SEE ALSO:
Provided Flow Screen Components
API Name An API name can include underscores and alphanumeric characters Available in: Essentials,
without spaces. It must begin with a letter and can’t end with an Professional, Enterprise,
Performance, Unlimited,
underscore. It also can’t have two consecutive underscores.
and Developer Editions
Default Value Pre-populated value for the component. If the associated screen isn’t
executed or the conditions for component visibility aren’t met, the stored
value of the component is null.
Provide Help Give your users more context with this screen component. The text you
enter is available in an info bubble next to the component.
Require Requires users to enter a value before they can move to the next screen.
Validate Input Provide a formula that evaluates whether what the user entered is valid
and the error message to display if invalid.
SEE ALSO:
Provided Flow Screen Components
472
Automate Your Business Processes Flows
Attribute Description
Active Label When the toggle is active, this label appears underneath the toggle. Use it to clarify what active means.
The default label is “Active.”
This attribute accepts single-value resources. The value is treated as text.
API Name An API name can include underscores and alphanumeric characters without spaces. It must begin
with a letter and can’t end with an underscore. It also can’t have two consecutive underscores.
Disabled If set to $GlobalConstant.True, the user can’t modify or copy the value.
This attribute accepts single-value Boolean resources.
Inactive Label When the toggle is inactive, this label appears underneath the toggle. Use it to clarify what inactive
means. The default label is “Inactive.”
This attribute accepts single-value resources. The value is treated as text.
Label This label appears next to the toggle and describes what the user is enabling.
This attribute accepts single-value resources. The value is treated as text.
473
Automate Your Business Processes Flows
Tip: By default, screen components that require Lightning runtime have no memory. If a user enters a value, navigates to another
screen, and returns to the component’s screen, the user-entered value is lost. To enable a flow to remember the value of an
attribute, set the attribute. The flow stores the value automatically. If you store values manually, store the attribute’s output value
in a variable.
SEE ALSO:
Provided Flow Screen Components
Attribute Description
API Name An API name can include underscores and alphanumeric characters without spaces. It must begin
with a letter and can’t end with an underscore. It also can’t have two consecutive underscores.
Disabled If set to $GlobalConstant.True, the user can’t modify or copy the value.
This attribute accepts single-value Boolean resources.
Pattern Determines whether the value is valid. The default pattern verifies that the first character is a letter
and that the value includes a colon (:).
To force the user to enter a value in a specific format, use a regular expression. Make sure that your
regular expression checks for a valid protocol in the URL, such as https:// or file:///.
This example expression checks for a secure HTTP protocol (https://) and a specific domain
(acmewireless.com).
^https?://(?:www\.)?acmewireless\.com/?.*
Read Only If set to $GlobalConstant.True, the user can’t modify the value, but the user can copy it.
This attribute accepts single-value Boolean resources.
474
Automate Your Business Processes Flows
Attribute Description
Required If set to $GlobalConstant.True, the user must enter a value.
This attribute accepts single-value Boolean resources.
Value The value of the URL field. Setting this attribute prepopulates the field. To use the value that the user
enters, store this attribute’s output in a variable.
This attribute accepts single-value resources. The value is treated as text.
Tip: By default, screen components that require Lightning runtime have no memory. If a user enters a value, navigates to another
screen, and returns to the component’s screen, the user-entered value is lost. To enable a flow to remember the value of an
attribute, set the attribute. The flow stores the value automatically. If you store values manually, store the attribute’s output value
in a variable.
SEE ALSO:
Provided Flow Screen Components
StackOverflow: Sample Regular Expressions for Valid URLs
MDN: What is a URL?
API Name An API name can include underscores and alphanumeric characters Available in: Essentials,
without spaces. It must begin with a letter and can’t end with an Professional, Enterprise,
Performance, Unlimited,
underscore. It also can’t have two consecutive underscores.
and Developer Editions
Text box The text to display to the flow user.
Example: Display a confirmation message that summarizes what the flow did on the user’s behalf.
SEE ALSO:
Provided Flow Screen Components
475
Automate Your Business Processes Flows
Use sections to organize screen components and fields to give users context and easier navigation. Available in: Essentials,
The Section component contains an optional header and up to four side-by-side columns. Each Professional, Enterprise,
column can contain multiple components and fields. You can place multiple sections on a screen, Performance, Unlimited,
each with its own header and number of columns. and Developer Editions
Tip: Apply conditional visibility rules to a section to affect all components and fields in that
section. Use this method to set visibility rules once for a large number of components, even
if you want only one column.
Headers (1)
Use section headers to create a visual hierarchy to guide your users to the most important items on a screen. All sections with headers
are collapsible and open by default each time a user visits the screen. Also, section header labels can be translated.
Columns (2)
Use columns to organize your screen and save your users from unnecessary scrolling.
Column Width (3)
When you add or delete a new column, Flow Builder sets the width of all columns in that section to be equal. To change a column’s
width, select a width from the predefined options.
Column Deletion (4)
When you delete a column, all components and fields in that column are deleted.
Tip: To center or indent your components and fields, or add padding, include empty columns on your screen.
Considerations
• Sections are responsive to the size of the window that’s showing the flow. On small form factor devices, columns are stacked vertically
instead. However, it isn’t responsive to the width of Lightning page columns and utility bars. For example, if a Lightning page shows
a flow in a sidebar, the width of the entire window determines how the columns appear, even though the sidebar is narrower.
476
Automate Your Business Processes Flows
• If a screen contains a Section screen component, the screen ignores the Layout property when the flow is distributed in Experience
Builder, the Lightning App Builder, or the utility bar. Screens with a Section screen component also ignore the flowLayout URL
parameter when the flow is distributed via URL.
SEE ALSO:
Customize a Flow URL to Render Two-Column Screens
Set the Runtime Experience for URL-Based Flows
SEE ALSO:
Flow Resource: Record Choice Set
Flow Resource: Picklist Choice Set
Flow Resource: Choice
Flow Connectors
Connectors determine the available paths that a flow can take at run time. On the canvas in Flow
EDITIONS
Builder, a connector looks like an arrow that points from one element to another.
Available in: both Salesforce
Label Example Description Classic and Lightning
Unlabeled Identifies which element to execute next. Experience
477
Automate Your Business Processes Flows
For each item Identifies the first element to execute for each iteration of a
Loop element.
After last item Identifies which element to execute after a Loop element
finishes iterating through a collection.
SEE ALSO:
Flow Elements
Flow Operators
Operators behave differently, depending on what you’re configuring. In Assignment elements,
EDITIONS
operators let you change resource values. In conditions and filters, operators let you evaluate
information and narrow the scope of a flow operation. Available in: both Salesforce
Classic and Lightning
Flow Operators in Assignment Elements Experience
Use Assignment element operators to change the value of a selected resource. Available in: Essentials,
Flow Operators in Decision and Pause Elements Professional, Enterprise,
Use condition operators to verify the value of a selected resource. Conditions are used in Decision Performance, Unlimited,
elements and Pause elements. and Developer Editions
478
Automate Your Business Processes Flows
• Picklist
• Record
• Stage
• Text
Note: Looking for the sObject data type from Cloud Flow Designer? In Flow Builder, we replaced sObject with the Record data
type. So your sObject collection variables are now record collection variables.
Apex-Defined
Match the @AuraEnabled attribute’s Apex data type with a flow data type in this reference to determine which operators are
supported.
Date Date
DateTime Date/Time
Decimal Number
Double Number
Integer Number
List Collection
Long Number
String Text
Boolean
Replace a Boolean resource with a new value.
Collection
Update or replace the value of a collection variable or record collection variable.
479
Automate Your Business Processes Flows
Add Value is added as a new Variable of the same data Before the Assignment:
item at the end of the type or record variable of • {!collText} is Yellow, Green, Blue
collection in Variable. the same object type
• {!varPicklist} is Red
Text, Picklist, and
Assignment: {!collText} Add {!varPicklist}
Multi-Select Picklist data
types are compatible with After the Assignment: {!collText} is Yellow,
each other. Green, Blue, Red
Stages (including
$Flow.CurrentStage) can be
added to text collections.
Remove The first instance of Value Variable of the same data Before the Assignment:
After First is found within the type or record variable of • {!collText} is Red, Orange, Yellow,
collection in Variable. All the same object type Green, Blue
items after the first For text collections only:
instance are removed • {!varText} is Yellow
from the collection in • Multi-Select Picklist Assignment: {!collText} Remove After First
Variable. • Picklist {!varText}
• $Flow.CurrentRecord After the Assignment: {!collText} is Red, Orange,
Yellow
Add At Start Value is added as a new Collection of the same data Before the Assignment:
item at the beginning of type or object type • {!collText} is Yellow, Green, Blue
the collection in Variable. Variable of the same data
• {!varPicklist} is Red
type or record variable of
Assignment: {!collText} Add At Start
the same object type
{!varPicklist}
For text collections only:
After the Assignment: {!collText} is Red, Yellow,
• Multi-Select Picklist Green, Blue
• Picklist
• $Flow.CurrentRecord
Remove All All instances of Value are Collection of the same data Before the Assignment:
removed from the type or object type • {!collText} is Red, Orange, Red, Yellow
collection in Variable. Variable of the same data • {!varText} is Red
type or record variable of
Assignment: {!collText} Remove All {!varText}
the same object type
480
Automate Your Business Processes Flows
• Picklist
• $Flow.CurrentRecord
Remove The first instance of Value Collection of the same data Before the Assignment:
First is removed from the type or object type • {!collText} is Red, Orange, Red, Yellow
collection in Variable. For text collections only: • {!varText} is Red
• Multi-Select Picklist Assignment: {!collText} Remove First {!varText}
• Picklist After the Assignment: {!collText} is Orange, Red,
• $Flow.CurrentRecord Yellow
Remove The first instance of Value Variable of the same data Before the Assignment:
Before First is found within the type or record variable of • {!collText} is Red, Orange, Yellow,
collection in Variable. All the same object type Green, Blue
items before the first For text collections only:
instance are removed • {!varText} is Yellow
from the collection in • Multi-Select Picklist Assignment: {!collText} Remove Before First
Variable. • Picklist {!varText}
• $Flow.CurrentRecord After the Assignment: {!collText} is Yellow,
Green, Blue
Remove The items in the Value Collection of the same data Before the Assignment:
Uncommon collection are found type or object type • {!collText1} is Red, Orange, Yellow,
within the Variable Green
collection. The found
items are kept, and all • {!collText2} is Orange, Green, Blue
other items are removed Assignment: {!collText1} Remove Uncommon
from the collection in {!collText2}
Variable. After the Assignment: {!collText1} is Orange,
Green
481
Automate Your Business Processes Flows
Add The number that you • Currency Before the Assignment: {!varCurrency} is 10
enter or select for Value is Assignment: {!varCurrency} Add 7
• Number
added to the value of
Variable. After the Assignment: {!varCurrency} is 17
Subtract The number that you • Currency Before the Assignment: {!varCurrency} is 10
enter or select for Value is Assignment: {!varCurrency} Subtract 7
• Number
subtracted from the value
of Variable. After the Assignment: {!varCurrency} is 3
Date
Replace (Equals), add to (Add), or subtract from (Subtract) the value of a date/time resource.
Add Value is added, in days, to the • Currency Before the Assignment: {!varDate} is 1/16/2016
selected Variable’s value. Assignment: {!varDate} Add 7
• Number
After the Assignment: {!varDate} is 1/23/2016
Subtract Value is subtracted, in days, from the • Currency Before the Assignment: {!varDate} is 1/16/2016
selected Variable’s value. Assignment: {!varDate} Subtract 7
• Number
After the Assignment: {!varDate} is 1/9/2016
482
Automate Your Business Processes Flows
Date/Time
Replace a date/time resource with a new value (Equals).
Picklist
Replace a picklist resource with a new value (Equals) or concatenate a value onto the original value (Add).
Note: Before values are assigned or added to a picklist resource, they’re converted into string values.
Add What you enter or select for Value • Boolean Before the Assignment: {!varPicklist} is Blue
is added to the end of the selected Assignment: {!varPicklist} Add -green
• Currency
picklist.
• Date After the Assignment: {!varPicklist} is Blue-green
• Date/Time
• Multi-Select
Picklist
• Number
• Picklist
• Text
483
Automate Your Business Processes Flows
Multi-Select Picklist
Replace a multi-select picklist resource with a new value (Equals), concatenate a value onto the original value (Add), or add a selection
to the resource (Add Item).
Note: Before values are assigned or added to a multi-select picklist resource, they’re converted into string values.
Add What you enter or select for Value • Boolean Before the Assignment: {!varMSP} is Blue; Green.
is added to the last item selected in This value includes two separate selections
• Currency
the multi-select picklist. It doesn’t Assignment: {!varMSP} Add Yellow
create a selection. • Date
• Date/Time After the Assignment: {!varMSP} is Blue;
Easily add items to a multi-select GreenYellow. This value includes two separate selections
picklist resource by using the “add • Multi-Select
item” operator. Picklist
To add semi-colon-delimited items • Number
to a multi-select picklist variable • Picklist
with the “add” operator, always add • Text
a single space after the semi-colon
and don’t include a space before the
semi-colon. This way, you can
compare the variable’s values to the
values of a multi-select picklist field
from the Salesforce database. For
example: ; Yellow
Add Item What you enter or select for Value • Boolean Before the Assignment: {!varMSP} is Blue; Green
is added as a new selection to the Assignment: {!varMSP} Add item Yellow
• Currency
end of the multi-select picklist. The
Assignment automatically adds “;” • Date After the Assignment: {!varMSP} is Blue; Green;
before the new item. That way, • Date/Time Yellow. This value includes three separate selections
Salesforce reads it as a separate item • Multi-Select
selected by the multi-select picklist. Picklist
• Number
484
Automate Your Business Processes Flows
• Picklist
• Text
Record
Replace a record variable with a new value (Equals).
Stage
You can’t update the value of a stage, but you can update the values of the stage global variables: $Flow.CurrentStage and
$Flow.ActiveStages.
Note: Assignments use the stage’s fully qualified name: namespace.flowName:stageName or flowName:stageName.
$Flow.CurrentStage
Replace the stage selected in $Flow.CurrentStage.
$Flow.ActiveStages
Add or remove active stages in the $Flow.ActiveStages global variable.
485
Automate Your Business Processes Flows
Remove The first instance of the stage • Stage Before the Assignment: $Flow.ActiveStages is
After First in Value is found within stage1, stage2, stage3, stage4
• $Flow.CurrentStage
$Flow.ActiveStages.
Assignment: {!$Flow.ActiveStages} Remove
All stages after the first • Fully qualified stage
After First {!stage2}
instance are removed from name
$Flow.ActiveStages. After the Assignment: $Flow.ActiveStages is
stage1, stage2
Add At Start Value is added to the • Stage Before the Assignment: $Flow.ActiveStages is
beginning of stage1, stage2
• $Flow.ActiveStages
$Flow.ActiveStages.
Assignment: {!$Flow.ActiveStages} Add At
• $Flow.CurrentStage
Start {!stage0}
• Fully qualified stage
name After the Assignment: $Flow.ActiveStages is
stage0, stage1, stage2
Remove All All instances of Value are • Stage Before the Assignment: $Flow.ActiveStages is
removed from stage1, stage2, stage3
• $Flow.ActiveStages
$Flow.ActiveStages.
Assignment: {!$Flow.ActiveStages} Remove
• $Flow.CurrentStage
All {!$Flow.ActiveStages}
• Fully qualified stage
name After the Assignment: $Flow.ActiveStages is
empty
Remove First The first instance of the stage • Stage Before the Assignment: $Flow.ActiveStages is
in Value is removed from stage1, stage2, stage3, stage1
• $Flow.CurrentStage
$Flow.ActiveStages.
Assignment: {!$Flow.ActiveStages} Remove
• Fully qualified stage
First stage1
name
After the Assignment: $Flow.ActiveStages is
stage2, stage3, stage1
Remove The first instance of the stage • Stage Before the Assignment: $Flow.ActiveStages is
Before First in Value is found within stage1, stage2, stage3, stage4
• $Flow.CurrentStage
$Flow.ActiveStages.
Assignment: {!$Flow.ActiveStages} Remove
All stages before that first • Fully qualified stage
Before First {!stage3}
instance are removed from name
$Flow.ActiveStages. After the Assignment: $Flow.ActiveStages is
stage3, stage4
486
Automate Your Business Processes Flows
Text
Replace a text resource with a new value (Equals) or concatenate a value onto the end of the original value (Add).
Note: Before values are assigned or added to a text resource, they’re converted into string values.
Add The text that you enter or select for • Boolean Before the Assignment: {!varText} is Blue
Value is added to the end of Assignment: {!varText} Add Yellow
• Currency
Variable.
• Date After the Assignment: {!varText} is BlueYellow
• Date/Time
• Number
• Multi-Select
picklist
• Picklist
487
Automate Your Business Processes Flows
• Stage,
including
$Flow.CurrentStage
and
$Flow.ActiveStages
• Text
Note: Looking for the sObject data type from Cloud Flow Designer? In Flow Builder, we replaced sObject with the Record. So
your sObject collection variables are now record collection variables.
Apex-Defined
Match the @AuraEnabled attribute’s Apex data type with a flow data type in this reference to determine which operators are
supported.
Date Date
DateTime Date/Time
Decimal Number
488
Automate Your Business Processes Flows
Integer Number
List Collection
Long Number
String Text
Boolean
Check whether a Boolean resource’s value matches another value or resource.
Equals The value of the selected Resource matches what you enter or select for Value. Boolean
• A decision outcome resolves to true if the flow interview took that outcome.
• A pause configuration resolves to true if the flow waited for the associated resume event.
• A data element or action element resolves to true if it executed without error. If a fault
occurred, the element resolves to false. If the element wasn’t executed, it resolves to null.
Was Set The value for Resource is a field in a record variable, and that field has been populated with Boolean
a value in the flow at least once.
Was Visited The selected Resource is an element in the flow, and it has been visited during the flow Boolean
interview.
Choice
Every choice resource has a data type and obeys the operator rules for that data type. However, choice resources support one extra
operator that other resources don’t, no matter what their data type is.
489
Automate Your Business Processes Flows
Collection
Check whether a Collection resource’s value contains or matches another value or resource.
Does Not Equal The collection that’s selected for Resource doesn’t match Collection of the same data type.
the collection that’s selected for Value For record collection variables, only record collection
Two record collection variables are unequal if they include variables with the same object type are supported.
different fields or if the fields have different values.
Equals The collection that’s selected for Resource matches the Collection of the same data type.
collection that’s selected for Value For record collection variables, only record collection
Two record collection variables are equal if they include variables with the same object type are supported.
the same fields and those fields have the same values.
Is Null The collection that’s selected for Resource isn’t populated Boolean
with any values
Equals The value for Resource matches what’s entered or selected for Value • Currency
• Number
Greater Than The value for Resource is larger than what’s entered or selected for Value • Currency
• Number
Greater Than The value for Resource is larger than what’s entered or selected for Value or is the same • Currency
or Equal
• Number
Less Than The value for Resource is smaller than what’s entered or selected for Value • Currency
• Number
Less Than or The value for Resource is smaller than what’s entered or selected for Value or is the same • Currency
Equal
490
Automate Your Business Processes Flows
• Number
Was Set The value for Resource is a field in a record variable, and that field has been populated with Boolean
a value in the flow at least once
Equals The value for Resource matches what’s entered or selected for Value • Date
• Date/Time
Greater Than The value for Resource is a later date or time than what’s entered or selected for Value • Date
• Date/Time
Greater Than The value for Resource is a later date or time than what’s entered or selected for Value or is • Date
or Equal the same date or time
• Date/Time
Less Than The value for Resource is an earlier date or time than what’s entered or selected for Value • Date
• Date/Time
Less Than or The value for Resource is an earlier date or time than what’s entered or selected for Value or • Date
Equal is the same date or time
• Date/Time
Was Set The value for Resource is a field in a record variable, and that field has been populated with Boolean
a value in the flow at least once
Picklist
Check whether a Picklist resource’s value matches or contains another value or resource.
491
Automate Your Business Processes Flows
Does Not The value for Resource doesn’t match what’s entered or selected for Value • Boolean
Equal
• Currency
• Date
• Date/Time
• Multi-Select
Picklist
• Number
• Picklist
• Text
Equals The value for Resource matches what’s entered or selected for Value • Boolean
• Currency
• Date
• Date/Time
• Multi-Select
Picklist
• Number
• Picklist
• Text
Was Set The value for Resource is a field in a record variable, and that field has been populated with Boolean
a value in the flow at least once
Multi-Select Picklist
Check whether a multi-select picklist resource’s value matches or contains another value or resource.
Note: These operators treat the resource’s value as a text value. If the resource’s value includes multiple items, the operators treat
the value as one string that happens to include semi-colons. It doesn’t treat each selection as a different value. For example, the
operators treat red; blue; green as a single value rather than three separate values.
492
Automate Your Business Processes Flows
Does Not The value for Resource doesn’t match what’s entered or selected for Value • Boolean
Equal
Note: Order matters. If you aren’t sure which order the values that you’re checking • Currency
for will appear in, use the INCLUDES() function in a flow formula. For example, if you • Date
compare “red; blue; green” to “blue; green; red” using the Does Not Equal operator,
• Date/Time
that condition resolves to true.
• Multi-Select
Picklist
• Number
• Picklist
• Text
Equals The value for Resource exactly matches what’s entered or selected for Value • Boolean
Note: Order matters. If you aren’t sure which order the values that you’re checking • Currency
for will appear in, use the INCLUDES() function in a flow formula. For example, if you • Date
compare “red; blue; green” to “blue; green; red” using the Equals operator, that condition
• Date/Time
will resolve to false.
• Multi-Select
Picklist
• Number
• Picklist
• Text
Was Set The value for Resource is a field in a record variable, and that field has been populated with Boolean
a value in the flow at least once
Record
Check whether a record resource’s value matches another value or resource.
493
Automate Your Business Processes Flows
Equals The value for Resource matches what’s entered or selected for Value Record with the same
object type
Stage
Note: Stages resolve to the fully qualified stage name: namespace.flowName:stageName or flowName:stageName.
Check whether a Stage resource or the $Flow.CurrentStage global variable matches, ends with, or starts with another value or
resource.
Equals The value for Resource matches what’s entered or selected for Value • Stage
• Text
Ends With The end of the value for Resource matches what’s entered or selected for Value • Stage
• Text
Starts With The beginning of the value for Resource matches what’s entered or selected for Value • Stage
• Text
Check whether $Flow.ActiveStages contains a particular stage, matches the value of a Text collection, or is null.
Does Not The collection that’s selected for Resource doesn’t match $Flow.ActiveStages. Text collection
Equal
Equals The collection that’s selected for Resource doesn’t match $Flow.ActiveStages. Text collection
494
Automate Your Business Processes Flows
Text
Check whether a Text resource’s value matches, contains, ends with, or starts with another value or resource.
Note:
• Before values are compared to a text resource, they’re converted into string values.
• Stages resolve to the fully qualified stage name: namespace.flowName:stageName or flowName:stageName.
Does Not The value for Resource doesn’t match what’s entered or selected for Value • Boolean
Equal
• Currency
• Date
• Date/Time
• Multi-Select
Picklist
• Number
• Picklist
• Stage
• Text
Equals The value for Resource matches what’s entered or selected for Value • Boolean
• Currency
• Date
• Date/Time
495
Automate Your Business Processes Flows
• Multi-Select
Picklist
• Number
• Picklist
• Stage
• Text
Ends With The end of the value for Resource matches what’s entered or selected for Value • Boolean
• Currency
• Date
• Date/Time
• Multi-Select
Picklist
• Number
• Picklist
• Stage
• Text
Starts With The beginning of the value for Resource matches what’s entered or selected for Value • Boolean
• Currency
• Date
• Date/Time
• Multi-Select
Picklist
• Number
• Picklist
• Stage
• Text
Was Set The value for Resource is a field in a record variable, and that field has been populated with Boolean
a value in the flow at least once
496
Automate Your Business Processes Flows
Checkbox Fields
When you select a checkbox field under Field, these operators are available. A flow treats null as a different value than false. If you
filter for records whose checkbox field is null, no records are returned.
497
Automate Your Business Processes Flows
Greater Than or Equal Is larger than what’s entered or selected for • Currency
Value or is the same
• Number
498
Automate Your Business Processes Flows
Less Than or Equal Is an earlier date or time than what’s entered • Date
or selected for Value or is the same date or
• Date/Time
time
499
Automate Your Business Processes Flows
500
Automate Your Business Processes Flows
Tip: Be careful when using these operators to filter records based on a multi-select picklist field. Even if two resources have the
same items in a multi-select picklist, they can be mismatched if these cases differ.
• The spacing before or after the semi-colon. For example, one resource’s value is “red; green; blue” and the other’s value is
“red;green;blue”
• The order of the items. For example, one resource’s value is “red; green; blue” and the other’s value is “red; blue; green”
For best results, use the INCLUDES function in a flow formula.
501
Automate Your Business Processes Flows
To change the properties of a flow version, open it in Flow Builder. Then click . Available in: both Salesforce
Classic and Lightning
Experience
Property Description
Available in: Essentials,
Flow Label The label for the flow version. The label appears in the flow detail page
Professional, Enterprise,
and list views. When a user runs this flow, the header displays the flow
Performance, Unlimited,
label.
and Developer Editions
You can edit the label for inactive flows and flow versions.
Flow API Name The API name for the flow. The API name is used to refer to this flow
from other parts of Salesforce, such as in a URL or Lightning web
component. An API name can include underscores and alphanumeric
characters without spaces. It must begin with a letter and can’t end with
an underscore. It also can’t have two consecutive underscores. The API
name appears on the flow detail page.
You can’t edit the API name after saving the flow.
Description Differentiates the flow version from other versions. The description
appears in the flow detail page and list views.
You can edit the description for inactive flows and flow versions.
502
Automate Your Business Processes Flows
Property Description
Even if you don’t use managed packages, you can use this field to clearly identify the base flow.
How to Run the Flow Determines the context that the flow runs in. You can choose to always run flow in system context
with sharing or system context without sharing. By default, the context that the flow runs in depends
on how the flow is launched.
Type Determines which elements and resources are supported in the flow and the ways that the flow
can be implemented. The type appears in the flow detail page and list views. In flow version
properties, the type appears in the Advanced section. For details, see Flow Types on page 100.
Flow Builder doesn’t support saving a new version as a different flow type. To change a flow’s type,
save it as a new flow. Before you change the flow type, make sure that the flow contains only
elements, resources, and functionality that the new flow type supports. You can fix some, but not
all, compatibility issues in the new flow.
API Version for Determines which versioned run-time behavior improvements the flow adopts.
Running the Flow Changing this field requires the Manage Flows permission. Before you select a new API version,
review all run-time improvements that were delivered between the currently selected API version
and the new API version. You can find all flow and process run-time improvements for an API version
in the Salesforce Release Notes.
By default, when you create a flow, it runs in the latest API version. If an existing flow is saved as a
new flow or flow version, the existing flow’s run-time API version is used in the new flow or flow
version.
The run-time API version doesn’t change as future Salesforce releases roll out. You decide when, if
ever, to change the API version for running each flow version. This field lets you test and upgrade
your flows one by one, and at your own pace. You can even opt to never adopt versioned updates
for one or all your flows.
Interview Label The label for the flow’s interviews. An interview is a running instance of a flow. This label appears
in the following areas.
• List views of paused interviews in Setup
• Paused Interviews component on the Home page or in an Experience Builder site
• Paused Interviews item in the Salesforce mobile app
• Actions & Recommendations component in a Lightning page
You can edit the interview label for inactive flows and flow versions. By default, the interview label
contains the flow name and the {!$Flow.CurrentDateTime} global variable.
Use a text template to reference multiple resources in the label. For example, Flow Name -
{!Account.Name} - {!$Flow.CurrentDateTime}.
SEE ALSO:
Always Run in System Context
API Version for Running a Flow
503
Automate Your Business Processes Orchestrator
Orchestrator
As your company grows, so does the complexity of your workflows. Processes often require input from multiple users in multiple
departments across multiple time zones. This increased complexity results in an increased amount of time spent waiting for each person
to complete their task in the proper order.
What Is Orchestrator?
Orchestrator lets you create orchestrations: multi-step processes that interact with multiple users. An orchestration is a sequence of
stages, each comprised of a series of steps. A stage can contain interactive and background steps. Interactive steps have an assigned
user and execute a designated screen flow. An admin places the Orchestrator Work Guide Lightning App Builder component on the
page layout for the type of record the interactive step affects. When an orchestration runs an interactive step, the designated user receives
an email with a link to their assigned action. The assigned user clicks the link to go to the record where they complete their action in
the Work Guide. Background steps execute an autolaunched flow that’s executed by the system and requires no user interaction.
504
Automate Your Business Processes Flow Builder for Orchestrator
Orchestrator uses the Auto-Layout canvas in Flow Builder. This feature is supported in
Government Cloud and
Government Cloud Plus.
• To the left of the buttons, you can see the version’s active or inactive status and when it was last saved.
• If the orchestration has warnings or errors, the Show Warnings icon ( ) or the Show Errors ( ) icon appears. To see their
details, click the icon.
Toolbox (2)
Create variables, constants, formulas, or text templates to use in your orchestration. Or view a list of all resources and elements that
you added.
Canvas (3)
Build an orchestration on the canvas. As you add elements to the canvas and connect them, you can see a diagram of your
orchestration.
Note: To insert an element, click where you want it to appear. Flow Builder then shows the options and possible elements
for this location.
Details (4)
Set attributes for the element selected in the canvas. The Details panel closes when no element is selected.
505
Automate Your Business Processes Orchestrator Concepts
Keyboard Shortcuts
Use these handy keyboard shortcuts for macOS and Windows to quickly navigate orchestrations.
Orchestrator Concepts
Learn about what an orchestration is made of and how it relates to Salesforce Flow.
Orchestrations
An orchestration uses stages, steps, and decisions to organize complex business processes.
Building Blocks of Orchestrations
Stages, steps, and flows are the building blocks of an orchestration.
Anatomy of an Orchestration
Combine elements, connectors, and resources to build orchestrations.
Orchestration Types
An orchestration’s type determines how the orchestration can be distributed.
Triggers for Orchestrations
Creating or updating a record can trigger an orchestration that requires additional input from users, approval from assigned users,
other updates to the record, or changes to related records. In the Start element of a record-triggered orchestration, you can specify
new and changed records of a specific object. Autolaunched orchestrations don’t use triggers. Use another mechanism to launch
an autolaunched orchestration, such as custom Apex classes or custom URLs. Use Orchestrator to automate complex processes, and
use Flow Trigger Explorer to order record-triggered flows.
What’s the Difference Between Salesforce Flow and Orchestrator?
Salesforce offers several features that automate internal procedures and business processes to save time across your org.
Advanced Orchestration Concepts
After you understand the basics, you’re ready for a closer look at the context in which orchestrations run and how they perform work
items at the same time.
506
Automate Your Business Processes Orchestrator Concepts
Orchestrations
An orchestration uses stages, steps, and decisions to organize complex business processes.
EDITIONS
Build orchestrations using the Orchestrator tiles in Flow Builder. Orchestrator tiles limit the available
elements in your orchestration and include certain elements, such as stages and steps, that aren’t Available in: both Salesforce
available in flows. Orchestrator always uses Auto-Layout in Flow Builder. Classic and Lightning
Experience
The two Orchestrator tiles are Autolaunched Orchestration (No Trigger) and Record-Triggered
Orchestration. Trigger an autolaunched orchestration using a custom Apex class or a custom URL. Available in: Enterprise,
The creation or update of a record can trigger a record-triggered orchestration, but only after the Performance, Unlimited,
record is saved. and Developer Editions
Variables in Orchestrations This feature is supported in
Autolaunched orchestrations can use input variables to require input from a process that calls Government Cloud and
it. Government Cloud Plus.
Orchestration Stages
A stage groups related steps, organizing them into logical phases. Stages are executed sequentially, and only one stage in an
orchestration can be in progress at a time. You configure the conditions that must be met for the stage to be considered complete.
Orchestration Steps
Steps are grouped in stages and can be run sequentially or concurrently. Interactive steps require user intervention. Background
steps require no user interaction.
Flows in Orchestrations
Every step in an orchestration runs an associated flow. You can use an evaluation flow to set custom criteria for starting a step or to
mark an interactive step or stage complete.
Orchestration Work Items
When an interactive step in an orchestration runs, it creates a work item and assigns it to a user, group, or queue. The orchestration
then sends an email with a link to the specified record page to all assigned users. They complete the work in the Orchestrator Work
Guide component on the specified record page.
507
Automate Your Business Processes Orchestrator Concepts
Orchestration Stages
A stage groups related steps, organizing them into logical phases. Stages are executed sequentially,
EDITIONS
and only one stage in an orchestration can be in progress at a time. You configure the conditions
that must be met for the stage to be considered complete. Available in: both Salesforce
Classic and Lightning
General Experience
An orchestration must contain at least one stage. You can’t set entry conditions for a stage because Available in: Enterprise,
they run sequentially. To control when a stage completes, select one of the exit conditions. Performance, Unlimited,
and Developer Editions
Note: The Stage element in Orchestrator isn’t related to the Stage resource in Salesforce
Flow. This feature is supported in
Government Cloud and
Government Cloud Plus.
Exit Condition
To control when a stage completes, select an exit condition.
When the specified evaluation flow returns True, the stage is The name of the evaluation flow that determines when a stage
marked Complete completes.
Automatic Output
An orchestration has access to a stage’s status.
Status
When an orchestration is running, it manages the status for each stage. Because stages run sequentially and have no entry conditions,
they only have a status after they’re in progress.
Completed • The stage met its exit condition, and the orchestration
completed.
• The stage completed, and the orchestration was canceled.
Canceled The stage was in progress when the orchestration was canceled.
508
Automate Your Business Processes Orchestrator Concepts
History
In history, an orchestration stage has several possible milestones.
Discontinue Stage • The orchestration encountered an error after the stage was
completed.
• The orchestration encountered an error while the stage was
in progress.
Orchestration Steps
Steps are grouped in stages and can be run sequentially or concurrently. Interactive steps require
EDITIONS
user intervention. Background steps require no user interaction.
Note: The Step resource in Orchestrator isn’t related to the discontinued Step element in Available in: both Salesforce
Salesforce Flow. Classic and Lightning
Experience
509
Automate Your Business Processes Orchestrator Concepts
Interactive Step
An interactive step requires user interaction. When the orchestration is designed, an interactive step is assigned to a user, group, or
queue. At run time, the assigned user or a user from the assigned group or queue completes the associated screen flow on a specified
record page. You can control both when an interactive step is ready to start and when it’s considered complete.
Entry Condition
To control when a background or interactive step starts, select an entry condition.
When another step is marked Complete, the step starts The name of the step that must be completed before the current
step can start.
510
Automate Your Business Processes Orchestrator Concepts
Exit Condition
To control when an interactive step completes, select an exit condition.
When the specified evaluation flow returns True, the step is marked The name of the evaluation flow that determines when an
Complete interactive step completes.
Automatic Output
An orchestration has access to a step’s status and output variables from each step’s associated flow.
Note: To allow an orchestration access to a user-defined output variable in a flow called by a step, mark it as Available for output
in the flow.
Note: An orchestration uses the isOrchestrationConditionMet output variable in evaluation flows. All other user-defined output
variable values are discarded.
Status
When an orchestration is running, it manages the status for each step.
Discontinued • The step was in progress when its associated stage completed.
• The step was completed when the orchestration encountered
an error.
511
Automate Your Business Processes Orchestrator Concepts
History
In history, a step in an orchestration has several possible milestones.
Discontinue Step • The step’s stage completed while the step was in progress.
• The orchestration encountered an error after the step was
completed.
• The orchestration encountered an error while the step was in
progress.
• The step’s stage encountered an error while the step was in
progress.
Flows in Orchestrations
Every step in an orchestration runs an associated flow. You can use an evaluation flow to set custom
EDITIONS
criteria for starting a step or to mark an interactive step or stage complete.
Background Steps Available in: both Salesforce
Each background step calls an autolaunched flow. Classic and Lightning
Experience
Interactive Steps
Each interactive step assigns a screen flow to a user, group, or queue. Available in: Enterprise,
Entry Conditions Performance, Unlimited,
and Developer Editions
Each step can call an evaluation flow to determine whether the step can be started. An evaluation
flow is a flow with a process type of Evaluation Flow. It’s an autolaunched flow that contains a This feature is supported in
predefined Boolean output variable named isOrchestrationConditionMet. To Government Cloud and
indicate that the custom entry conditions are met, the output variable must be set to true. Government Cloud Plus.
512
Automate Your Business Processes Orchestrator Concepts
Note: Previously, you could select any autolaunched flow that used the isOrchestrationConditionMet variable
to evaluate custom entry or exit criteria. An orchestration that uses this type of autolaunched flows for evaluation criteria is
unaffected by this change until you update it. New orchestrations and existing orchestrations that you update can use only
flows with a process type of Evaluation Flow.
Exit Conditions
An interactive step can call an evaluation flow to determine whether the step can be considered complete. An evaluation flow is a
flow with a process type of Evaluation Flow. It’s an autolaunched flow that contains a predefined Boolean output variable named
isOrchestrationConditionMet. To indicate that the custom exit conditions are met, the output variable must be set to
true.
Note: The Boolean isOrchestrationConditionMet variable defined in an evaluation flow must be initialized to
false.
Note: Previously, you could select any autolaunched flow that used the isOrchestrationConditionMet variable
to evaluate custom entry or exit conditions. An orchestration that uses this type of autolaunched flow for evaluation conditions
is unaffected by this change until you update it. New orchestrations and existing orchestrations that you update can use only
flows with a process type of Evaluation Flow.
Flow Variables
Flows can have internal-only, input, and output variables.
Input The user-defined variable is marked Flows that can require input values from
Available for input. When the flow is called an orchestration for input variables are:
by an orchestration step, its input variables • Autolaunched flows
are required inputs for the step.
• Screen flows
• Evaluation flows
SEE ALSO:
Flow Types
Flows
513
Automate Your Business Processes Orchestrator Concepts
When you select the Evaluation Flow tile in the New Flow window, you create an autolaunched Available in: Enterprise,
flow that contains a predefined Boolean output variable named Performance, Unlimited,
isOrchestrationConditionMet. and Developer Editions
Initialize isOrchestrationConditionMet to false, and to indicate that the custom This feature is supported in
conditions are met, set isOrchestrationConditionMet to true. Government Cloud and
Government Cloud Plus.
Note: Previously, you could select any autolaunched flow that used the
isOrchestrationConditionMet variable to evaluate custom entry or exit conditions.
An orchestration that uses this type of autolaunched flow for evaluation conditions is
unaffected by this change until you update it. New orchestrations and existing orchestrations
that you update can use only flows with a process type of Evaluation Flow.
Evaluation flows only return a value for isOrchestrationConditionMet. Values for any other output variables are discarded.
514
Automate Your Business Processes Orchestrator Concepts
Completed • The assigned user completed the work item, and the
orchestration completed.
• The assigned user hasn’t completed the work item, and the
stage that contains its associated step completed.
• The assigned user has completed the work item, and the
orchestration was canceled.
• The assigned user has completed the work item, and the
orchestration encountered an error.
• The assigned user has completed the work item, and the stage
that contains its associated step encountered an error.
• The assigned user hasn’t completed the work item, and the
stage that contains its associated step encountered an error.
515
Automate Your Business Processes Orchestrator Concepts
Anatomy of an Orchestration
Combine elements, connectors, and resources to build orchestrations.
EDITIONS
• Each element (1) represents an action that the flow can execute. Orchestrations use Stage and Decision elements.
• Each connector (2) defines an available path that the orchestration can take at run time.
• Each stage consists of one or more steps (3).
• Each resource (4) represents a value that you can reference through a stage, step, or decision.
Orchestration Types
An orchestration’s type determines how the orchestration can be distributed.
EDITIONS
All orchestrations are made up of steps grouped within a series of stages. Interactive steps contain
a screen flow and require user interaction. Background steps contain an autolaunched flow and Available in: both Salesforce
don’t require user interaction. An orchestration’s type affects how an orchestration is launched. Classic and Lightning
Experience
Orchestration Type Available Distribution Methods Available in: Enterprise,
Autolaunched Orchestration (No Trigger) Performance, Unlimited,
• Custom Apex classes and Developer Editions
• Custom buttons or custom links
This feature is supported in
Record-triggered Orchestration A record-triggered flow orchestration only runs Government Cloud and
Government Cloud Plus.
when a record is created or updated.
516
Automate Your Business Processes Orchestrator Concepts
SEE ALSO:
What's the Difference Between Workflow Rules and Flows?
517
Automate Your Business Processes Build an Orchestration
Build an Orchestration
Orchestrator allows you to build sophisticated business processes by combining and coordinating
EDITIONS
flows.
Available in: both Salesforce
User Permissions Needed Classic and Lightning
To open, edit, or create an orchestration in Flow Manage Flow Experience
Builder: Available in: Enterprise,
Performance, Unlimited,
and Developer Editions
Before you create your orchestration, plan it out. It’s much easier to use an orchestration to automate
This feature is supported in
a business process when you understand all the details, such as the flows required to complete
Government Cloud and
each step.
Government Cloud Plus.
Steps and stages rely on flows to run. Create those flows before you build your orchestration.
1. Open Flow Builder. From Setup, in the Quick Find box, enter Flows, select Flows, and then
click New Flow.
2. Click All + Templates, select Orchestrator from the list, select the orchestration type, and then click Next.
3. (Optional) To configure the Start element for a record-triggered orchestration, click Edit.
4.
To add an element, click between the Start element and the End element, and then select an element.
5. To add steps to a stage, click Add Step.
6.
To create a loop or connect to a different element, click following the stage, click Connect to element, and then click on
the desired element.
7. Save your orchestration.
After you build an orchestration, activate it, and then test it to make sure that it’s working as you expect. You’re then ready to use it.
518
Automate Your Business Processes Build an Orchestration
Custom Condition When you select this option, provide the condition logic by
Logic Is Met entering up to 1000 characters. Use:
• Numbers to refer to each condition
• AND, OR, or NOT to identify which combination of
conditions must be true
• Parentheses to group parts of the string together
519
Automate Your Business Processes Build an Orchestration
Tip: If you enter AND, it’s the same as if you selected All Conditions Are Met.
If you enter OR, it’s the same as if you selected Any Condition Is Met. If you
enter any other logic, make sure that you include a number for each condition.
For example, for 1 AND NOT(2 OR 3), the flow evaluates whether the first
condition is true and neither the second nor third condition is true.
Operator The available operators depend on the data type selected for Resource. For details, see
Orchestrator Operators in Decision Elements.
Value Resource and Value in the same row must have compatible data types.
Options:
• Select an orchestration resource, such as an input variable or automatic output from a stage
or step.
• Select a global variable.
• Manually enter a literal value.
Note: When you add or subtract a number from a date value, the date adjusts in days, not
hours.
520
Automate Your Business Processes Build an Orchestration
Note: Don’t select $User for User Resource. The $User global variable evaluates to the system user when the orchestration
is running in system context and an interactive step can’t be assigned to the system user.
e. If you selected Group Resource, specify the API name of the variable that contains the group API name when the orchestration
runs.
f. If you selected Queue Resource, specify the API name of the variable that contains the assigned queue’s API name when the
orchestration runs.
SEE ALSO:
Running User of an Orchestration
521
Automate Your Business Processes Build an Orchestration
Route an Orchestration
Orchestrator uses Auto-Layout in Flow Builder. In Auto-Layout, elements on the canvas are spaced
EDITIONS
and connected automatically. Use Go To connectors when you have elements that don't follow
the usual consecutive auto-layout paths. Available in: both Salesforce
Classic and Lightning
User Permissions Needed Experience
To open, edit, or create an orchestration in Flow Manage Flow Available in: Enterprise,
Builder: Performance, Unlimited,
and Developer Editions
522
Automate Your Business Processes Build an Orchestration
523
Automate Your Business Processes Build an Orchestration
1. Create a record-triggered flow that runs when the custom orchestrator run ID field is updated on a record. If you have records of
more than one object affected by an external system, create a record-triggered flow for each object.
2. Add a Create Records element to the record-triggered flow.
3. Enter a label, API name, and description for the element.
4. Select Use separate resources, and literal values.
5. For Object, enter Orchestration, and then select Orchestration Event.
6. For Object, enter Orchestration, and then select Orchestration Event.
7. For Field, enter Orchestration, and then select OrchestrationInstanceId.
8. For Value, enter $Record, and then select $Record. Then select the name of the custom orchestration run ID field on the triggering
record.
9. Click Done.
10. Save and activate the new record-triggered flow.
SEE ALSO:
Extend Salesforce with Clicks, Not Code : Create Custom Fields
Automate Your Business Processes : Flow Resource: Variable
524
Automate Your Business Processes Deploy an Orchestration
Deploy an Orchestration
After you design and test your orchestration, it’s time to put it to work!
b. For Email Address, enter a company email address that can be used as the From Address
in your email alert.
c. Select Allow All Profiles to Use this From Address.
d. Save your work.
4. View your org-wide address and the status, which reads Verification Request Sent.
5. Navigate to the email address you specified in the Email Address field.
6. When Salesforce sends an email to the company address you entered previously, approve and verify the company email address.
7. Navigate back to Salesforce, and check to make sure that the status of your address is Verified.
8. From Setup, in the Quick Find box, enter automation settings, and then select Process Automation Settings..
9. For Email Approval Sender, specify your org-wide email address.
10. Save your changes.
Activate your orchestration.
525
Automate Your Business Processes Deploy an Orchestration
USER PERMISSIONS
To activate or deactivate an
orchestration:
• Manage Flow
To activate a
record-triggered
orchestration:
• View All Data
To use inbound change sets: Deploy Change Sets AND Modify Metadata
Through Metadata API Functions
Create and upload the outbound change set in your sandbox, and deploy the inbound change set in production.
526
Automate Your Business Processes Orchestration Run
1. Ensure that all group names and queue names used in the source org to assign interactive steps to users duplicate the names used
in the target org.
2. Ensure that no interactive steps are directly assigned to a specific user.
a. Create constants for each assigned user who’s directly assigned to an interactive step in the orchestration.
b. Assign each interactive step to the appropriate assigned-user constant.
SEE ALSO:
Sandboxes: Staging Environments for Customizing and Testing : Change Sets
Orchestration Run
An orchestration run is a running instance of an orchestration. An orchestration is an application
EDITIONS
built by your admin that uses stages and decisions to organize a complex business process.
After it’s created, an orchestration run has an associated status. Available in: both Salesforce
Classic and Lightning
Orchestration Run Status Description Experience
527
Automate Your Business Processes Manage Orchestrations and Work Items
528
Automate Your Business Processes Manage Orchestrations and Work Items
USER PERMISSIONS
USER PERMISSIONS
2. To see details for a specific orchestration run, on the All Orchestration Runs list view, click the
link for an orchestration, and then click the Related tab.
529
Automate Your Business Processes Manage Orchestrations and Work Items
3. To see the full orchestration run history, under Orchestration Run History, click View All.
USER PERMISSIONS
530
Automate Your Business Processes Manage Orchestrations and Work Items
USER PERMISSIONS
To cancel a running
orchestration:
• Manage Flow
531
Automate Your Business Processes Manage Orchestrations and Work Items
532
Automate Your Business Processes Manage Orchestrations and Work Items
Note: These statuses apply when the interactive step fails. When the screen flow associated with the interactive step fails, the
status for running stage and failed step is In Progress and the status for not started work items is Assigned.
533
Automate Your Business Processes Troubleshoot Orchestrations
Troubleshoot Orchestrations
To troubleshoot a failed orchestration run, use the orchestration fault email. To test an orchestration
EDITIONS
and observe what happens as it runs, use the debug option.
Available in: both Salesforce
Emails about Orchestration Errors Classic and Lightning
When an orchestration run fails, Salesforce sends an error email. The email is sent to either the Experience
admin who last modified the associated orchestration or the Apex exception email recipients. Available in: Enterprise,
Debug an Orchestration Performance, Unlimited,
You can view debug information for in-progress and failed orchestrations. and Developer Editions
Flow Details
Flow API Name: Create_Customer_Record
Type: Orchestrator
Version: 1
Status: Inactive
Org: signup.org.test.1640285093849 (00DRM000000G0SV)
534
Automate Your Business Processes Troubleshoot Orchestrations
Debug an Orchestration
You can view debug information for in-progress and failed orchestrations.
EDITIONS
How Does Debugging Work for Orchestrations? Available in: both Salesforce
Classic and Lightning
View debug details in Flow Builder for only in-progress and failed orchestrations that are activated. Experience
View debug details in error emails for failed flows.
Available in: Enterprise,
Note: When an orchestration fails, it doesn’t necessarily roll back record additions, changes, Performance, Unlimited,
or deletions that were made before the orchestration failed. As a result, we recommend that and Developer Editions
you design and debug your orchestration in a sandbox environment before deploying it to
This feature is supported in
production.
Government Cloud and
The debug information for in-progress and failed orchestrations is similar to the information displayed Government Cloud Plus.
for flow. In addition, orchestration debug details show milestones for orchestrations, stages, steps,
and work items.
Milestones
Orchestration milestones are a part of orchestration debugging details.
535
Automate Your Business Processes Troubleshoot Orchestrations
Discontinue Stage • The orchestration encountered an error after the stage was
completed.
• The orchestration encountered an error while the stage was
in progress.
Discontinue Step • The step’s stage completed while the step was in progress.
• The orchestration encountered an error after the step was
completed.
• The orchestration encountered an error while the step was in
progress.
• The step’s stage encountered an error while the step was in
progress.
536
Automate Your Business Processes Troubleshoot Orchestrations
End Work Item The assigned user completed the work item.
USER PERMISSIONS
To debug an orchestration
• Manage Flow
537
Automate Your Business Processes Orchestrator Limits and Considerations
USER PERMISSIONS
To debug an orchestration
• Manage Flow
538
Automate Your Business Processes Orchestrator Limits and Considerations
SEE ALSO:
Automate Your Business Processes : Flow Usage-Based Entitlements
Sales Productivity : Email Allocations per Edition
Platform Events Developer Guide: Platform Event Allocations
539
Automate Your Business Processes Orchestrator Reference
Orchestrator Reference
Bookmark this page for quick access to information about orchestration elements, resources, events,
EDITIONS
and more.
Available in: both Salesforce
Orchestrator Resources Classic and Lightning
Each resource represents a value that you can reference throughout the orchestration. Experience
Orchestrator Operators
In conditions and filters, operators let you evaluate information and narrow the scope of an orchestration operation.
Orchestration Version Properties
An orchestration version’s properties consist of its label and description. These values drive the field values that appear on the
orchestration’s detail page.
Orchestrator Resources
Each resource represents a value that you can reference throughout the orchestration.
EDITIONS
In Flow Builder, the Manager tab shows the resources that are available in the orchestration.
Available in: both Salesforce
You can create some resources by clicking New Resource. The system providers certain resources,
Classic and Lightning
such as global constants and global variables. Other resources are created when you add an element
Experience
to an orchestration. For example, when you add a Decision element, a resource for each decision
outcome is created. Available in: Enterprise,
Performance, Unlimited,
Resource Description Creatable from and Developer Editions
the Resources
This feature is supported in
Tab
Government Cloud and
Constant Store a fixed value that you can use throughout an Government Cloud Plus.
orchestration.
540
Automate Your Business Processes Orchestrator Reference
Text Store text that can be changed and used throughout the orchestration. To
Template format the text, use HTML tags.
541
Automate Your Business Processes Orchestrator Reference
Value The constant’s value. This value doesn’t change throughout the
orchestration.
Decimal Places Controls the number of digits to the right of the decimal point up
to 17 places. If you leave this field blank or set it to zero, only whole
numbers appear when your orchestration runs.
Available only when the data type is Number or Currency.
542
Automate Your Business Processes Orchestrator Reference
$Label References custom labels. This global variable appears only if your org has
custom labels.
The returned value depends on the language setting of the contextual user.
The value returned is one of the following, in order of precedence:
1. The local translation’s text
2. The packaged translation’s text
3. The primary label’s text
543
Automate Your Business Processes Orchestrator Reference
$Permission References information about the current user’s custom permission access.
$Profile References information from the current user’s profile, such as license type or name.
Tip:
• Use profile names to reference standard profiles in $Profile merge fields.
• Users don’t need access to their profile information to run a flow that references these merge
fields.
$Record__Prior Available only in record-triggered orchestrations that are configured to run when a record is updated or
when a record is created or updated.
The $Record__Prior global variable contains the values that the triggering record had immediately
before the orchestration started. You can’t change these values in the orchestration or with any flows
associated with its steps.
When the orchestration is triggered by a newly created record, all $Record__Prior values are null.
$Setup References custom settings of type hierarchy. This global variable appears only if your org has hierarchy
custom settings. You can access custom settings of type list only in Apex.
Hierarchical custom settings allow values at these levels.
• Organization—The default value for everyone
• Profile—Overrides the Organization value
• User—Overrides the Organization and Profile values
Salesforce determines the correct value for this custom setting field based on the running user’s current
context.
$System $System.OriginDateTime represents the literal value of 1900-01-01 00:00:00. Use this
merge field to perform date/time offset calculations.
$User References information about the user who’s running the orchestration.
Note: Most of the time, an orchestration’s running user is the automated process user. When the
running user is the automated process user, $User doesn’t provide useful information.
$User.UITheme and $User.UIThemeDisplayed identify the look and feel that the running user
sees on a Salesforce page. The difference between the two variables is that $User.UITheme returns the
look and feel the user is supposed to see, while $User.UIThemeDisplayed returns the look and feel
544
Automate Your Business Processes Orchestrator Reference
$UserRole References information about the current user’s role, such as the role name or ID.
545
Automate Your Business Processes Orchestrator Reference
$Flow.CurrentDate Text, Date, and Date when the flow interview executes the System
Date/Time element that references the global variable.
$Flow.CurrentDateTime Text, Date, and Date and time when the flow interview executes System
Date/Time the element that references the global variable.
$Flow.FaultMessage Text System fault message that can help flow System
administrators troubleshoot runtime issues.
$Flow.InterviewStartTime Text, Date, and Date and time when the flow interview started. System
Date/Time For a flow launched by a Subflow element,
$Flow.InterviewStartTime indicates
when the initial master flow started.
546
Automate Your Business Processes Orchestrator Reference
API Name Automatically populated if empty when you fill out the Label field and
press TAB.The requirement for uniqueness applies only to elements within
the current orchestration. Two elements can have the same API name,
provided they’re used in different orchestrations. An API name can include
underscores and alphanumeric characters without spaces. It must begin
with a letter and can’t end with an underscore. It also can’t have two
consecutive underscores.
Description Helps you remember what this resource does. When editing an element,
Condition Identifies the method used to determine whether a step is ready to start.
Step Name Specifies a step that must be marked complete before the current step
can start. Available when the entry condition is set to When another step
is marked Complete, the step starts.
Evaluation Specifies the flow that determines if the step can start. Available when
Flow the entry condition is set to When the specified evaluation flow returns
True, the step starts.
Interactive Steps
Interactive steps call screen flows and require user interaction.
Field Description
Label Helps you identify the element on the canvas.
API Name Automatically populated if empty when you fill out the Label field and press TAB.The requirement
for uniqueness applies only to elements within the current orchestration. Two elements can have the
same API name, provided they’re used in different orchestrations. An API name can include underscores
and alphanumeric characters without spaces. It must begin with a letter and can’t end with an
underscore. It also can’t have two consecutive underscores.
547
Automate Your Business Processes Orchestrator Reference
Field Description
Description
Helps you remember what this resource does. When editing an element, appears after you click .
Condition Identifies the method used to determine whether a step is ready to start or can be considered complete.
Step Name Specifies a step that must be marked complete before the current step can start. Available when the
entry condition is set to When another step is marked Complete, the step starts.
Evaluation Flow Specifies the flow that determines if the step can start or be marked complete. Available when the
entry condition is set to When the specified evaluation flow returns True, the step starts. Also available
when the exit condition is set toWhen the specified evaluation flow returns True, the step is marked
Complete.
Record ID Specifies the ID of the record where the Work Guide displays the screen flow to the assigned user.
Step Status
Discontinued • The step was in progress when its associated stage completed.
• The step was completed when the orchestration encountered
an error.
• The step was in progress when the orchestration encountered
an error.
• The step was in progress when its associated stage
encountered an error.
548
Automate Your Business Processes Orchestrator Reference
Text Template The text for the template. To reference information from other resources,
use merge fields.
Rich Text Control the text font, size, color, and alignment. Add HTML links, bullet
points, or numbered lists. Rich text is on by default. To change to rich text,
click .
Plain Text Send email core actions use plain text. Some custom actions from the
AppExchange or built by Salesforce developers also expect plain text. To
Data Type Determines the types of values that the variable can store. You can’t
change the data type of a previously saved variable.
The Record data type can store multiple field values for one record. The
Apex-defined data type can store multiple field values for one Apex class.
549
Automate Your Business Processes Orchestrator Reference
Field Description
Note: Looking for sObject? In Flow Builder, that data type changed to Record.
Allow multiple When selected, the resource is a collection variable. You can store a list of values in collection variables.
values (collection) Collection variables can store only values that are compatible with their data type. When the data
type is Record, the collection variable can only store values for the associated object’s records.
For example, store multiple email addresses in a collection variable, and reference the collection
variable to send an email.
Object The object whose field values you can store in the variable. You can’t change the object of a previously
saved variable.
Available only when the data type is Record.
Decimal Places Controls the number of digits to the right of the decimal point up to 17 places. If you leave this field
blank or set it to zero, only whole numbers appear when your orchestration runs.
Available only when the data type is Number or Currency.
Availability Outside When a variable is available for input, it can be set at the start of the orchestration, such as when an
the Flow orchestration is started from a Lightning page.
Warning: Disabling input or output access for an existing variable can break the functionality
of applications and pages that call the orchestration and access the variable. For example, you
can access variables from URL parameters, processes, and other flows.
This field doesn’t affect how variables are assigned or used within the same orchestration.
Default Value Determines the variable value when the orchestration starts. If you leave this field blank, the value is
null.
Not available for Picklist and Multi-Select Picklist variables.
Orchestrator Elements
Each element represents an action that the orchestration can execute. Orchestrations can contain
EDITIONS
Decision and Stage elements.
In Flow Builder, the Add Element menu shows the types of elements that you can add to the flow Available in: both Salesforce
by selecting them. For a list of all elements already added to the orchestration, see the Elements Classic and Lightning
section of the Manager tab in the Toolbox. Experience
550
Automate Your Business Processes Orchestrator Reference
Condition Determines whether the orchestration takes this outcome’s path. Sets logic and
Requirements conditions for each outcome that determine if the orchestration follows its path.
to Execute
Outcome
551
Automate Your Business Processes Orchestrator Reference
Field Description
Set Exit Determines when a stage can be considered complete.
Condition When all steps have been marked Complete, the stage is marked Complete
The stage is marked complete and the orchestration moves to the next element when every step in a
stage is marked complete.
When the specified evaluation flow returns True, the stage is marked Complete
The orchestration runs a specified evaluation flow to determine if the stage can be marked complete. The
orchestration doesn’t mark the stage complete and move to the next element until the specified evaluation
flow’s isOrchestrationConditionMet output variable returns true.
Stage Status
Completed • The stage met its exit condition, and the orchestration
completed.
• The stage completed, and the orchestration was canceled.
Canceled The stage was in progress when the orchestration was canceled.
552
Automate Your Business Processes Orchestrator Reference
Orchestrator Connectors
Connectors determine the available paths that an orchestration can take at run time. On the canvas
EDITIONS
in Flow Builder, a connector looks like an arrow that points from one element to another.
Available in: both Salesforce
Label Example Description Classic and Lightning
Unlabeled Identifies which element to execute next. Experience
Orchestrator Operators
In conditions and filters, operators let you evaluate information and narrow the scope of an
EDITIONS
orchestration operation.
Available in: both Salesforce
Orchestrator Operators in Decision Elements Classic and Lightning
Use condition operators to verify the value of a selected resource. Conditions are used in Decision Experience
elements. Available in: Enterprise,
Performance, Unlimited,
and Developer Editions
553
Automate Your Business Processes Orchestrator Reference
• Text
Apex-Defined
To determine which operators are supported, match the @AuraEnabled attribute’s Apex data type with an orchestrator data type
in this reference.
Date Date
DateTime Date/Time
Decimal Number
Double Number
Integer Number
List Collection
Long Number
String Text
Boolean
Check whether a Boolean resource’s value matches another value or resource.
Equals The value of the selected Resource matches what you enter or select for Value. Boolean
• If the running orchestration took that outcome, a decision outcome resolves to true.
• If it executed without error, a stage element resolves to true. If a fault occurred, the element
resolves to false. If the element wasn’t executed, it resolves to null.
Was Set The value for Resource is a field in a record variable, and that field has been populated with Boolean
a value at least once in a flow called by a step in the orchestration.
Was Visited The selected Resource is a Decision element in the orchestration, and it has been visited while Boolean
the orchestration is running.
Collection
Check whether a Collection resource’s value contains or matches another value or resource.
554
Automate Your Business Processes Orchestrator Reference
Does Not Equal The collection that’s selected for Resource doesn’t match Collection of the same data type.
the collection that’s selected for Value. For record collection variables, only record collection
If two record collection variables include different fields variables with the same object type are supported.
or if the fields have different values, they’re unequal.
Equals The collection that’s selected for Resource matches the Collection of the same data type.
collection that’s selected for Value. For record collection variables, only record collection
If two record collection variables include the same fields variables with the same object type are supported.
and those fields have the same values, they’re equal.
Is Null The collection that’s selected for Resource isn’t populated Boolean
with any values.
Equals The value for Resource matches what’s entered or selected for Value. • Currency
• Number
Greater Than The value for Resource is larger than what’s entered or selected for Value. • Currency
• Number
Greater Than The value for Resource is larger than what’s entered or selected for Value or is the same. • Currency
or Equal
• Number
Less Than The value for Resource is smaller than what’s entered or selected for Value. • Currency
• Number
Less Than or The value for Resource is smaller than what’s entered or selected for Value or is the same. • Currency
Equal
• Number
555
Automate Your Business Processes Orchestrator Reference
Equals The value for Resource matches what’s entered or selected for Value. • Date
• Date/Time
Greater Than The value for Resource is a later date or time than what’s entered or selected for Value. • Date
• Date/Time
Greater Than The value for Resource is a later date or time than what’s entered or selected for Value or is • Date
or Equal the same date or time.
• Date/Time
Less Than The value for Resource is an earlier date or time than what’s entered or selected for Value. • Date
• Date/Time
Less Than or The value for Resource is an earlier date or time than what’s entered or selected for Value or • Date
Equal is the same date or time.
• Date/Time
Was Set The value for Resource is a field in a record variable, and that field has been populated with Boolean
a value at least once in a flow called by a step in the orchestration.
Picklist
Check whether a Picklist resource’s value matches or contains another value or resource.
556
Automate Your Business Processes Orchestrator Reference
Does Not The value for Resource doesn’t match what’s entered or selected for Value. • Boolean
Equal
• Currency
• Date
• Date/Time
• Multi-Select
Picklist
• Number
• Picklist
• Text
Equals The value for Resource matches what’s entered or selected for Value. • Boolean
• Currency
• Date
• Date/Time
• Multi-Select
Picklist
• Number
• Picklist
• Text
Was Set The value for Resource is a field in a record variable, and that field has been populated with Boolean
a value at least once in a flow called by a step in the orchestration.
Multi-Select Picklist
Check whether a multi-select picklist resource’s value matches or contains another value or resource.
Note: These operators treat the resource’s value as a text value. If the resource’s value includes multiple items, the operators treat
the value as one string that happens to include semicolons. It doesn’t treat each selection as a different value. For example, the
operators treat red; blue; green as a single value rather than three separate values.
557
Automate Your Business Processes Orchestrator Reference
Does Not The value for Resource doesn’t match what’s entered or selected for Value. • Boolean
Equal
Note: Order matters. If you aren’t sure which order the values that you’re checking • Currency
for appear in, use the INCLUDES() function in an orchestration formula. For example, • Date
if you compare “red; blue; green” to “blue; green; red” using the Does Not Equal operator,
• Date/Time
that condition resolves to true.
• Multi-Select
Picklist
• Number
• Picklist
• Text
Equals The value for Resource exactly matches what’s entered or selected for Value. • Boolean
Note: Order matters. If you aren’t sure which order the values that you’re checking • Currency
for will appear in, use the INCLUDES() function in an orchestration formula. For example, • Date
if you compare “red; blue; green” to “blue; green; red” using the Equals operator, that
• Date/Time
condition resolves to FALSE.
• Multi-Select
Picklist
• Number
• Picklist
• Text
Was Set The value for Resource is a field in a record variable, and that field has been populated with Boolean
a value at least once in a flow called by a step in the orchestration.
Record
Check whether a record resource’s value matches another value or resource.
558
Automate Your Business Processes Orchestrator Reference
Equals The value for Resource matches what’s entered or selected for Value. Record with the same
object type
Text
Check whether a Text resource’s value matches, contains, ends with, or starts with another value or resource.
Does Not The value for Resource doesn’t match what’s entered or selected for Value. • Boolean
Equal
• Currency
• Date
• Date/Time
• Multi-Select
Picklist
• Number
• Picklist
• Text
Equals The value for Resource matches what’s entered or selected for Value. • Boolean
• Currency
• Date
• Date/Time
• Multi-Select
Picklist
• Number
559
Automate Your Business Processes Orchestrator Reference
• Picklist
• Text
Ends With The end of the value for Resource matches what’s entered or selected for Value. • Boolean
• Currency
• Date
• Date/Time
• Multi-Select
Picklist
• Number
• Picklist
• Text
Starts With The beginning of the value for Resource matches what’s entered or selected for Value. • Boolean
• Currency
• Date
• Date/Time
• Multi-Select
Picklist
• Number
• Picklist
• Text
Was Set The value for Resource is a field in a record variable, and that field has been populated with Boolean
a value at least once in a flow called by a step in the orchestration.
560
Automate Your Business Processes Workflow
Property Description
Flow API Name The API name for the orchestration. The API name is used to differentiate this orchestration from
other parts of Salesforce, such as in a URL or Lightning web component. An API name can include
underscores and alphanumeric characters without spaces. It must begin with a letter and can’t end
with an underscore. It also can’t have two consecutive underscores. The API name appears on the
orchestration detail page.
You can’t edit the API name after saving the orchestration.
Description Differentiates the orchestration version from other versions. The description appears in the
orchestration detail page and list views.
You can edit the description for inactive orchestrations and orchestration versions.
Workflow
Workflow lets you automate standard internal procedures and processes to save time across your
EDITIONS
org. A workflow rule is the main container for a set of workflow instructions. These instructions can
always be summed up in an if/then statement. Available in: Lightning
For example: If it’s raining, then bring an umbrella. Experience and Salesforce
Classic
Tip: Whenever possible, automate your if/then statements with Process Builder instead of
workflow rules. Available in: Enterprise,
Performance, Unlimited,
Workflow rules can be broken into two main components. and Developer Editions
1. Criteria: the “if” part of the “if/then” statement. In other words, what must be true of the record
for the workflow rule to execute the associated actions.
2. Actions: the “then” part of the “if/then” statement. In other words, what to do when the record meets the criteria.
In the raining example, the criteria is “it’s raining” and the action is “bring an umbrella”. If the criteria isn’t met (it isn’t raining), then the
action isn’t executed (you don’t bring an umbrella).
When a record meets all the criteria for a workflow rule, that rule’s actions are executed. Familiarize yourself with the automated actions
that are available for workflow.
561
Automate Your Business Processes Create a Workflow Rule
Workflow Terminology
The following terms are used when describing workflow features and functionality.
SEE ALSO:
Which Automation Tool Do I Use?
SEE ALSO:
Workflow Considerations
Workflow Rule Examples
562
Automate Your Business Processes Create a Workflow Rule
created, and every Evaluate the rule criteria each time a record is created or
time it’s edited updated. If the rule criteria is met, run the rule.
With this option, the rule repeatedly runs every time a record
is edited as long as the record meets the rule criteria.
created, and any (Default) Evaluate the rule criteria each time a record is created
time it’s edited or updated.
to subsequently • For a new record, run the rule if the rule criteria is met.
meet criteria
• For an updated record, run the rule only if the record is
changed from not meeting the rule criteria to meeting the
rule criteria.
With this option, the rule can run multiple times per record,
but it won’t run when the record edits are unrelated to the rule
criteria.
For example, suppose that for an opportunity record to meet
the rule criteria, the opportunity probability must be greater
than 50%. If you create an opportunity with a probability of
75%, the workflow rule runs. If you edit that opportunity by
changing the probability to 25%, the edit doesn't cause the
rule to run. If you then edit that opportunity by changing the
probability from 25% to 75%, the edit causes the rule to run.
With this last edit, the rule runs, because the record is changed
from not meeting the rule criteria to meeting the rule criteria.
563
Automate Your Business Processes Create a Workflow Rule
Tip: You can use merge fields for directly related objects in workflow rule formulas.
SEE ALSO:
Workflow Considerations
564
Automate Your Business Processes Create a Workflow Rule
To create or change
workflow rules and actions:
• Customize Application
If you plan on configuring workflow rules that have time-dependent actions, specify a default Available in: Enterprise,
workflow user. Salesforce associates the default workflow user with a workflow rule if the user who Performance, Unlimited,
initiated the rule is no longer active. and Developer Editions
1. Open a workflow rule.
2. In the Time-Dependent Workflow Actions section, click Add Time Trigger. USER PERMISSIONS
3. Specify a number of days or hours before or after a date that’s relevant to the record, such as the date the record was created.
If the workflow rule is still active and valid when this time occurs, the time trigger fires the workflow action.
565
Automate Your Business Processes Create a Workflow Rule
7. Click Done.
SEE ALSO:
Add Automated Actions to Your Workflow Rule
Considerations for Time-Dependent Actions and Time Triggers
SEE ALSO:
Daily Allocations for Email Alerts
566
Automate Your Business Processes Create a Workflow Rule
6. Select the actions in the Available Actions box and use the right arrow to move them to the Selected Actions box. If necessary,
select the left arrow to remove actions from the Available Actions box.
7. Save your changes.
To associate existing workflow actions with an approval process:
1. From Setup, enter Approval Processes in the Quick Find box, then select Approval Processes.
2. Click the name of an approval process.
3. Depending on when you want the action to occur, do one of the following:
• Click Add Existing in the Initial Submission Actions, Final Approval Actions, Final Rejection Actions, or Recall Actions section.
• Click Show Actions in the Approval Steps section, then click Add Existing in the Approval, Rejection, or Recall Actions section.
See Add an Existing Automated Action to Your Approval Process on page 600.
4. Select the type of action you want to associate with the approval process. The Available Actions box lists all existing actions of the
selected type.
5. Enter the name of a specific action in the text field and click Find.
6. Select the actions in the Available Actions box that you want to associate with the approval process, and use the right arrow to
move the actions to the Selected Actions box. If necessary, select the left arrow to remove actions from the Available Actions
box.
7. Save your changes.
SEE ALSO:
Manage Automated Actions in Workflow Rules
SEE ALSO:
Set the Criteria for Your Workflow Rule
567
Automate Your Business Processes Workflow Limits
Workflow Limits
Salesforce limits the number of total and active rules in your org, the number of time triggers and
EDITIONS
actions per rule. It also processes a limited number of daily emails and hourly time triggers.
Available in: Lightning
Per-Org Limit Value Experience and Salesforce
Total rules across objects Classic
1
The immediate actions and each time trigger can have:
• 10 email alerts
• 10 tasks
• 10 field updates
• 10 outbound messages
568
Automate Your Business Processes Workflow Limits
2
• 10 flow triggers
2
The pilot program for flow trigger workflow actions is closed. If you've already enabled the pilot in your org, you can continue to create
and edit flow trigger workflow actions. If you didn't enable the pilot in your org, use Flow Builder to create a record-triggered flow, or
use Process Builder to launch a flow from a process.
569
Automate Your Business Processes Workflow Considerations
When workflow email alerts approach or exceed certain allocations, Salesforce sends a warning email to the default workflow user or—if
the default workflow user isn't set—to an active system administrator.
The org reaches 90% of the allocation of One warning email The allocation and the org's usage
emails per day
The org reaches 90% of the allocation of One warning email The allocation and the org's usage
workflow emails per day
An email alert isn't sent because the org A warning email after every 100 attempted The allocation and the org's usage
reaches the allocation of emails per day email alerts over the allocation
An email alert isn't sent because the org A warning email after every 100 attempted The allocation and the org's usage
reaches the allocation of workflow emails email alerts over the allocation
per day
The org reaches the daily allocation for One warning email The allocation and the org that exceeded
single emails sent to external email address the allocation
Workflow Considerations
Learn the intricacies of workflow rules and workflow actions before you begin working with them.
EDITIONS
Tip: Whenever possible, automate your if/then statements with Process Builder instead of
workflow rules. Available in: Lightning
Experience and Salesforce
• Each workflow rule applies to a single object. Classic
• If you have workflow rules on converted leads and want to use cross-object field updates on
Available in: Enterprise,
the resulting accounts and opportunities, you must enable the lead setting Require
Performance, Unlimited,
Validation for Converted Leads.
and Developer Editions
• Workflow rules on custom objects are automatically deleted if the custom object is deleted.
• The order that individual actions and types of actions are executed in is not guaranteed. Field
update actions are executed first, followed by other actions.
• To create workflow rules that update case fields based on new case comments or incoming email messages, choose Case Comment
or Email Message from the Select Object dropdown list. Email Message is only available if Email-to-Case or On-Demand
Email-to-Case is enabled. You can only create email message workflow rules for field updates, and case comment workflow rules
for field updates, email alerts, and outbound messages. For example, you can create a workflow rule so that an email marked as Is
Incoming changes its case's Status from Closed to New.
• Changes you make to records while using Connect Offline are evaluated by workflow rules when you synchronize.
• Salesforce processes rules in the following order:
1. Validation rules
2. Assignment rules
3. Auto-response rules
570
Automate Your Business Processes Workflow Considerations
• If a lookup field references a record that is deleted, Salesforce clears the value of the lookup field by default. Or you can choose to
prevent record deletions if they’re in a lookup relationship.
• If you create workflow rules to replace any Apex triggers, make sure to delete those Apex triggers when you activate the equivalent
workflow rules. Otherwise, Apex triggers and workflow rules both fire and cause unexpected results, such as overwritten field updates
or redundant email messages.
• When an Account record’s owner field is changed, processes and workflows defined on the child object do not get triggered to run.
• If you use record types in your workflow rule criteria whose labels have been translated using the translation workbench, the translated
label value doesn’t trigger the workflow rule. Workflow criteria evaluate the primary label value and ignore the translated value. To
avoid this problem, set the workflow criteria to evaluate the master record type label value by entering it manually in the Value
field.
• Campaign statistic fields, such as individual campaign statistics and campaign hierarchy statistics, can’t trigger workflow rules.
• A workflow rule isn't triggered if its condition references a field that doesn't have a value. For example, if a User-based workflow rule
checks “Role not equal to CEO”, the rule isn’t triggered for a user without an assigned role. Instead of conditions, use a formula to
check that the field is either null or set to something other than “CEO”:
UserRoleId == null || UserRole.Name != "CEO"
571
Automate Your Business Processes Workflow Considerations
– Converting state, country, and territory data from the State and Country/Territory Picklists page in Setup
– Changing state and country/territory picklists using AddressSettings in the Metadata API
Tip: Use the Developer Console to debug workflow rules. The Developer Console lets you view debug log details and information
about workflow rules and actions. For example, you can view the name of the user who triggered the workflow rule and the name
and ID of the record being evaluated.
SEE ALSO:
Set the Criteria for Your Workflow Rule
572
Automate Your Business Processes Workflow Considerations
SEE ALSO:
Workflow Considerations
• Apex triggers that fire as a result of time-dependent actions may get executed in a single batch or independently. Follow these best
practices:
– In case they fire independently–Ensure that your Apex logic is scoped for a single scheduled action. For example, don't use Apex
static variables to communicate state across Apex code triggered by different scheduled actions.
– In case they fire in a single batch–Be aware of how the combination of your time-dependent actions and Apex triggers impact
your Apex governor limits.
• Salesforce evaluates time-based workflow on the organization’s time zone, not the user’s. Users in different time zones might see
differences in behavior.
• Salesforce doesn’t necessarily execute time triggers in the order they appear on the workflow rule detail page. Workflow rules list
time triggers that use the Before field first, followed by time triggers that use the After field.
• Salesforce doesn't display time-dependent action controls on the workflow rule edit page if you set the workflow rule evaluation
criteria to Evaluate the rule when created, and every time it’s edited.
573
Automate Your Business Processes Workflow Considerations
• If you change a date field that is referenced by an unfired time trigger in a workflow rule that has been evaluated, Salesforce recalculates
the unfired time triggers associated with the rule. For example, if a workflow rule is scheduled to alert the opportunity owner 7 days
before the opportunity close date and the close date is set to 2/20/2011, Salesforce sends the alert on 2/13/2011. If the close date
is updated to 2/10/2011 and the time trigger hasn't fired, Salesforce reschedules the alert for 2/3/2011. If Salesforce recalculates the
time triggers to a date in the past, Salesforce triggers the associated actions shortly after you save the record.
• If a workflow rule has a time trigger set for a time in the past, Salesforce queues the associated time-dependent actions to start
executing within one hour. For example, if a workflow rule on opportunities is configured to update a field 7 days before the close
date, and you create an opportunity record with the close date set to today, Salesforce starts to process the field update within an
hour after you create the opportunity.
• Time-dependent actions remain in the workflow queue only as long as the workflow rule criteria are still valid. If a record no longer
matches the rule criteria, Salesforce removes the time-dependent actions queued for that record.
For example, an opportunity workflow rule can specify:
– A criteria set to “Opportunity: Status not equals to Closed Won, Closed Lost”
– An associated time-dependent action with a time trigger set to 7 days before the opportunity close date
If a record that matches the criteria is created on July 1 and the Close Date is set to July 30, the time-dependent action is
scheduled for July 23. However, if the opportunity is set to “Closed Won” or “Closed Lost” before July 23, the time-dependent action
is removed from the queue.
• Configuring a task’s Due Date to “Rule Trigger Date” sets time triggers and workflow task due dates based on the date that the
workflow time trigger’s action is executed. For example, if the task due date is “Rule Trigger Date plus 10 days” and the time trigger
is executed on January 1, Salesforce sets the task due date to January 11.
• You can add a new active workflow rule with time triggers in a change set and deploy it. You can only change time triggers on a
workflow rule in a change set if it's inactive. The rule must be activated in the destination organization manually or through another
change set that only activates workflow rules and makes no time trigger changes.
574
Automate Your Business Processes Workflow Considerations
For example, let’s say you have an inactive workflow rule in your destination organization, and your change set contains an active
workflow rule with the same name and new or different time triggers. The deployment fails because it activates the workflow rule
first and then tries to add or remove the time triggers.
Note: You must add time-dependent actions manually when including a workflow rule in a change set. The View/Add
Dependencies function doesn’t detect time-dependent actions.
Limitations
• Time triggers don’t support minutes or seconds.
• Time triggers can’t reference the following:
– DATE or DATETIME fields containing automatically derived functions, such as TODAY or NOW.
– Formula fields that include related-object merge fields.
• Salesforce limits the number of time triggers an organization can execute per hour. If an organization exceeds the limits for its Edition,
Salesforce defers the execution of the additional time triggers to the next hour. For example, if an Unlimited Edition organization
has 1,200 time triggers scheduled to execute between 4:00 PM and 5:00 PM, Salesforce processes 1,000 time triggers between 4:00
PM and 5:00 PM and the remaining 200 time triggers between 5:00 PM and 6:00 PM.
• You can't archive a product or price book that has pending actions.
• If time-based workflow actions exist in the queue, you can’t add or remove time triggers or edit trigger dates without deleting the
actions first. Because the deleted records can’t be restored, carefully consider the implications of editing the workflow rules before
you proceed. If you decide to edit the workflow rules, deactivate the workflow that you want to edit, edit the rules as needed, and
then save your changes. For information about finding and deleting time-based workflow actions in the queue, see Monitor Pending
Workflow Actions on page 585.
You also can’t add or remove time triggers if:
– The workflow rule is active.
– The workflow rule is deactivated, but has pending actions in the queue.
– The workflow rule evaluation criteria is set to Evaluate the rule when a record is: created, and
every time it’s edited.
– The workflow rule is included in a package.
SEE ALSO:
Add Automated Actions to Your Workflow Rule
Identify Your Salesforce Org’s Default Workflow User
575
Automate Your Business Processes Workflow Rule Examples
Important: Where possible, we changed noninclusive terms to align with our company Available in: Lightning
value of Equality. We maintained certain terms to avoid any effect on customer Experience and Salesforce
Classic
implementations.
Business Processes Available in: Enterprise,
Follow Up Before Contract Expires Performance, Unlimited,
and Developer Editions
Follow Up when Platinum Contract Case Closes
Assign Credit Check for New Customer
Notify Account Owner About New, High-Priority Cases
Set a Default Entitlement for Each New Case
Update Shipment Status if Shipment is Delayed
Automatically Activate New Users
Cross-Object Processes
Notify Sales VP About Cases Filed for Top Accounts
Set Default Opportunity Name
Set Target Resolution Date for Cases
Update Application Record when Candidate Accepts Job
Deal Management
Track Closed Opportunities
Override Default Opportunity Close Date
Report Lost Opportunities
Report Unassigned Leads
Send Alert if Quote Line Item Discount Exceeds 40%
Notifications
Notify Key People About Account Owner Changes
Set Reminder for Contact Birthday
Set Reminder for High-Value Opportunity Close Date
Notify Account Owner of Updates by Others
Object Contract
Description Email a reminder to the renewal manager 20 days before a contract’s end date.
Evaluation Criteria Evaluate the rule when a record is: created, and any time it’s edited to subsequently meet criteria
576
Automate Your Business Processes Workflow Rule Examples
Rule Criteria (Filter) Run this rule if the following criteria is met.
(Contract: Status equals Activated)
Time-Dependent Actions 20 Days Before Contract: End Date—Email Alert: Email a reminder to the renewal manager to
confirm whether the client wants an extension.
Object Case
Description If the customer has a platinum contract agreement, email a feedback request to the case contact 7 days
after a high-priority case has been closed.
Evaluation Criteria Evaluate the rule when a record is: created, and any time it’s edited to subsequently meet criteria
Rule Criteria (Filter) Run this rule if the following criteria are met.
(Case: Priority equals High) and
(Case: Closed equals True) and
(Case: Contract Type equals Platinum)
Time-Dependent Actions 7 Days After Case: Date/Time Closed—Email Alert: Email a feedback request to the case contact.
Object Opportunity
Description Assign the Accounts Receivable (AR) department a task to check the credit of a potential customer 15
days before the opportunity close date if the amount is greater than $50,000.
Evaluation Criteria Evaluate the rule when a record is: created, and any time it’s edited to subsequently meet criteria
Rule Criteria (Filter) Run this rule if the following criteria are met.
(Opportunity: Amount greater than 50000) and
(Opportunity: Closed equals False) and
(Opportunity: New Customer equals True)
Time-Dependent Actions 15 Days Before Opportunity: Close Date—Task: Create a task for users in the Accounts Receivable role
to run a credit check.
577
Automate Your Business Processes Workflow Rule Examples
Object Case
Description Notify the account owner when a high-priority case is created for accounts with a platinum SLA.
Rule Criteria (Filter) Run this rule if the following criteria are met.
(Case: Priority equals High) and
(Account: SLA equals Platinum)
Immediate Actions Email Alert: Email the details of the high-priority case to the account owner.
Object Case
Rule Criteria (Filter) Run this rule if the following criteria is met.
(Case: Status not equal to Closed)
Immediate Actions Flow Trigger: Look up and assign the relevant entitlement to the case. Pass the account, asset,
or contact associated with the new case into the relevant flow variable to enable the entitlement lookup.
Pass the case ID into the relevant flow variable to enable the case update.
Object Shipment
Description Update the Shipment Status field to Delayed if a shipment has exceeded the expected delivery
date and hasn’t reached the customer.
Evaluation Criteria Evaluate the rule when a record is: created, and any time it’s edited to subsequently meet criteria
578
Automate Your Business Processes Workflow Rule Examples
Rule Criteria (Filter) Run this rule if the following criteria is met.
(Shipment: Status not equal to Delivered)
Time-Dependent Actions 1 day after Shipment: Expected Delivery Date—Field Update: Change Shipment Status
field to Delayed on Shipment record.
Object User
Description Make sure that each new user is active so that the user can log in to Salesforce.
Rule Criteria (Filter) Run this rule if the following criteria is met.
(User: Active equals False)
Object Case
Rule Criteria (Filter) Run this rule if the following criteria are met.
AND(Account.AnnualRevenue > 500000, Account.NumberOfEmployees > 5000)
Immediate Actions Email Alert: Notify VP about cases for large accounts.
Object Opportunity
579
Automate Your Business Processes Workflow Rule Examples
Evaluation Criteria Evaluate the rule when a record is: created, and every time it’s edited
Rule Criteria (Filter) Run this rule if the following criteria is met.
NOT(CONTAINS( Name, Account.Name ))
Immediate Actions Field Update: Set opportunity name to the following formula.
Object Case
Description Set the case target resolution date for accounts that have basic support level to 30 days from today.
Rule Criteria (Filter) Run this rule if the following formula is true.
ISPICKVAL(Account.Support_Level__c , "Basic")
Immediate Actions Field Update: Set the Target Resolution Date to Today() + 30.
Object Case
Description Set the case target resolution date for accounts that have standard support level to 14 days from today.
Rule Criteria (Filter) Run this rule if the following formula is true.
ISPICKVAL(Account.Support_Level__c , "Standard")
Immediate Actions Field Update: Set the Target Resolution Date to Today() + 14.
580
Automate Your Business Processes Workflow Rule Examples
Object Case
Description Set the case target resolution date for accounts that have premium support level to 5 days from today.
Rule Criteria (Filter) Run this rule if the following formula is true.
ISPICKVAL(Account.Support_Level__c , "Premium")
Immediate Actions Field Update: Set the Target Resolution Date to Today() + 5.
Object Candidate
Description Change the Application Status field to Closed for the custom Application object when the
Candidate Status field for the custom Candidate object changes to Accepted.
Evaluation Criteria Evaluate the rule when a record is: created, and any time it’s edited to subsequently meet criteria
Rule Criteria (Filter) Run this rule if the following criteria is met.
(Candidate: Status equals Accepted)
Immediate Actions Field Update: Change the Application Status field to Closed on parent Application
record.
Note: For information on record types, see Tailor Business Processes to Different Users Using Record Types.
Object Opportunity
Evaluation Criteria Evaluate the rule when a record is: created, and every time it’s edited
Rule Criteria (Filter) Run this rule if the following criteria are met.
(Opportunity: Closed equals True) and
(Opportunity: Stage equals Closed Won)
581
Automate Your Business Processes Workflow Rule Examples
Immediate Actions Field Update: Set the record type to Closed Opportunities.
Object Opportunity
Description Override the default close date from the close of the quarter to 6 months after the opportunity is created.
Rule Criteria (Filter) Run this rule if the following criteria is met.
(Opportunity: Closed equals False)
Immediate Actions Field Update: Use the following formula to set the opportunity close date to 6 months after the
creation date.
DATE( YEAR(TODAY()) , (MONTH(TODAY()) + 6), DAY(TODAY()))
Object Opportunity
Description Notify the VP of sales when a deal is lost if the stage was Proposal/Price Quote and the amount was
greater than $1 million.
Evaluation Criteria Evaluate the rule when a record is: created, and every time it’s edited
Rule Criteria (Filter) Run this rule if the following formula is true.
AND( ISCHANGED(StageName), ISPICKVAL(PRIORVALUE(StageName) ,
"Proposal/Price Quote"), ISPICKVAL(StageName,"Closed Lost"), (Amount
>1000000))
Immediate Actions Email Alert: Notify the VP of sales role that the deal was lost.
Object Lead
Description Ensure that unassigned leads are tracked in a timely manner by notifying the manager if a lead is not
accepted in 2 days.
582
Automate Your Business Processes Workflow Rule Examples
Evaluation Criteria Evaluate the rule when a record is: created, and any time it’s edited to subsequently meet criteria
Rule Criteria (Filter) Run this rule if the following criteria is met.
Lead Owner equals Unassigned Lead Queue
Time-Dependent Actions 2 Days After Lead: Last Modified Date—Email Alert: Notify the manager role that the queue has
unassigned leads that are older than 2 days.
Description Ensure that an email alert is sent if a sales rep applies a quote line item discount that exceeds 40%.
Evaluation Criteria Evaluate the rule when a record is: created, and any time it’s edited to subsequently meet criteria
Rule Criteria (Filter) Run this rule if the following criteria is met.
Quote Line Item: Discount is greater than 40
Immediate Actions Email Alert: Notify the manager role that the quote line item discount exceeds 40%.
Object Account
Description Notify key people in the sales department when the owner of an account changes if the account’s annual
revenue is greater than $1 million.
Evaluation Criteria Evaluate the rule when a record is: created, and every time it’s edited
Rule Criteria (Filter) Run this rule if the following formula is true.
AND( ISCHANGED(OwnerId), AnnualRevenue > 1000000 )
Immediate Actions Email Alert: Notify the person in the sales operations role of the change in account ownership.
583
Automate Your Business Processes Workflow Rule Examples
Object Contact
Description Send an email to the contact 2 days before the contact’s birthday.
Rule Criteria (Filter) Run this rule if the following formula is true.
(Contact: Birthdate not equal to null) and
(Contact: Email not equal to null)
Time-Dependent Actions 2 Days Before Contact: Next Birthday—Email Alert: Send a birthday greeting to the contact’s
email address.
Object Opportunity
Description Remind the opportunity owner and senior management when the close date is approaching for an
opportunity that has an amount greater than $100,000. Create a follow-up task for the opportunity owner
if the deal is still open when the close date passes.
Evaluation Criteria Evaluate the rule when a record is: created, and any time it’s edited to subsequently meet criteria
Rule Criteria (Filter) Run this rule if the following criteria are met.
(Opportunity: Amount greater than 100000) and
(Opportunity: Closed equals False)
Time-Dependent Actions • 30 Days Before Opportunity: Close Date—Email Alert: Notify the opportunity owner that 30
days remain.
• 15 Days Before Opportunity: Close Date—Email Alert: Notify the opportunity owner that 15
days remain.
• 5 Days After Opportunity: Close Date—Task: Create a follow-up task for the opportunity owner
to update the deal. Email Alert: Notify senior management to involve executives.
Object Account
Description Notify the account owner when someone else updates the account if the account’s annual revenue is
greater than $1 million.
584
Automate Your Business Processes Monitor Pending Workflow Actions
Evaluation Criteria Evaluate the rule when a record is: created, and every time it’s edited
Rule Criteria (Filter) Run this rule if the following formula is true.
AND( (LastModifiedById <> OwnerId), (AnnualRevenue > 1000000) )
Immediate Actions Email Alert: Notify the account owner that someone else has updated the account.
SEE ALSO:
Workflow
Set the Criteria for Your Workflow Rule
1. Select the box next to the pending actions you want to cancel.
2. Click Delete.
585
Automate Your Business Processes Workflow Terminology
Workflow Terminology
The following terms are used when describing workflow features and functionality.
EDITIONS
Workflow Rule
A workflow rule sets workflow actions into motion when its designated conditions are met. Available in: both Lightning
You can configure workflow actions to execute immediately when a record meets the conditions Experience and Salesforce
in your workflow rule, or set time triggers that execute the workflow actions on a specific day. Classic
If a workflow action hasn’t executed yet, you can view and modify it in the workflow queue. Flow triggers are available
Workflow Action in: Salesforce Classic
A workflow action, such as an email alert, field update, outbound message, or task, fires when
the conditions of a workflow rule are met. Available in: Enterprise,
Performance, Unlimited,
Email Alert and Developer Editions
Email alerts are actions that send emails, using a specified email template, to specified recipients.
Outbound messages
Workflow alerts can be sent to any user or contact, as long as they have a valid email address.
available in: Professional,
Field Update Enterprise, Performance,
A field update is an action that automatically updates a field with a new value. Unlimited, and Developer
Editions
Flow
A flow is an application that can execute logic, interact with the Salesforce database, call Apex Email alerts are available in:
classes, and collect data from users. You can build flows by using Flow Builder. Essentials, Professional,
Enterprise, Performance,
Flow Trigger
Unlimited, and Developer
A flow trigger is a workflow action that launches a flow. With flow triggers, you can automate Editions
complex business processes—create flows to perform logic, and have events trigger the flows
via workflow rules—without writing code.
The pilot program for flow trigger workflow actions is closed. If you've already enabled the pilot in your org, you can continue to
create and edit flow trigger workflow actions. If you didn't enable the pilot in your org, use Flow Builder to create a record-triggered
flow, or use Process Builder to launch a flow from a process.
Outbound Message
An outbound message sends information to a designated endpoint, like an external service. Outbound messages are configured
from Setup. You must configure the external endpoint and create a listener for the messages using the SOAP API.
Approvals
It’s likely that you’re familiar with process automation in the form of workflow rules. Approvals take
EDITIONS
automation one step further, letting you specify a sequence of steps that are required to approve
a record. Available in: both Salesforce
An approval process automates how records are approved in Salesforce. An approval process Classic and Lightning
specifies each step of approval, including from whom to request approval and what to do at each Experience
point of the process.
Available in: Enterprise,
Example: Your org has a three-tier process for approving expenses. This approval process Performance, Unlimited,
automatically assigns each request to right person in your org, based on the amount requested. and Developer Editions
If an expense record is submitted for approval, lock the record so that users cannot edit it and
change the status to Submitted.
586
Automate Your Business Processes Set Up an Approval Process
If the amount is $50 or less, approve the request. If the amount is greater than $50, send an approval request to the direct manager.
If the amount is greater than $5,000 and the first approval request is approved, send an approval request to the vice president.
If all approval requests are approved, change the status to Approved and unlock the record. If any approval requests are rejected,
change the status to Rejected and unlock the record.
2. Choose the Right Wizard to Create an Approval Process Available in: Enterprise,
Before you create an approval process, determine which wizard is best for your needs. Performance, Unlimited,
and Developer Editions
3. Add an Approval Step to an Approval Process
Approval steps define the chain of approval for a particular approval process. Each step
determines which records can advance to that step, who to assign approval requests to, and USER PERMISSIONS
whether to let each approver’s delegate respond to the requests. The first step specifies what
To create approval
to do if a record doesn’t advance to that step. Later steps specify what happens if an approver processes:
rejects the request. • Customize Application
4. Add Automated Actions to an Approval Process
You can associate actions to approval steps, initial submission, final approval, final rejection, or
recall. Approval processes support four automated actions.
587
Automate Your Business Processes Set Up an Approval Process
SEE ALSO:
Approval Process Terminology
Sample Approval Processes
Prepare Your Org for Approvals
588
Automate Your Business Processes Set Up an Approval Process
• A user listed in the Manager standard field on the submitter’s user detail page.
• A user listed in a custom hierarchy field on the submitter’s user detail page.
• Any combination of users and related users (users listed in a standard or custom field on the submitted record) specified by the
administrator.
Do you want approval requests delegated to another user for approval?
An approver can designate a delegate to approve requests, but you can disable this option. To assign delegates, for each user,
populate the Delegated Approver field on the user’s detail page.
Note: Internal Salesforce users are listed by and can be added using the Delegated Approver lookup field. Use Data Loader
and a comma-delineated (CSV) file to add users with communities licenses as Delegated Approvers. The CSV uses the
CommunityUserId rather than the UserId for DelegatedApproverId. Communities licenses are used with
Experience Cloud sites and legacy portals.
Which records are included in this process?
Determine what attributes a record must have to be included in your approval process. If necessary, create the custom fields to store
this information so that you can use it in your filter criteria. For example, if you want to include expense records from your headquarters
office only, create a custom picklist field called Office Location that has two options: “HQ” and “Field.” Then, you would
specify in your filter criteria that records must have “HQ” in the Office Location field to be included in the approval process.
What happens when a record is first submitted for approval?
When users submit a record for approval, Salesforce automatically locks the record so that other users cannot change it while it is
awaiting approval. You can still add campaign members to campaigns locked for approval.
Decide if you want other workflow actions to happen when a record is first submitted, such as email alerts, tasks, field updates, and
outbound messages. These actions become your initial submission actions.
Can users approve requests from a mobile device?
Determine if you want to require users to log in to Salesforce to approve requests. You can also set up your approval process to allow
users to approve requests remotely using a mobile browser.
Who can edit records that are awaiting approval?
Records submitted for approval are locked. Users with the “Modify All” object-level permission for the given object or the “Modify
All Data” permission can always unlock a record and edit it. You can also specify that the currently assigned approver can edit the
record. You can still add campaign members to campaigns locked for approval.
Can records be automatically approved, rejected, or skipped based on certain criteria?
You can set entry criteria for each step of your process. Configure Salesforce to approve, reject, or skip the process if a record doesn’t
meet the criteria. For example, all expenses submitted with an Amount less than $15 are automatically approved.
How many people have to approve these requests?
An approval process can have several layers of approvals. Determine how many users have to approve requests and in what order.
What happens when a request is approved or rejected?
When a request is recalled, approved, or rejected, Salesforce can perform up to 10 instances of each of the following types of
actions—up to 40 actions total. You can also configure up to 40 actions to occur when a record has received all necessary approvals
or is rejected.
SEE ALSO:
Set Up an Approval Process
Limits and Considerations for Approvals
Sample Approval Processes
589
Automate Your Business Processes Set Up an Approval Process
Create an Approval Process with the Jump Start Wizard Available in: both Salesforce
For approval processes that use a single step, use the jump start wizard. This wizard chooses Classic and Lightning
some default options for you. Experience
Default Selections for the Approval Process Jump Start Wizard Available in: Enterprise,
To make it easier for you to get started with a simple approval process, the jump start wizard Performance, Unlimited,
automatically chooses some default options for you. and Developer Editions
SEE ALSO:
Set Up an Approval Process
SEE ALSO:
Default Selections for the Approval Process Jump Start Wizard
Considerations for Configuring Approvals
Considerations for Setting Approvers
Set Up an Approval Process
Choose the Right Wizard to Create an Approval Process
590
Automate Your Business Processes Set Up an Approval Process
• To edit records awaiting approval in the approval process, users must have the “Modify All” Available in: Enterprise,
permission for the given object or the Modify All Data permission. Performance, Unlimited,
• The page layout for the approval request includes the record name (or number), owner, date and Developer Editions
created, and approval history.
• The security settings require approvers to log in to Salesforce to view the approval page.
• Only the owner of the record can submit the record for approval.
• Records are locked when submitted for approval.
• Records remain locked until approved or rejected.
• Rejected records are unlocked.
• Only admins can recall a record after it’s submitted.
• There are no auto-approve or auto-reject actions.
• No email notification is sent upon approval or rejection.
• No field values are automatically updated during the approval process.
• An approver cannot automatically delegate another user to approve the approval requests.
• The Allow submitters to recall approval requests option is not selected.
SEE ALSO:
Create an Approval Process with the Jump Start Wizard
Choose the Right Wizard to Create an Approval Process
591
Automate Your Business Processes Set Up an Approval Process
SEE ALSO:
Set Up an Approval Process
Limits and Considerations for Approvals
Example: This filter lets an expense report enter this approval process only if the employee who submitted the report is located
at headquarters.
This formula lets a record enter this approval process only if its discount approval cutoff date is less than 30 days away.
(Discount_Approval_CutoffDate__c < (CloseDate - 30)
SEE ALSO:
Considerations for Configuring Approvals
Formula Operators and Functions by Context
592
Automate Your Business Processes Set Up an Approval Process
Note: If email approval response is enabled, be sure that the email template you use describes how to correctly use both response
options: clicking the link and replying by email. If the user doesn’t respond correctly (for example, if the user misspells approve
or types it on the wrong line), Salesforce doesn’t register the user’s response.
SEE ALSO:
Chatter Post Templates for Approval Requests
Email Templates in Salesforce Classic
Merge Fields for Approvals
Field Approval requests are assigned to an approver from the specified field.
You can select only a hierarchical relationship field, such as Manager.
593
Automate Your Business Processes Set Up an Approval Process
Option Description
Use Approver Field of Available only when Field is selected.
Object Owner If selected, the first executed approval step sets the approver to the value of Field on the record
owner’s user record—instead of the submitter’s user record.
All remaining steps use Field in the user record of the preceding step’s approver.
Example: If you select the Manager field, you can configure any step in this process to route approval requests to the submitting
user’s manager.
If you select Use Approver Field of Object Owner, the first step that isn’t skipped is routed to the owner’s manager. All other
steps are routed to the previous approver’s manager.
SEE ALSO:
Custom Field Types
Considerations for Setting Approvers
Administrators OR... Lets the assigned approver and admins edit the record.
Note:
• Even when a campaign is locked for approval, users can add campaign members to it.
• In Lightning Experience, you can't unlock Knowledge articles during an approval process.
594
Automate Your Business Processes Set Up an Approval Process
Security Settings Controls whether users have to log in to Salesforce to see the approval
request.
Allow approvers to access the approval page only from within the
application (Recommended)
Default. Users log in to Salesforce to view the approval page.
Allow approvers to access the approval page only from within the
application, or externally from a wireless-enabled mobile device
Users can access an external version of the approval page from a
browser, including browsers on mobile devices, without logging in to
Salesforce. If selected, you can’t add approval steps that let users
manually select the next approver.
Add the Submit for Approval When selected, Salesforce adds the Submit for Approval button to the Standard Buttons and Approval
button and Approval History History related list to the Related Lists for all page layouts for the object.
related list to all Object This setting is available only when you create an approval process. If the Standard Buttons for a layout
page layouts haven’t been customized before, the Submit for Approval button isn’t added.
595
Automate Your Business Processes Set Up an Approval Process
Submission Settings
Allow submitters to recall If selected, submitters can recall their approval requests. If unselected, only admins can recall requests.
approval requests This option is useful for situations where things can change on the submitter’s side while waiting for
an approval. For example, an opportunity could be lost after the user submits it for approval.
From the approval process, click New Approval Step, and follow the wizard. Available in: Enterprise,
Steps are executed in the order specified. Performance, Unlimited,
and Developer Editions
SEE ALSO:
Set Up an Approval Process
Enable Email Approval Response
Criteria Options
If all records go through this approval step, leave All records should enter this step selected.
596
Automate Your Business Processes Set Up an Approval Process
If only certain types of records are supposed to enter this process, select Enter this step if the following... and choose the appropriate
option (1). For details on the options, see Control Which Records Apply to an Approval Process.
Note: You can’t change your selection after the approval process has been activated, even if you deactivate the approval process.
Option Description
approve record Approves the request and performs all final approval actions.
reject record Rejects the request and performs all final rejection actions. This option is available only for the first step
in the approval process.
go to next step Skips this step and goes to the next step. Available only when there’s a later step.
When you apply this option in the first step, keep in mind:
• If the record doesn’t meet the criteria for any subsequent steps, the record is rejected.
• If you delete all later steps, Salesforce rejects the record.
When you apply this option in another step, keep in mind:
• If you delete all later steps, Salesforce ends the process.
SEE ALSO:
Set Up an Approval Process
Enable Email Approval Response
Automatically assign an approver using a standard or custom hierarchy Available in: Enterprise,
field. Performance, Unlimited,
Assigns the approval request to the user in the field displayed next to and Developer Editions
this option. You select this field when you configure the approval process.
Automatically assign to a queue.
Available only for objects that support queues. Assigns approval requests
to a queue.
Automatically assign to approver(s).
Assigns the approval request to one or more specific users, specific
queues, or users related to the submitted record. You can add up to 25
per step.
597
Automate Your Business Processes Set Up an Approval Process
The approver’s delegate Users can identify a delegate in their approval settings. Delegated approvers can’t reassign approval
may also approve this requests; they can only approve or reject them.
request
Note: Internal Salesforce users are listed by and can be added using the Delegated Approver
lookup field. Use Data Loader and a comma-delineated (CSV) file to add users with communities
licenses as Delegated Approvers. The CSV uses the CommunityUserId rather than the UserId
for DelegatedApproverId. Communities licenses are used with Experience Cloud sites and
legacy portals.
SEE ALSO:
Considerations for Setting Approvers
598
Automate Your Business Processes Set Up an Approval Process
Example: When expenses are approved, you want to print checks for payment. To do so, you add an outbound message, which
sends the appropriate information to your Oracle accounting service, as a Final Approval action.
SEE ALSO:
Set Up an Approval Process
Perform Automated Actions
Considerations for Automated Actions
Approval Step An approver rejects this request for this step. None
Rejection
Final Approval All required approvals have been given for a record Record Lock (locks)
Final Rejection An approver rejects the request, and it goes to the Record Lock (unlocks)
final rejection state.
599
Automate Your Business Processes Set Up an Approval Process
SEE ALSO:
Considerations for Automated Actions
SEE ALSO:
Groups of Automated Actions in an Approval Process USER PERMISSIONS
Considerations for Automated Actions To select approval actions:
• Customize Application
600
Automate Your Business Processes Prepare Your Org for Approvals
To activate approval
processes:
• Customize Application
SEE ALSO:
Set Up an Approval Process
Limits and Considerations for Approvals
601
Automate Your Business Processes Prepare Your Org for Approvals
602
Automate Your Business Processes Prepare Your Org for Approvals
SEE ALSO:
Create Lightning Apps
Set Up the Lightning Experience Home Page
Customize Salesforce Classic Home Tab Page Layouts
Prepare Your Org for Approvals
SEE ALSO:
Prepare Your Org for Approvals
Let Users Respond to Approval Requests from Chatter
603
Automate Your Business Processes Prepare Your Org for Approvals
SEE ALSO:
Limits and Considerations for Approvals
Let Users Respond to Approval Requests by Email
Example: Requesting User has requested your approval for the following item. Available in: both Salesforce
Classic and Lightning
To approve or reject this item, reply to this email with the word APPROVE, APPROVED, YES, Experience
REJECT, REJECTED, or NO in the first line of the email message, or click this link:
Available in: Enterprise,
Link to approval request page
Performance, Unlimited,
If replying via email you can also add comments on the second line. The comments will be and Developer Editions
stored with the approval request in Salesforce CRM.
Note: For Salesforce to process your response the word APPROVE, APPROVED, YES, REJECT,
REJECTED, or NO must be in the very first line of the reply email. Also, any comment must be
in the second line.
If your org has Approvals in Chatter enabled and the approver opted to receive notifications as Chatter posts, the default email template
is appended with:
Example: You can also approve, reject and comment on this request from your Chatter feed:
Link to approval post in Chatter
Note: If you use a custom email template for your approval process, make sure that it explains both response options: clicking
the link and replying by email. If the user doesn’t respond correctly (for example, if the user misspells approve or types it on the
wrong line), Salesforce doesn’t register the response.
SEE ALSO:
Email Templates in Salesforce Classic
Merge Fields for Approvals
Let Users Respond to Approval Requests by Email
604
Automate Your Business Processes Prepare Your Org for Approvals
USER PERMISSIONS
SEE ALSO:
Considerations for Email Approval Response To enable Email Approval
Response:
Let Users Respond to Approval Requests by Email
• Customize Application
605
Automate Your Business Processes Prepare Your Org for Approvals
SEE ALSO:
Feed Tracking
Chatter Post Templates for Approval Requests
Where Do Approval Request Posts Appear?
Considerations for Approvals in Chatter
Limitations
• Approvals in Chatter doesn't support delegated approvers or queues.
• You can’t recall or reassign an approval request from a post. Instead, perform these actions from the approval record.
• Approval requests from Sites or portal users aren’t supported.
Approval Posts
• Approval posts can't be deleted in the Salesforce user interface; you can only delete them through the API.
• If you don’t select an approval post template, the approval post uses the system default template or the default template for
the object, if available.
• Only users with access to the approval record can see the approval request post. Comments on approval posts aren’t persisted
to the approval record.
• Different users see different configurations of the approval request post.
– Only approvers see approval action buttons on their posts, and then only in their profile feed or their news feed.
– Only approvers see approver names in the header.
• If you change the approver, step name, or the routing type on an approval process while it’s in progress, existing approval posts
aren’t updated.
606
Automate Your Business Processes Prepare Your Org for Approvals
• When an approval request is recalled, a new post is generated. It appears on the news feeds of the submitter, all approvers, and
followers of the object. It also appears on the record feed.
• If a step requires unanimous approval from multiple approvers, the approval request post for that step doesn’t list all selected
approvers in its header. Approvers see only their own name in the post header.
SEE ALSO:
Let Users Respond to Approval Requests by Email
Prepare to Enable Approvals in Chatter
Where Do Approval Request Posts Appear?
Limits and Considerations for Approvals
1. From Setup, enter Chatter Settings in the Quick Find box, then select Chatter Available in: Enterprise,
Settings. Performance, Unlimited,
and Developer Editions
2. Click Edit.
3. Select Allow Approvals.
USER PERMISSIONS
4. Save your changes.
To enable Approvals in
Chatter:
SEE ALSO:
• Customize Application
Prepare to Enable Approvals in Chatter
Considerations for Approvals in Chatter
Where Do Approval Request Posts Appear?
607
Automate Your Business Processes Prepare Your Org for Approvals
SEE ALSO:
What Happens When You Opt Out of Chatter Approval Requests?
Considerations for Approvals in Chatter
Let Users Respond to Approval Requests from Chatter
SEE ALSO:
Manage Deleted Custom Fields
SEE ALSO:
Create a Chatter Post Template
Limits and Considerations for Approvals
608
Automate Your Business Processes Prepare Your Org for Approvals
SEE ALSO:
Choose Approval Request Notification Templates
Considerations for Chatter Post Templates for Approval Requests
609
Automate Your Business Processes Prepare Your Org for Approvals
• If the approver has to manually select the next approver, they must log in to the full Salesforce site to complete the approval request.
• Users can respond only to approval requests without comments.
• Up to four fields only of an approval request can appear in a Slack notification.
• Users can continue to receive email, Lightning Experience, and mobile notifications about approval requests.
610
Automate Your Business Processes Limits and Considerations for Approvals
SEE ALSO:
Considerations for Email Approval Response
Considerations for Approvals in Chatter
Approvals: What’s Different or Not Available in the Salesforce Mobile App
Considerations for Approval History Reports
Restrictions for Approval Processes in Change Sets
Approval Limits
Salesforce limits the number of approval processes in your org, as well as the number of steps and
EDITIONS
actions in each approval process.
Available in: both Salesforce
Per-Org Limit Value Classic and Lightning
Active approval processes 1,000 Experience
611
Automate Your Business Processes Limits and Considerations for Approvals
612
Automate Your Business Processes Limits and Considerations for Approvals
• An Approval Process can only be included in unlocked packages that don’t have a specified namespace.
SEE ALSO:
What Does This Approvals Error Mean?
Set Up an Approval Process
Considerations for Automated Actions
Considerations for Chatter Post Templates for Approval Requests
SEE ALSO:
Default Template for Email Approval Response
Email Templates in Salesforce Classic
613
Automate Your Business Processes Limits and Considerations for Approvals
• Here’s what happens to the list of approvers after a record enters an approval step and the approval process later returns to that
step.
– If the user who responded isn’t in the designated approvers list and has either “Modify All Data” or “Modify All”
permissions for the object, that user replaces the original approver in the list of approvers.
– If a user who responded is in the designated approvers list, the list of approvers for that step doesn’t change. This behavior
occurs even if the field values that designate the approvers have changed.
For example, an approval process’s first step requests approval from a user’s manager. If the approval request is rejected in the second
step, the approval request returns to the first step. This table explores what happens to the list of approvers.
The user’s manager originally responded to the approval request. The original manager
Since then, the user’s manager has changed. The new manager isn’t a designated approver for this step.
A user with the “Modify All Data” permission originally responded The user with the “Modify All Data” permission
to the approval request. That user replaces the user’s manager in the list of designated
approvers for this step.
614
Automate Your Business Processes Limits and Considerations for Approvals
SEE ALSO:
Identify Assigned Approvers for an Approval Step
Limits and Considerations for Approvals
615
Automate Your Business Processes Sample Approval Processes
2. Delete all approval requests that are associated with it, and remove them from the Recycle Bin.
SEE ALSO:
Activate an Approval Process
Manage Multiple Approval Requests
Limits and Considerations for Approvals
616
Automate Your Business Processes Sample Approval Processes
Wrap Things Up
• After you created the approval process, add the Approval History related list to the PTO Request object page layout.
• Consider adding the Items To Approved related list to your custom home page layouts. The related list shows users all approval
requests that are waiting for their response.
617
Automate Your Business Processes Sample Approval Processes
• If you have a sandbox, test the approval process, then activate it.
SEE ALSO:
Create a Custom Object
Email Templates in Salesforce Classic
Create an Approval Process with the Jump Start Wizard
Prepare Your Org for Approvals
618
Automate Your Business Processes Sample Approval Processes
2. Create a second approval step named Step 2: Multiple VP Approval and specify the following:
– Use the filter criteria Expense Amount greater or equal 5000.
– Choose Automatically assign to approver(s) and select two users with a VP role.
– Select the Require UNANIMOUS approval from all selected approvers option. The request isn’t
approved unless both designated users approve.
– If appropriate, choose The approver's delegate may also approve this request if you want to
allow the user in the Delegated Approver field to approve requests.
– Choose Perform ONLY the rejection actions for this step... so that the request returns to the
manager for changes if one of the VPs rejects the request.
Wrap Things Up
• After you created the approval process, add the Approval History related list to the Expense Report object page layout.
• Consider adding the Items To Approved related list to your custom home page layouts. The related list shows users all approval
requests that are waiting for their response.
• If you have a sandbox, test the approval process, then activate it.
SEE ALSO:
Create a Custom Object
Email Templates in Salesforce Classic
Create Custom Fields
Set Up an Approval Process
Prepare Your Org for Approvals
619
Automate Your Business Processes Sample Approval Processes
Wrap Things Up
• After you created the approval process, add the Approval History related list to the appropriate opportunity page layouts.
• Consider adding the Items To Approved related list to your custom home page layouts. The related list shows users all approval
requests that are waiting for their response.
• If you have a sandbox, test the approval process, then activate it.
SEE ALSO:
Email Templates in Salesforce Classic
Create Custom Fields
Set Up an Approval Process
Prepare Your Org for Approvals
620
Automate Your Business Processes Sample Approval Processes
Tip:
• Consider creating the following final approval actions:
– Email alert to notify the user who submitted the offer letter request.
– Field update to select the Offer Extended checkbox.
Wrap Things Up
• After you created the approval process, add the Approval History related list to the Candidates object page layout.
• Consider adding the Items To Approved related list to your custom home page layouts. The related list shows users all approval
requests that are waiting for their response.
621
Automate Your Business Processes Approval History Reports
• If you have a sandbox, test the approval process, then activate it.
SEE ALSO:
Create a Custom Object
Email Templates in Salesforce Classic
Set Up an Approval Process
Prepare Your Org for Approvals
SEE ALSO:
Create a Custom Report Type for Approval History
622
Automate Your Business Processes Approval History Reports
Field Description
Completed Date Date and time when the approval process instance was completed or recalled.
If no step criteria are met and the record is auto-approved or auto-rejected,
Completed Date and Submitted Date have the same values.
Elapsed Days Length of time between when the record was submitted for approval and when the
approval process was completed or recalled.
Elapsed Hours
Elapsed Minutes
Last Actor: Full Name Full name of the user who most recently participated in the approval process instance.
If no step criteria are met and the record is auto-approved or auto-rejected, Last
Actor: Full Name and Submitter: Full Name have the same values.
Object Type Object type of the record that was submitted for approval.
Pending Step Name Name of the approval step at which the record is awaiting approval or rejection.
Record Name Name of the record that was submitted for approval.
Submitted Date Date and time when the record was submitted for approval.
Submitter: Full Name Full name of the user who submitted the record for approval.
Field Description
Step: Name Name of the approval step.
Step: Completed Date Date and time when the approval step instance was completed or recalled.
Step Elapsed Days Length of time between when the record entered the approval step and when the
approval step instance was completed or recalled.
Step Elapsed Hours
Step Last Actor: Full Name Full name of the user who most recently participated in the approval step instance.
Step Start Date Date and time when the record entered the approval step.
623
Automate Your Business Processes Approval History Reports
Field Description
Step Status Status of the approval step instance.
SEE ALSO:
Approval History Reports
Considerations for Approval History Reports
Examples of Approval History Reports
Report Example: Opportunity Approvals Submitted Within a Date Range Available in: both Salesforce
Classic and Lightning
This sample report displays approval process instances that were submitted within a specified date Experience
range (1) for the Opportunity object (2). The results are sorted by status (3) and include the last
actor (4), submitted date (5), completed date (6), record name (7), approval process instance ID (8), Available in: Enterprise,
and approval process name (9). Performance, Unlimited,
and Developer Editions
624
Automate Your Business Processes Approval History Reports
625
Automate Your Business Processes Approval History Reports
Notice that the previous sample report doesn't include the approvers for each step and the elapsed time for each approval request. To
get this information, run a SOQL query by using the approval process instance ID from the report. The following sample SOQL query
obtains the ActorID (user or queue that received the approval request) and the ElapsedTimeInHours (elapsed time since
the approval request was sent) for the first pending step in the report.
SELECT ActorId,ElapsedTimeInHours FROM ProcessInstanceWorkitem where processInstanceId =
'04gD0000000LvIV'
626
Automate Your Business Processes Approval History Reports
The sample query has only one result, and you can view that approver's user profile page by appending the resulting ActorID to the
organization's base URL (https://MyDomainName.my.salesforce.com/005D00000015vGGIAY), which gets redirected
to the user profile page.
SEE ALSO:
Approval History Reports
627
Automate Your Business Processes Approval History Reports
Process Instance Node Never populated for approval process instances that were completed before the Summer ’14 rollout.
For approval process instances that were pending during the Summer ’14 rollout, all Process Instance
Node fields are populated only after the approval process instance is next acted upon after the Summer
’14 rollout.
Additional exceptions apply to approval history data that is available only via SOQL queries of certain objects. See ProcessInstance,
ProcessInstanceNode, ProcessInstanceStep, and ProcessInstanceWorkitem in the Object Reference for Salesforce.
Object Field When an existing process instance or process instance node record is copied
to a sandbox...
Process Instance Submitted This value is overwritten by the date and time when the process instance record is copied
Date to the sandbox.
Submitter: This value is overwritten by the name of the user who copied the process instance record
Full Name to the sandbox.
Process Instance Step Start This value is overwritten by the date and time when the process instance node record is
Node Date copied to the sandbox.
SEE ALSO:
Fields Available for Approval History Reports
Approval History Reports
628
Automate Your Business Processes Manage Multiple Approval Requests
SEE ALSO:
Considerations for Managing Approvals
629
Automate Your Business Processes Approval Requests for Users
630
Automate Your Business Processes Approval Requests for Users
631
Automate Your Business Processes Approval Requests for Users
An email notification
USER PERMISSIONS
The record
To respond to an approval
Chatter request from within
Salesforce:
Home
• Read on the associated
Slack record
To respond to an approval
request from an email:
In-App Notification • API Enabled
Depends on the Receive Approval Request Emails field in your approver
preferences. If notifications are enabled for your org, you receive a notification whenever you
receive an approval request email.
• Respond from the notification if your admin enabled actionable notifications.
• To open the approval request, click the notification.
Email Notification
Depends on the Receive Approval Request Emails field in your approver preferences.
• To open the approval request, click the link in the email.
• Reply to the email if your admin enabled email approval response.
Record
Respond from the Approval History related list.
Chatter
Depends on if your admin has enabled Approvals in Chatter and you haven’t opted out of receiving approval requests through
Chatter posts.
• Respond from the post if your admin enabled actionable notifications.
• Click the name of the record, then respond from the Approval History related list.
Home
Depends on if your admin added the Items to Approve component to your home page. From the Home tab, respond from the Items
to Approve component.
Tip: From this component in Salesforce Classic, you can respond to multiple requests at once.
632
Automate Your Business Processes Approval Requests for Users
Slack
Slack notifications are enabled by default. If your admin hasn't disabled Slack notifications, an approver can respond to a request
from the Messages tab on the Salesforce Digital HQ app in Slack. A Show More link opens the details of the approval request in
Salesforce.
SEE ALSO:
Approval User Preferences
Approval Requests for Users
yes no
SEE ALSO:
Approval User Preferences
Approval Requests for Users
633
Automate Your Business Processes Approval Requests for Users
SEE ALSO:
What Does This Approvals Error Mean?
Respond to an Approval Request Via Email
Approval Requests for Users
634
Automate Your Business Processes Approval Requests for Users
Note: Salesforce doesn’t check whether field updates pass custom validation rules on fields.
SEE ALSO:
Troubleshoot Email Responses to Approval Requests
Approval Requests for Users
Reassigned The record has been submitted for approval but assigned to a different
approver.
Recalled The record was submitted for approval but recalled from the approval
process.
SEE ALSO:
Approvals
Submit a Record for Approval
Respond to an Approval Request
Approval Requests for Users
Note: Internal Salesforce users are listed by and can be added using
the Delegated Approver lookup field. Use Data Loader and a
635
Automate Your Business Processes Approval Requests for Users
Field Description
comma-delineated (CSV) file to add users with communities licenses as Delegated Approvers. The
CSV uses the CommunityUserId rather than the UserId for DelegatedApproverId.
Communities licenses are used with Experience Cloud sites and legacy portals.
Manager Depending on how your admin sets up approval processes, requests for approval can automatically be
routed to your manager.
Receive Approval Controls whether you receive approval request notifications by email, in the Salesforce mobile app, or in
Request Emails Lightning Experience.
If you select Never, you don’t receive approval request notifications. However, you still receive approval
request emails from a queue, depending on how your admin configured the queue email.
SEE ALSO:
Approval Requests for Users
Personalize Your Salesforce Experience
1. In the page banner, click your profile avatar, and select My Settings (Salesforce Classic) or Settings (Lightning Experience).
2. Enter My Feeds in the Quick Find box, then select My Feeds.
3. Deselect Receive approval requests as posts.
You see this setting only when approvals are enabled in your org.
636
Automate Your Business Processes Approval Process Terminology
SEE ALSO:
Approval User Preferences
Personalize Your Salesforce Experience
Available in: Group, Professional, Enterprise, Performance, Unlimited, Developer, and Contact Manager Editions
• If you opt out while an approval that you’re assigned to is in progress, you see notification posts if you’re following the approval
record.
• If you’re following the approval record, you see approval posts from the record with non-approver content.
• For approval notification posts that you’ve already received, you see non-approver content.
• The Approve and Reject buttons are removed from existing approval posts in your feed.
SEE ALSO:
Approval User Preferences
Opt Out of Approval Request Posts in Chatter
637
Automate Your Business Processes Approval Process Terminology
The first step specifies what to do if a record doesn’t advance to that step. Later steps specify what happens if an approver rejects
the request.
Assigned Approver
The assigned approver is the user responsible for responding to an approval request.
Delegated Approver
A delegated approver is someone appointed by an assigned approver as an alternate for approval requests.
Note: Internal Salesforce users are listed by and can be added using the Delegated Approver lookup field. Use Data Loader
and a comma-delineated (CSV) file to add users with communities licenses as Delegated Approvers. The CSV uses the
CommunityUserId rather than the UserId for DelegatedApproverId. Communities licenses are used with
Experience Cloud sites and legacy portals.
Email Approval Response
Email approval response lets users respond to approval requests by replying to an email notification.
Initial Submission Actions
An initial submission action occurs when a user first submits a record for approval. By default, the record is locked.
Final Approval Actions
Final approval actions occur when all required approvals were obtained.
Final Rejection Actions
A final rejection action occurs when an approver rejects the request and it moves to the final rejection state.
Outbound Message
An outbound message sends information to a designated endpoint, like an external service. You can configure outbound messages
from Setup. Configure the external endpoint and use the SOAP API to create a listener for the messages.
Process Instance
A process instance represents one instance of an approval process. A new process instance is created each time a record is submitted
for approval.
Process Instance Node
A process instance node represents an instance of an approval step. The system creates a process instance node each time a record
enters a step in an approval process. The system doesn’t create a process instance node when the record doesn’t meet the step
criteria or the approval process instance is completed without entering the step.
Recall Actions
A recall action occurs when a submitted approval request is recalled. By default, the record is unlocked.
Record Locking
Record locking prevents users from editing a record, regardless of field-level security or sharing settings. By default, Salesforce locks
records that are pending approval. Only admins can edit locked records.
SEE ALSO:
Approvals
Perform Automated Actions
Set Up an Approval Process
638
Automate Your Business Processes Einstein Next Best Action
SEE ALSO:
Connect REST API Developer Guide: Next Best Action Resources
Unofficial SF: Next Best Action Home
Unofficial SF: How To: Access Unique Community Cloud Features for Next Best Action
Unofficial SF: Deployment Options and Roadmap for Next Best Action
639
Automate Your Business Processes Get Started with Einstein Next Best Action
Recommendations
Recommendations are displayed to users with the option to accept or reject the recommended action. Each recommendation contains
an image, important text values such as button text and a description, and an assigned flow that runs when a user responds. They can
be stored and referenced in the Recommendation standard object, or they can be manually assembled when building a strategy.
Strategies
Strategies determine which recommendations to display to users, based on your data and business processes. When you set up Einstein
Next Best Action on a page, you assign a strategy to that location, which then defines the recommendations that appear there.
You can control which recommendations are displayed in any situation, even if your org has a large number of recommendation records.
Strategies can filter recommendations based on any available value, including recommendation fields, fields related to the running user,
and fields related to the record that’s currently displayed.
Important: In Flow Builder, you define which recommendations are displayed by making sure that they’re in the
outputRecommendations collection variable at the end of the flow. In Strategy Builder, you define which recommendations are
displayed by making sure that they’re not filtered out when they reach the Output element.
1. Plan Your Recommendations and Automation
Decide where the recommendation appears, who it appears to, and the conditions in which it appears. Create a plan for the automation
that you want to run when a user accepts the recommendation.
2. Build a Flow
In Flow Builder, design and build the flow that runs when a user accepts or rejects the recommendation. You can assign only screen
flows and autolaunched flows to a recommendation. If an inactive or invalid flow is assigned, the recommendation isn’t displayed
to users.
640
Automate Your Business Processes Get Started with Einstein Next Best Action
3. Create Recommendations
Recommendations are standard Salesforce records, similar to accounts and contacts. To create recommendations, you can:
• Create recommendation records on the Recommendation object.
• Build recommendations from other data when creating your strategy. In Flow Builder, use the Recommendation Assignment
element or a custom Apex invocable action.
• Generate recommendations automatically through AI with Einstein Recommendation Builder.
4. Create a Strategy
After you create a flow and have a plan for your recommendation records, use Flow Builder or Strategy Builder to create your strategy.
Where possible, we recommend building strategies in Flow Builder using the Recommendation Strategy flow type, but you can also
create them in Strategy Builder.
Some features can be used only in strategies created in Strategy Builder.
• Limiting repeated showings of some recommendations
• Displaying recommendations on an Experience Cloud site or external site
• Displaying AI-generated recommendations from Einstein Recommendation Builder
To build a strategy in Flow Builder, follow these steps.
a. Go to the Flows page in Setup, and click New Flow.
b. Select the All + Templates tab, and then select the Recommendation Strategy category. Select the
Recommendation Strategy flow type, and click Create.
c. Add Get Records elements to retrieve data from Salesforce records, such as the Recommendations object or an object related
to the currently displayed record. Use condition requirements in the Get Records element to filter which recommendations are
stored in the element’s collection. Or you can build recommendations from other data with the Recommendation Assignment
element or a custom Apex invocable action.
d. Add logic elements to limit the number of recommendations that users see. Use Collection Sort and Collection Filter elements
to arrange and reduce the recommendations from the Get Records collection. If needed, you can also add other Flow elements
such as Decision and Loop to create more complex, branching logic.
e. Add the Assignment element to set recommendations in the outputRecommendations collection. When running a strategy
built in Flow Builder, Einstein Next Best Action displays only recommendation records in the outputRecommendations collection.
641
Automate Your Business Processes Einstein Next Best Actions Considerations
Use the Suggested Actions component to display recommendations on Experience Cloud sites. This component can run only
strategies created in Strategy Builder.
SEE ALSO:
Build a Flow
Create Recommendations
Strategy Builder
Display Recommendations
Launch a Flow When a Recommendation Is Accepted or Rejected
Einstein Next Best Action Component
Suggested Actions
Unofficial SF: How To: Access Unique Community Cloud Features for Next Best Action
Unofficial SF: Building Your Own Next Best Action Front End
Recommendations
• Consider adding a custom category field to the recommendation object and layout. A category field gives you more control when
loading, sorting, and filtering recommendations and more options when creating flows.
• Create names, descriptions, acceptance labels, and rejection labels that are appropriate for your intended audience.
• Reusing a recommendation name creates a new recommendation. It doesn’t overwrite an existing recommendation. Duplicated
names can cause strategies to display duplicate recommendations to customers.
• All flows, both inactive and active, display in the Action dropdown list. After you save your recommendation, you can see if the flow
is active.
• You can create a recommendation based on a flow that isn’t active, but no strategy loads it until the flow is activated.
Strategies
• All strategies require at least one recommendation.
• In Strategy Builder, you can load and filter the records of a Recommendation object. Or load and filter the records of any object, and
convert them into recommendations at the end of the strategy using the Map element.
• Load elements require at least one criteria.
642
Automate Your Business Processes Einstein Next Best Action Entitlements
SEE ALSO:
Einstein Next Best Action
Write an Expression
643
Automate Your Business Processes Einstein Next Best Action Entitlements
Einstein Next Best Action Provides 10,000 All Next Best Action For purchase in None
Additional Requests SKU additional Next Best requests, including tests Essentials, Professional,
Action requests each in Strategy Builder, Enterprise,
month on an org-wide display to customers, and Performance, and
basis. (Add-on) repeat displays triggered Unlimited Editions
by events.
Service Cloud Einstein Provides unlimited Next Requests made by users For purchase in Unlimited Next Best
SKU Best Action requests for a with this permission Enterprise, Action Strategy
single user. aren’t counted against Performance, and Executions
the monthly entitlement. Unlimited Editions
Lightning Platform Plus Provides unlimited Next Requests made by users For purchase in Unlimited Next Best
Best Action requests for a with this permission Enterprise, Action Strategy
single user. aren’t counted against Performance, and Executions
the monthly entitlement. Unlimited Editions
SEE ALSO:
Display Recommendations
Unofficial SF: Building Your Own Next Best Action Front End
Connect REST API Developer Guide: Next Best Action Resources
Einstein Next Best Action Entitlements
644
Automate Your Business Processes Create Recommendations
Create Recommendations
Create offers or actions to recommend to users using Einstein Next Best Action. Recommendations
EDITIONS
are standard Salesforce records, similar to accounts and contacts, that are processed by strategies
and associated with flows. Strategies determine which recommendation records are surfaced using Available in: both Salesforce
business rules, predictive models, and other data sources. The result of this process is context-specific Classic and Lightning
recommendations that you present to your users. Experience
Note: Available in: Essentials,
• Salesforce has both a Recommendation object for Einstein Next Best Action (that’s this Professional, Enterprise,
page) and a Recommendation component for Experience Builder sites. The Performance, Unlimited,
Recommendation component is not related to Next Best Action. and Developer Editions
• If you don't see Recommendations in the App Launcher, in Setup, select Default On in
the Recommendations tab settings for your user profile or permission set. USER PERMISSIONS
• You can load and filter the records of a Recommendation object. Or load and filter the To create or manage
records of any object, and convert them into recommendations at the end of a strategy recommendations:
using the Map element. • Modify All Data
2. Enter a friendly name (1) and brief description (2) for your recommendation. The description appears on the recommendation that
is surfaced to users.
3. Optionally, click to upload an image (3) that you can display as a header for your recommendation. For best results, use a 1000 by
380 pixel image at 72 DPI, or an image with a similar ratio. You can choose whether the image displays using component properties.
Once uploaded, a thumbnail of your image displays on the Recommendations page. Customers see the full image as a header for
your recommendation in either the Lightning App Builder or Experience Builder component.
4. Enter an acceptance label (4) and a rejection label (5) for the buttons that customers click to, respectively, accept and reject the
recommendation.
5. Create a flow. When a user accepts your recommendation, they are taken to the flow specified in Action (6).
6. Choose the flow that runs when a customer accepts the recommendation (6) and click Save. You can also choose a flow that runs
when a customer accepts or rejects the recommendation. The Action list displays both active and inactive flows. Choosing a flow
that isn't active hides the recommendation. Once you’ve saved your recommendation, you can see if the flow is active from Is Action
Active (7).
645
Automate Your Business Processes Create Recommendations
7. Create a recommendation strategy in Strategy Builder that determines how your recommendations surface.
8. Optionally add a custom Category field to the Recommendation object and the Recommendation Layout. Adding a custom Category
field can simplify loading, filtering, and sorting recommendations in Strategy Builder.
Recommendation Fields
Recommendations are suggested actions that users see and interact with through Einstein Next Best Action strategies. When creating
a recommendation, use these fields to define its look and feel.
Launch a Flow When a Recommendation Is Accepted
Each recommendation is associated with a single flow. By default, Next Best Action launches a flow when a user accepts a
recommendation. The flow then performs an action, such as updating a case or sending an email.
Launch a Flow When a Recommendation Is Accepted or Rejected
Each recommendation is associated with a single flow. By default, Next Best Action launches a flow when a user accepts a
recommendation. The flow then performs an action, such as updating a case or sending an email. But you can also launch a flow
when a user rejects a recommendation, which gives you more flexibility. For example, a flow could run an automated process, write
to another system, or create a reminder email when a recommendation is rejected.
646
Automate Your Business Processes Create Recommendations
SEE ALSO:
Build a Flow
Strategy Builder
Display Recommendations
View and Edit Tab Settings in Permission Sets and Profiles
Get Started with Einstein Next Best Action
Connect REST API Developer Guide: Next Best Action Resources
Unofficial SF: Passing Data from Next Best Action to Flow
Recommendation Fields
Recommendations are suggested actions that users see and interact with through Einstein Next
EDITIONS
Best Action strategies. When creating a recommendation, use these fields to define its look and
feel. Available in: both Salesforce
You can use these methods to create recommendations. Classic and Lightning
Experience
• Assemble recommendations as needed in Flow Builder or Strategy Builder.
• Create recommendations as standard Salesforce records, similar to accounts and contacts, in Available in: Essentials,
the Recommendation object. You can create recommendation records on the Recommendations Professional, Enterprise,
tab in the App Launcher. Performance, Unlimited,
and Developer Editions
• Generate recommendations automatically through AI with Einstein Recommendation Builder.
Image (1)
The image that is shown in the recommendation. To display this image with the Einstein Next Best Action Lightning page component,
select Show Image when configuring the Lightning page component.
Name (2)
The header text at the top of the recommendation. To display this text with the Einstein Next Best Action Lightning page component,
select Show Title when configuring the Lightning page component.
Description (3)
Additional descriptive text displayed in the recommendation. To display this text with the Einstein Next Best Action Lightning page
component, select Show Description when configuring the Lightning page component.
647
Automate Your Business Processes Create Recommendations
SEE ALSO:
Create Recommendations
Get Started with Einstein Next Best Action
648
Automate Your Business Processes Create Recommendations
649
Automate Your Business Processes Create Recommendations
1. In Flow Builder, configure a flow that’s associated with a recommendation. Be sure to activate To view Lightning pages in
the Lightning App Builder:
the flow because Next Best Action can’t call an inactive flow from a recommendation.
• View Setup and
2. Create the Boolean isRecommendationAccepted input variable. Configuration
3. Create a Decision element and use the isRecommendationAccepted variable in your To run a recommendation
outcome conditions. strategy on a Lightning
record page:
4. Create a decision outcome for what the flow does when the recommendation is accepted. • Run Flows
5. Create a decision outcome for what the flow does when the recommendation is rejected. OR
Flow User field enabled
on the user detail page
650
Automate Your Business Processes Create Recommendations
651
Automate Your Business Processes Create Recommendations
SEE ALSO:
Launch a Flow When a Recommendation Is Accepted
Flow Resource: Variable
Flow Element: Decision
Einstein Next Best Action Component
652
Automate Your Business Processes Create Recommendations
9. Click Done.
653
Automate Your Business Processes Create Recommendations
10.
Example:
• If you look for one accepted response over 90 days, such as with a password reset recommendation, and the user accepts one
time during 90 days, they don’t see the message again for 90 days. But if the user rejects the recommendation, they see the
message every time they reload the page until they accept it.
• If you look for two accepted or rejected responses during one day, and a user accepts or rejects the recommendation once
each day, every day, then they still see the recommendation.
• If you look for two accepted or rejected responses during one day, and a user accepts or rejects the recommendation twice
on day one, then they don’t see the recommendation on day two. They do see the recommendation again on day three.
If you add an Assignment element after the Limit Repetitions element and change the label for accept or reject, you must update the
limit repetitions output.
SEE ALSO:
Create Recommendations
Display Recommendations
654
Automate Your Business Processes Strategy Builder
Strategy Builder
Strategy Builder is a point-and-click process automation tool used with Einstein Next Best Action.
EDITIONS
Strategy Builder funnels recommendation records through your business logic to determine which
recommendations are surfaced on your record pages. Available in: both Salesforce
Note: Where possible, we recommend building strategies in Flow Builder using the Classic and Lightning
Experience
Recommendation Strategy flow type, but you can also create them in Strategy Builder.
After creating recommendations to filter through your strategy logic, create strategies and learn Available in: Essentials,
how to manage them. Professional, Enterprise,
Performance, Unlimited,
Create a Strategy and Developer Editions
Once you’ve created flows and recommendation records, use Strategy Builder to funnel the
correct recommendations to your users at the right time.
Manage Your Action Strategies
Test, troubleshoot, and create strategies using Strategy Builder management tools.
Create, Package, and Distribute a Strategy Template
Enterprise developers can create and package strategy templates from Developer Edition orgs for use in multiple Salesforce orgs.
And independent software vendors (ISVs) can publish templates on AppExchange for distribution to their subscribers.
Create, Package, and Distribute a Strategy as Your Intellectual Property
Enterprise developers can create and package Next Best Action strategies and strategy templates from Developer Edition orgs for
use in multiple Salesforce orgs. And independent software vendors (ISVs) can publish strategies and templates on AppExchange for
distribution to their subscribers. Strategies not marked as templates in managed packages have IP (intellectual property) protection
and can't be edited or cloned. IP protection safeguards proprietary information in your strategies.
Strategy Elements
Use this page to quickly access a list of Strategy Builder elements and learn how they work together to create unique strategies.
Strategy Connections
Integrate external data and pull in information from other Salesforce systems to create robust strategies that utilize all your data.
655
Automate Your Business Processes Strategy Builder
Create a Strategy
Once you’ve created flows and recommendation records, use Strategy Builder to funnel the correct
EDITIONS
recommendations to your users at the right time.
Before you start creating strategies, make sure that you create flows and recommendation records Available in: both Salesforce
that you can use in your strategy. Classic and Lightning
Experience
1. Open Strategy Builder. From Setup, enter Strategies or Next Best Action in the
Quick Find box, select Next Best Action, and click New Strategy.
Available in: Essentials,
2. Give your strategy a name and a description. Professional, Enterprise,
3. Select a context object from Object Where Recommendations Display. Performance, Unlimited,
and Developer Editions
Note: The object that you choose here provides the context for your entire strategy.
For example, if you plan to use this strategy on Case pages, select Case. When the strategy USER PERMISSIONS
executes and resolves your expressions, the Next Best Action engine interprets the
incoming recordId as a case object. The engine has to know to what type of object the To create or manage action
pages belong to resolve expressions correctly. Linking your strategy to a specific object strategies:
also enables Strategy Builder to provide intelligent assistance in other areas, such as the • Modify All Data
Test feature. OR
Manage Next Best
4. Drag the appropriate elements onto the canvas. Action Strategies
Note: It’s best to start by adding a Load element, as loading recommendations is the To run an action strategy:
first step in any strategy. • Run Flows
5. Order your elements to make sure that recommendations are flowing through the correct OR
branches. Flow User field enabled
on the user detail page
Note: Elements are divided into two main categories: Recommendation Logic and
Branch Logic. Recommendation Logic elements act directly on the recommendations
flowing into the element by filtering, sorting and limiting. Branch Logic elements act as
gates, using context information, such as the recordId of the page the user is viewing, to
decide which sets of recommendations to allow.
Note: If your strategy isn’t running properly or you see an unexpected error, try using the Inspector tab to find the problem.
8. Display your strategy using the Suggested Actions component in Experience Builder or the Einstein Next Best Action component in
Lightning App Builder.
656
Automate Your Business Processes Strategy Builder
SEE ALSO:
Test Your Action Strategies
Inspect Strategy and Element Results
Create a Strategy
Build a Flow
657
Automate Your Business Processes Strategy Builder
Canvas (3)
The canvas is a visual representation of your strategy. From here, you can rearrange elements and see how your recommendations are
flowing from one branch to the next and finally into the output.
SEE ALSO:
Create a Strategy
Manage Your Action Strategies
Inspect Strategy and Element Results
658
Automate Your Business Processes Strategy Builder
659
Automate Your Business Processes Strategy Builder
Note: Images associated with recommendations aren’t displayed when testing in Strategy Builder.
The Test Strategy window doesn’t show all possible error messages. Strategies are executed from right to left, starting at Output. If
a particular Branch Selector expression results in a closed branch, the child elements of that branch (the elements to the left) are
not executed. This process makes strategy evaluation faster, but it also means that any branches with false expressions could have
errors that aren’t exposed. The Test button shows what the user sees. To get a complete view of any errors occurring at run-time,
use the Inspector tab in the Toolbox. Inspector highlights errors from all elements.
SEE ALSO:
Inspect Strategy and Element Results
Strategy Builder
660
Automate Your Business Processes Strategy Builder
• If you can’t find the problem in the Inspector tab, or you want to troubleshoot for a specific
user, try using the Apex debug log. Next Best Action has a specific debug log category.
• To receive full error reports sent directly to your email, a Chatter post, a text message, or other outlet, try creating a custom notification
flow and a Process Builder trigger. Using a Platform Status Alert Event, you can subscribe to Next Best Action events and respond
when errors occur.
SEE ALSO:
Inspect Strategy and Element Results
661
Automate Your Business Processes Strategy Builder
4. Select an object that allows you to define matching conditions that produce a single result. To run an action strategy:
• Run Flows
Note: For example, you could choose the User object and set User ID equal to the
OR
Created By ID in the event payload.
Flow User field enabled
5. Add other criteria. on the user detail page
6. Add an immediate action and select Flows. To open, edit, or create a
7. Name your action and select the flow you created in step one. flow in Flow Builder:
• Manage Flow
8. Add mappings to connect data from the payload of your event to flow inputs.
To create, edit, or view
9. Save and activate your process. processes in Process
Builder:
• Manage Flow
SEE ALSO:
AND
Flows
View All Data
Configure the Process Trigger
Object Reference Developer Guide: PlatformStatusAlertEvent
662
Automate Your Business Processes Strategy Builder
Note: To see accurate results, you have to save your strategy before testing it. If you change the strategy or an element, Run
becomes Save and Run.
4. To scroll right, use the horizontal scroll bar at the bottom of the Inspector pane.
663
Automate Your Business Processes Strategy Builder
5. If you want to view recommendations for a different object, click Test, clear your current selection, and choose a new object from
the dropdown. To update the recommendations in the inspector, click Run.
SEE ALSO:
Test Your Action Strategies
Strategy Builder
Unofficial SF: Reporting and Tracking with Next Best Action
USER PERMISSIONS
To create a strategy:
• Modify All Data
OR
Manage Next Best
Action Strategies
To create a managed
package:
• Create AppExchange
Packages
664
Automate Your Business Processes Strategy Builder
Example: Suppose you build and package strategies for insurance companies. Because insurance laws and regulations can vary
by location, your subscribers want the ability to modify your strategies when needed. They can do this using strategy templates
you create.
SEE ALSO:
Create a Strategy
ISVforce Guide: About Managed Packages
Create and Upload a Managed Package
Strategy Elements
Use this page to quickly access a list of Strategy Builder elements and learn how they work together
EDITIONS
to create unique strategies.
Use elements to create your strategies by opening Strategy Builder and selecting Elements in the Available in: both Salesforce
Toolbox. Drag elements onto the canvas to get started. Classic and Lightning
Experience
665
Automate Your Business Processes Strategy Builder
SEE ALSO:
Einstein Next Best Action
666
Automate Your Business Processes Strategy Builder
Description Optional description of the element and how it works within the strategy.
Apex Search or select an Apex action, which calls an Apex class. An Apex class must
Action have a method marked as an invocable method to appear as an Apex action in
declarative tools like Strategy Builder.
Argument Specify one or more parameters for the selected Apex action.
Example: Assume that your company integrates separate data sources from the manufacturers of products your business sells.
Those data sources include information about the current availability of each item (in stock, back ordered, or unavailable). You can
connect an Enhance element to your strategy’s Load or Generate element to provide that information to users in the
recommendation.
Example: You can use the Enhance element to calculate a discount percentage for your customers based on how long your
company has managed their account. Or you can use it to A/B test two branches of recommendations.
667
Automate Your Business Processes Strategy Builder
Example: Suppose you use Next Best Action to provide upsell recommendations. You want to add a 5% discount to your product
recommendations for those customers who’ve been with your company for more than one year. Customers of more than two
years get a 10% discount, customers of more than five years get a 20% discount, and so on. Use the Enhance element to call an
Apex action that performs a SOQL query. The query retrieves the Account age and appends it to the description of all incoming
recommendations.
The strategy used with an Enhance element can be as simple as Load -> Enhance -> Output. All recommendations the Load
element retrieves or loads are passed as a list of recommendations to the underlying invocable method.
When configuring the Enhance element, select Enhance with Discounts Based on Age as the Apex action and specify $Record.id
as the input parameter.
The Enhance element in turn calls the getDiscounts invocable method in the Enhance_GetAccountDiscount
class. Notice how the description of each recommendation has a discount value appended to it (r.Description + ‘
with a 5% discount’).
668
Automate Your Business Processes Strategy Builder
Usage
The Enhance element requires an Apex action marked as an invocable method.
@InvocableMethod(
label='Enhance with Discounts Based on Age'
description='Returns an enhanced set of recommendations with appropriate discounts')
Use the Enhance element in combination with the Strategy Builder Load or Generate element.
The Enhance element can pass any number of inputs to the Apex action. The input parameter must be a list or a list of lists of a user-defined
Apex object (for example, a custom class called DataContainer). The user-defined Apex object must include a
List<Recommendation> variable. The List<Recommendation> variable is automatically defined with the recommendations
that pass into the Enhance element.
global class DataContainer {
@InvocableVariable
public string accountId;
@InvocableVariable
public List<Recommendation> recommendations;
}
________
global static List<List<Recommendation>> invocableMethod(List<DataContainer> inputData)
669
Automate Your Business Processes Strategy Builder
The Enhance element returns a list of recommendations, List<List<Recommendation>>. These recommendation enhancements
exist only in memory and do not persist after the strategy is executed.
global static List<List<Recommendation>> invocableMethod(List<DataContainer> inputData)
SEE ALSO:
Strategy Builder Generate Element
Strategy Builder Load Element
Flow Element: Apex Action
Apex Search or select an Apex action, which calls an Apex class. An Apex class must
Action have a method marked as an invocable method in order to appear as an Apex
action in declarative tools like Strategy Builder.
Argument Specify one or more parameters for the selected Apex action.
Example: Assume that your company has a large catalog of products and you use a screen flow to recommend accessories to
your customers based on their past product purchases. Instead of creating a single, static recommendation for each individual
accessory, you can maintain that information in the Account or Product object in Salesforce. Or you can store information in external
data sources like Commerce Cloud or a SQL database. Use a Generate element with an Apex invocable action to call the Apex class
and generate accessory recommendations dynamically for your strategy.
Example: Suppose you want to show a service agent a list of key accounts to follow up with after a set number of days has passed
since the previous contact. With the Generate element, you can call an Apex action that makes a SOQL query for Account where
the Owner is the logged-in user (the agent). This identifies the accounts who were last contacted more than, say, 90 days ago.
Next Best Action returns the relevant accounts in the form of recommendations. The strategy can be as simple as the Generate
element with an Output element.
670
Automate Your Business Processes Strategy Builder
When you configure the Generate element, select Accounts to Follow Up Today as the Apex action and specify $User.id as an
input parameter.
The Generate element calls the getAccounts invocable method in the Generate_GetAccountsToFollowUp Apex
class. This retrieves the relevant accounts and creates a list of recommendations. The recommendation description includes the
name of the account (account.Name) and the number of days since the last contact (daysSinceLastContact).
global class Generate_GetAccountsToFollowUp {
@InvocableMethod(label='Accounts to Follow Up Today'
description='Recommend accounts the current user should follow
up on today')
global static List<List<Recommendation>> getAccounts(List<String> inputData){
List<List<Recommendation>> outputs = new List<List<Recommendation>>();
Integer daysSinceLastContact;
Account[] accounts = [SELECT Name, Description, LastContactDate__c, OwnerId
FROM Account WHERE OwnerId = :inputData[0]];
List<Recommendation> recs = new List<Recommendation>();
for (Account account:accounts) {
if (account.LastContactDate__c != null){
daysSinceLastContact =
account.LastContactDate__c.daysBetween(date.today());
if (daysSinceLastContact > 90){
Recommendation rec = new Recommendation(
Name = account.Name,
Description = 'Connect with the ' + account.Name + ' account,
the last interaction was '+ daysSinceLastContact + ' days ago.',
//Pre-req: Create a screen flow with the name simpleFlow
ActionReference = 'simpleFlow',
AcceptanceLabel = 'View'
);
671
Automate Your Business Processes Strategy Builder
recs.add(rec);
}
}
}
outputs.add(recs);
return outputs;
}
}
When you execute the strategy, the resulting recommendation includes the name of the account and the number of days since
the last contact with them.
Usage
The Generate element requires an Apex action marked as an invocable method.
@InvocableMethod(
label='Related Wikipedia Pages'
description='Recommend wikipages that are related to the named input wikipage')
The Generate element can pass any number of inputs to the Apex action, either as lists or a list of lists of primitives, sObjects, and
user-defined Apex objects. To provide more than one input, the input parameter must be a list or a list of lists of a user-defined Apex
object (for example, a custom class called DataContainer).
List<String> relatedTo
OR
global class DataContainer {
@InvocableVariable
public string accountId;
}
____
global static List<List<Recommendation>> invocableMethod(List<DataContainer> inputData)
672
Automate Your Business Processes Strategy Builder
The Generate element returns a list of recommendations. Invocable methods support returning either a list of an sObject type or a list
of lists of an sObject type. Since the Enhance element operates not on a single recommendation but on a list of recommendations, the
method must return a List<List<Recommendation>>.
global static List<List<Recommendation>> invocableMethod(List<DataContainer> inputData)
SEE ALSO:
Strategy Builder Enhance Element
Flow Element: Apex Action
Field Description
Label The name of the element as it appears on the canvas.
API Name The API name of the element. The API name must be unique.
Description Optional description of the element and how it works within the strategy.
Object The object whose records are loaded, filtered, and converted into recommendations.
Condition Determines the logic that you use to evaluate conditions. Choose All Conditions are Met to load the
Requirements recommendation if it meets all the specified criteria. Choose Any Condition is Met to load the recommendation
if it meets any of the listed criteria.
Field Choose a field from the Recommendation object to evaluate whether the recommendation is loaded into the
strategy.
Value Enter a value for your chosen field. Values can be simple numbers, string phrases, or formulas that use Salesforce
formula support. Don’t enclose string or number values with quotes. Picklists aren’t supported.
673
Automate Your Business Processes Strategy Builder
Field Description
Add Condition Creates an extra set of conditions.
SEE ALSO:
Einstein Next Best Action
Create Recommendations
Display Recommendations
Strategy Builder Enhance Element
Filter Create an expression that is evaluated for each recommendation that you load
Expression into your strategy. If the expression is true, the recommendation is allowed
through. If false, the recommendation doesn’t progress further through the
strategy. Filter Expression accepts Standard Salesforce formulas. For more
information, see Formula Operators and Functions by Context.
Note: Use $Record to reference fields from the context object. The context object is the object where you intend to surface
your recommendations and can be changed by editing your strategy and choosing an object under Object Where
Recommendations Display. Use plain text field labels to reference Recommendation object fields. Examples: $Record.status
!= 'New', RejectionLabel == ‘No, thanks.’ For more information, see Write an Expression.
Example: Suppose that you want to surface recommendations on the Case object so your service agents can suggest offers to
your customers. If you want to suggest only credit card offers, create a Category field for the Recommendation object. Add a
Credit Card Offer category to your field. Add a filter element and use the formula Category_c = ‘CreditCardOffer’
in Filter Expression.
Usage
Filter is the best way to remove certain recommendations from a strategy branch. Add the element to a branch and create an expression
to evaluate every recommendation that passes through the branch.
674
Automate Your Business Processes Strategy Builder
Write an Expression
Create unique expressions using logic from the Salesforce expression builder to filter recommendations, select or deselect branches,
and determine which recommendations are available for consideration in a strategy.
SEE ALSO:
Einstein Next Best Action
Create Recommendations
Display Recommendations
Formula Operators and Functions by Context
Unofficial SF: Adding $User and $Request to Next Best Action Strategies
Write an Expression
Create unique expressions using logic from the Salesforce expression builder to filter
EDITIONS
recommendations, select or deselect branches, and determine which recommendations are available
for consideration in a strategy. Available in: both Salesforce
Strategy Builder expressions, found on the Filter and Branch Selector elements, use standard Classic and Lightning
Salesforce formula functions. To learn more about creating formulas in Salesforce, see Formula Experience
Operators and Functions by Context.
Available in: Essentials,
Strategies are designed to work with a particular object like Case or Contact. Strategy Builder Professional, Enterprise,
elements use $Record as a placeholder for the actual record that gets passed in when a strategy Performance, Unlimited,
runs. and Developer Editions
1. Select the element you need for your strategy: Filter or Branch Selector.
2. Enter your expression. You can build expressions in two different modes: standard and advanced. Standard is declarative: search
and select to build your formula. Use advanced mode for more complex expressions, when a given operator is unavailable in standard
mode, or when you use concatenation.
3. In standard mode, set up conditions. At run time, the conditions are evaluated in the order you specify.
Operator Select an appropriate operator for that resource, for example Equals, Does Not Equal,
Starts With, Contains, Less Than Or Equal To, and Is Blank. The available
operators depend on the data types associated with that resource. Data types include text, number,
Boolean, or picklist.
Value Options:
• Select a value that’s appropriate for the recommendation resource and the operator. For example,
if you enter $Record.Status as the resource and Does Not Equal as the operator,
available values are On Hold, Escalated, Closed, and New.
• Manually enter a literal value.
Resource and Value in the same row must have compatible data types.
675
Automate Your Business Processes Strategy Builder
Note: When you add or subtract a number from a date value, the date adjusts in days, not
hours.
Any Condition Is Met If one of the conditions is true, the recommendation immediately takes this outcome’s
path.
676
Automate Your Business Processes Strategy Builder
Example: Say you create a custom field Has_Mobile_Service__c on the contact record. If you use
$Record.Contact.Has_Mobile_Service__c = false in a Strategy Builder expression, and you’re working with
a case record, the recordID provided with the request replaces $Record when the expression resolves. This is because case
records have a lookup relationship with contacts.
• Reference the context object in your formula using the $Record function.
Note: The Context object is the object where you plan to surface your recommendations. Choose the Context object, or change
it, by editing your strategy and choosing an object under Object Where Recommendations Display.
• Reference fields from the Recommendation object using the plain text label name. This option is available only in Filter and Load
elements, not Branch Selector elements.
677
Automate Your Business Processes Strategy Builder
• Use $Request to access information the user types into forms and use that information to request specific recommendations.
This option is available only on Search and Contact Support pages in Experience Builder sites.
Example: For multi-select picklist fields, enter values like Includes ($Record.CarType__c, ‘Audi,’‘BMW’)
SEE ALSO:
Einstein Next Best Action
Formula Operators and Functions by Context
Unofficial SF: Adding $User and $Request to Next Best Action Strategies
User Choose a user reaction to base your limits on. For example, if you select User
Reaction Rejects the Recommendation, your element only limits repeat offers after
the recommendation is rejected.
Number of Choose how many times you want the user to react before the recommendation
Reactions is limited.
Time Choose how long the system waits, after the user has reacted the set number
Period in of times, before a repeat offer is surfaced to the same user.
Days
678
Automate Your Business Processes Strategy Builder
Example: Let’s say you have a renewal offer that you want to surface at most once a year. If a user has already accepted the offer
and filled out the renewal, you don’t want to show the same offer again. For this example you would choose User Accepts the
Recommendation for User Reaction, 1 for Number of Reactions, and set the time period for 365 days for an annual renewal.
SEE ALSO:
Einstein Next Best Action
Create Recommendations
Display Recommendations
Example: You can include the name of a contact in a recommendation, and further
personalize the recommendation with text. Suppose that you have a recommendation with
the description, “Thank you for being a loyal customer. We truly appreciate your business!”
Using the Map element, you can personalize the description. Add the name of the contact
to the description, for example, “Lauren Boyle, Thank you for being a loyal customer. We truly
appreciate your business!”
1. Use a Load element to load all the recommendations you want to change. Or you can
add a Generate element and pass in dynamically generated recommendations.
2. Add a Map element. In the Name field, select Description and in the Value field, enter
this expression:
$Record.Contact.Name+ “, ” + Description. Leave the Type field as
Text.
679
Automate Your Business Processes Strategy Builder
3. Place the “Personalized Thank You” Map element after the Load element. It modifies the descriptions of all recommendations
that pass through it.
4. When you execute the strategy, your recommendations include the contact name for the current case.
680
Automate Your Business Processes Strategy Builder
Field Description
Sort Empty Recommendations that don’t contain information in the field you chose in Recommendation Field are sorted
Values to Top to the top when selected.
Maximum Limits the number of recommendations allowed to pass through the element.
Recommendations
Usage
Sort the order of your recommendations in a branch by choosing a value from the Recommendation object to sort on. Choose whether
you want to sort in an ascending or descending order, and decide how many recommendations to allow through.
SEE ALSO:
Einstein Next Best Action
Create Recommendations
Display Recommendations
Usage
Merge multiple branches into a single branch and limit the number of recommendations allowed through the branch with the branch
merge element.
SEE ALSO:
Einstein Next Best Action
Create Recommendations
Display Recommendations
681
Automate Your Business Processes Strategy Builder
Condition Create an expression for each branch that flows through the element. If the
expression is true, the recommendations in the branch are allowed through. If
false, the recommendations in the branch don’t progress any further through
the strategy. Condition accepts standard Salesforce formula functions. For more
information, see Formula Operators and Functions by Context.
Note: Use $Record to reference fields from the context object. The context object is the object where you intend to surface
your recommendations and can be changed by editing your strategy and choosing an object under Object Where
Recommendations Display. Example: ISPICKVAL($Record.status, 'New'). For more information, see Write an
Expression.
Example: Suppose that you want to surface recommendations on the Case object so your service agents can suggest offers to
your customers. If a case has been escalated, you want to offer a special discount. To do so you, create a load element that loads
the recommendations associated with your offer. Create a branch selector that only allows recommendations from the branch if
the case has an escalated status. Make your offer load element a child of the branch selector element. In Condition on the branch
selector element, use the following formula: ISPICKVAL($Record.status, 'Escalated').
Usage
Branch selector is an important element when you want to weed out entire branches at once. Unlike a filter element, it can’t filter based
on individual recommendations.
SEE ALSO:
Einstein Next Best Action
Create Recommendations
Display Recommendations
Formula Operators and Functions by Context
Unofficial SF: Adding $User and $Request to Next Best Action Strategies
682
Automate Your Business Processes Strategy Builder
Example: Let’s say you have five different types of credit card offers that could be surfaced to a single user. Although each offer
type is unique and must have its own branch, you only want to surface one type. To do so, filter all of your branches that contain
credit card offers through a first non-empty branch, in priority order from top to bottom. Your element only allows the first branch
that contains recommendations.
Usage
Branches are filtered through the first non-empty branch element in the order that they appear on the canvas, moving from top to
bottom. The element evaluates each branch until it finds one that contains recommendations. When the element recognizes that a
branch contains recommendations, it allows those recommendations through and blocks recommendations from all other branches.
SEE ALSO:
Einstein Next Best Action
Create Recommendations
Display Recommendations
Strategy Connections
Integrate external data and pull in information from other Salesforce systems to create robust
EDITIONS
strategies that utilize all your data.
Available in: both Salesforce
Create an Action Strategy Connection Classic and Lightning
Use Apex actions to integrate external data sources and information from your Salesforce org Experience
into your strategies. Available in: Essentials,
Professional, Enterprise,
SEE ALSO: Performance, Unlimited,
and Developer Editions
Connect REST API Developer Guide: Next Best Action Resources
Unofficial SF: Using Next Best Action with Salesforce Connect
683
Automate Your Business Processes Strategy Builder
USER PERMISSIONS
Note: API Name is set to Label with underscores replacing spaces by default.
Description
Specifies the description shown in the connection details.
Apex Action
Assigns the invocable action that runs when the connection is referenced in elements’ conditions.
684
Automate Your Business Processes Display Recommendations
Argument
Specifies one or more parameters that the selected invocable action requires. This textbox appears only when the action has
one or more arguments.
SEE ALSO:
Strategy Builder
Unofficial SF: Reporting and Tracking with Next Best Action
Unofficial SF: Using Next Best Action with Salesforce Connect
Display Recommendations
After creating a strategy, choose a page to run your strategy and display your recommendations.
EDITIONS
You can use a Lightning record page, an app’s home page, an Experience Cloud site page, a
Visualforce page, or an external site, depending on where you want recommendations to appear. Available in: both Salesforce
Lightning Page (Lightning App Builder) Classic and Lightning
Experience
1. In Lightning App Builder, create, edit, or clone a record page.
2. Drag Einstein Next Best Action from the component list to the location on the page where Available in: Essentials,
you want to display it. Professional, Enterprise,
Performance, Unlimited,
3. Choose an action strategy and the number of recommendations that you want the and Developer Editions
component to display.
Note: If you want to show users flows and quick actions in addition to recommendations,
use the Actions & Recommendations component on your Lightning record page. You
can create an Actions & Recommendations deployment that specifies action strategies
and how you want your recommendations to appear.
An App’s Home Page
1. Create a strategy for the Next Best Action component. Use global variables such as $User.Id when you create the strategy. Use
global variables because the home page isn’t a record page and isn’t associated with objects, like Case, Account, or Product.
2. Navigate to your org’s Home page.
3. Click , and select Edit Page.
4. From the list of Lightning components on the left (1), drag the Einstein Next Best Action component to the home page (2).
685
Automate Your Business Processes Display Recommendations
SEE ALSO:
Suggested Actions
Salesforce Flow for Service and the Actions & Recommendations Component
Lightning Aura Components Developer Guide: Add Aura Components to Any App with Lightning Out (Beta)
Unofficial SF: Triggering a Refresh of the Next Best Action Component
Unofficial SF: Building Your Own Next Best Action Front End
Unofficial SF: Using the NBA Component in a Visualforce Page
686
Automate Your Business Processes Display Recommendations
Title
Displays the title for the component on the Record page.
Hide Einstein Header
Hides the Einstein Recommendations graphical header.
Strategy
Displays all available strategies created in Strategy Builder.
Maximum Recommendations Displayed
Displays up to four recommendations.
Hide Empty Component
Displays the component only when there are recommendations available initially.
Launch Recommended Action In
Specifies whether recommendations open in a display window or a new browser window.
Show Image
Shows images associated with each displayed recommendation. If there isn’t an image, a placeholder displays.
Show Description
Displays the recommendation descriptions.
Show Reject Option
Displays the reject option.
Set Component Visibility
Allows Dynamic Lightning Pages by adding filter conditions and logic to the component properties in the Lightning App Builder.
Example: Here’s how a strategy looks with the Einstein header and no images in the Service console:
687
Automate Your Business Processes Report On and Track a Recommendation
SEE ALSO:
Unofficial SF: Passing Data from Next Best Action to Flow
688
Automate Your Business Processes Report On and Track a Recommendation
6. Let users know that they can create reports using these custom report types.
7. Users can also create dashboards from the custom report type.
SEE ALSO:
Create a Custom Report Type
Connect REST API Developer Guide: Recommendation Reaction
689
Automate Your Business Processes Perform Automated Actions
Task Actions
Task actions determine the details of an assignment given to a specified user by an automated
EDITIONS
process. You can associate task actions with workflow rules, approval processes, or entitlement
processes. Available in: Lightning
Important: Where possible, we changed noninclusive terms to align with our company Experience and Salesforce
Classic
value of Equality. We maintained certain terms to avoid any effect on customer
implementations. Available in: Enterprise,
From Setup, enter Tasks in the Quick Find box, and select Tasks. Then use these settings Performance, Unlimited,
to configure your task. and Developer Editions
Field Description
Object Select an object for your task. Remember, tasks can only be associated with workflow
rules or approval processes for the same object type. Choose an object that tracks
activities.
690
Automate Your Business Processes Task Actions
Field Description
Assigned to Select an assignee for your task. An assignee can be in the form of a user, role, record owner, record creator, opportunity
team role, or account team role, depending on the type of record you chose.
Note:
• If the assignee of a task is set to the record owner and the owner of a lead or case is a queue, the task is
assigned to the person who triggered the rule.
• If a custom object has a master-detail relationship with a standard object, the owner of the custom object
record is automatically set to the owner of the master standard object record. For example, if a custom
object called “Expenses” has a master-detail relationship with Accounts, the owner of each expense record
is the owner of the account for the expense.
• If the assignee of a workflow task is a role and more than one user belongs to that role, the record owner
becomes the task assignee, regardless of their role. We recommend that you don’t assign tasks to roles
with multiple users. Assigning tasks to roles with one user allows you to easily change the user in that
role without modifying the workflow rule. If the assignee of a workflow task is a role and that role is empty,
the record owner becomes the task assignee, regardless of their role.
• When a lead is converted by someone who isn't the lead owner, all workflow tasks associated with the
lead that are assigned to that user, except email alerts, are reassigned to the lead owner. Workflow tasks
assigned to users other than the lead owner and lead converter aren't changed.
Subject Enter a subject for the task. Distinguish automated tasks from user-created ones by starting the subject with a specific
notation, such as adding (Automated) at the end.
Unique Name Enter a unique name to refer to this component in the API. The requirement for uniqueness is only within the selected
object type. You can have actions of the same type with the same unique name, provided they are defined for
different objects.
The Unique Name field can contain only underscores and alphanumeric characters. It must be unique within the
selected object type, begin with a letter, not include spaces, not end with an underscore, and not contain two
consecutive underscores.
Due Date Choose a due date for the task. Due dates appear in the time zone of the assignee.
Configuring a task’s Due Date to "Rule Trigger Date" sets time triggers and workflow task due dates based on the
date that the workflow time trigger’s action is executed. For example, if the task due date is "Rule Trigger Date plus
10 days" and the time trigger is executed on January 1, Salesforce sets the task due date to January 11.
You may notice that all your tasks include a Created By field. For tasks, this field contains the name of the person who saved the record
that triggered the rule to assign the task.
691
Automate Your Business Processes Email Alert Actions
Tasks don't trigger task-based workflow rules if they’re created automatically, such as by clicking the Send An Email button or by using
the Email to Salesforce BCC address field.
SEE ALSO:
Associate Actions with Workflow Rules or Approval Processes
Unique Enter a unique name to refer to this component in the API. The requirement for
Name uniqueness is only within the selected object type. You can have actions of the
same type with the same unique name, provided they’re defined in different
objects.The Unique Name field can contain only underscores and alphanumeric
characters. It must be unique within the selected object type, begin with a letter,
not include spaces, not end with an underscore, and not contain two consecutive
underscores.
Email Choose an email template. Insert merge fields to reference specific information
Template based on the record that triggers the email alert. For example, insert a merge field
for the opportunity.
Classic Email Templates
Except for {!ApprovalRequest.Comments}, approval merge fields named
{!ApprovalRequest.field_name} in email templates return values only
in approval assignment emails and email alerts for approval processes. When used
in other emails—including email alerts for workflow rules—the approval merge
fields return null.
692
Automate Your Business Processes Email Alert Actions
Field Description
The {!ApprovalRequest.Comments} merge field returns only the most recently entered comment in
emails for an approval step that requires unanimous approval from multiple approvers.
If available, select Protected Component to mark the alert as protected if it’s part of a Managed - Released package.
The Recipient merge field isn’t supported in either Classic or Lightning email templates used for workflows.
Lightning Email Templates
In Lightning email templates, merge fields are resolved for activity-enabled objects only, except Contact and Lead
merge fields. Activity-enabled objects appear in the Related Entity Type field on the email template record home.
Cross-object merge fields aren’t supported. The object specified in the Related Entity Type field must be the object
used in the template’s merge fields. For a workaround, see Cross-object Merge Fields Do Not Work in Email Templates.
There isn’t equivalent support for special merge fields in Classic email templates, such as {!this} or
{!$Setup.LabelName}.
UTF-8 encoding is used on all emails sent through email alerts.
Recipients Select who receives this email alert in the Available Recipients list and click Add.
If you change the object after selecting recipients, Salesforce clears the Selected Recipients list.
If your email recipient is a role and that role contains multiple people, Salesforce emails each person in that role.
If your email recipient is a record owner and the owner of the record is a queue, the queue email receives the email
alert. If the queue is set up so that email is sent to all members, queue members are notified as well. If no queue
email is specified, only queue members are notified.
Additional Emails Enter up to five more email addresses for recipients who aren’t Salesforce users, leads, or contacts.
From Email Either the default workflow user or a previously configured and verified organization-wide address. This field lets
Address you use a standard email address for your organization (such as support@company.com) instead of the default
From field, which is the email address of the person who updates the record.
If you select Make this the default From email address for this object's email alerts, this email address overrides
the From Email Address for all email alerts associated with that object. You can still customize individual email
alerts to use a different From Email Address. The From Email Address in a workflow email alert changes to the
current user when the email alert is installed by using a managed or unmanaged package. The From Email Address
doesn't change when using other types of deployment such as Metadata API or change sets.
Note: The daily allocation for emails sent through email alerts is 1,000 per standard Salesforce license per org—except for free
Developer Edition and trial orgs, where the daily workflow email allocation is 15. The overall org allocation is 2,000,000. This
allocation applies to emails sent through email alerts in workflow rules, approval processes, flows, processes, or REST API. Single
emails sent to external email addresses are also limited, and how those limits are enforced depends on when your org was created.
SEE ALSO:
Available Recipient Types for Email Alerts
Daily Allocations for Email Alerts
693
Automate Your Business Processes Email Alert Actions
Email Field An email address field on the selected object, such as the Email field on lead
records or custom email fields.
Note: When creating email alerts for campaign members, Email Field
refers to the email field on the lead or contact that the campaign member
is based on.
Opportunity All users assigned to a particular opportunity team role. This option appears
Team only when team selling is enabled.
The Opportunity Team option works only for email alerts configured for
opportunities. It doesn’t work for email alerts configured for child objects of
opportunities.
Portal Role and All users assigned to a particular portal role, plus all users in roles below that
Subordinates role.
694
Automate Your Business Processes Field Update Actions
Role and Internal All users assigned a particular role, plus all users in roles below that role, excluding partner portal and Customer
Subordinates Portal users.
Role and Subordinates All users assigned a particular role, plus all users in roles below that role.
Note: The Recipient merge field isn’t supported in either Classic or Lightning email templates used for workflows.
Important: Where possible, we changed noninclusive terms to align with our company Available in: Lightning
value of Equality. We maintained certain terms to avoid any effect on customer Experience and Salesforce
Classic
implementations.
From Setup, enter Field Updates in the Update box, and select Field Updates. Then use Available in: Enterprise,
these settings to configure your field update. Performance, Unlimited,
and Developer Editions
Before you begin, check the type of the field you want to update. Read-only fields like formula or
auto-number fields are not available for field updates.
Field Description
Name Enter a name for this field update.
Unique Name Enter a unique name to refer to this component in the API. The requirement for uniqueness is only within the
selected object type. You can have field updates of the same type with the same unique name, provided they
are defined in different objects. The Unique Name field can contain only underscores and alphanumeric
characters. It must be unique within the selected object type, begin with a letter, not include spaces, not end
with an underscore, and not contain two consecutive underscores.
695
Automate Your Business Processes Field Update Actions
Field Description
Field to Update Select the field to update. Fields are shown only for the object that you selected. You can select a field on a
related object in a master-detail relationship.
You can use field updates on encrypted custom fields, but the encrypted field isn't available in the formula
editor.
Tip: Avoid associating more than one field update with a rule or approval process that applies different
values to the same field.
Re-evaluate Workflow Select if you want workflow rules on this object to be re-evaluated after the field value is updated. If you select
Rules After Field this option, Salesforce re-evaluates all workflow rules on the object if the field update results in a change to
Change the value of the field, triggering any workflow rules whose criteria are met. For more information, see Field
Updates That Re-evaluate Workflow Rules on page 707.
Specify New Field The value that the field should be updated with. The available options depend on the type of field you are
Value updating. For more information, see Value Options for Field Update Actions on page 696 .
SEE ALSO:
Associate Actions with Workflow Rules or Approval Processes
Cross-Object Field Updates
Considerations for Field Update Actions
696
Automate Your Business Processes Outbound Message Actions
Unique Name Enter a unique name to refer to this component in the API. The requirement for
uniqueness is only within the selected object type. You can have outbound
messages with the same unique name, provided they’re defined for different
objects.
The Unique Name field can contain only underscores and alphanumeric
characters. It must be unique within the selected object type, begin with a letter,
not include spaces, not end with an underscore, and not contain two consecutive
underscores.
Description Enter a description that makes it easy for other users to tell what the outbound
message does.
Endpoint URL Enter an endpoint URL for the recipient of the message. Salesforce sends a SOAP
message to this endpoint.
User to send as Select the Salesforce user to use when sending the message. The chosen user
controls data visibility for the message that is sent to the endpoint
Send Session ID To include the Salesforce session ID in the outbound message, select Send
Session ID. Include the session ID in your message if you intend to make API
calls and you don’t want to include a username and password. Never send a
username and password in an unencrypted message, especially in a production
environment. It isn’t secure.
When you select Send Session ID, only HTTPS is supported for the endpoint
URL to ensure secure transmission of the session ID. For managed and
unmanaged packages created before Spring ’19 with this option but without
an HTTPS endpoint, subscribers can still install them. Starting in Spring ’19, you
can’t create packages with insecure outbound message options.
697
Automate Your Business Processes Outbound Message Actions
Field Description
Object fields to Select the fields to include in the outbound message, and click Add.
send
If your endpoint URL uses a client certificate, see Import a Client Certificate for Your Endpoint URL on page 707.
SEE ALSO:
Track the Delivery Status of an Outbound Message
Considerations for Outbound Messages
SOAP API Developer Guide
Associate Actions with Workflow Rules or Approval Processes
Considerations for Outbound Messages
698
Automate Your Business Processes Outbound Message Actions
To create an outbound
message notification:
• Modify All Data
USER PERMISSIONS
699
Automate Your Business Processes Outbound Message Actions
700
Automate Your Business Processes Define a Flow Trigger for Workflow (Pilot)
Field Description
Name Name of the flow trigger.
Unique Name Enter a unique name to refer to this component in the API. The Unique Name field can contain
only underscores and alphanumeric characters. It must be unique within the selected object type,
begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive
underscores.
Flow Unique name of the autolaunched flow that this workflow action launches.
Set Flow Variables Whether to pass values into the flow’s variables.
5. If you select Set Flow Variables, specify their names and values.
Click Set Another Value to set up to 25 variables.
Field Description
Name Select the name of the flow variable.
Only variables that allow input access can be selected.
701
Automate Your Business Processes Define a Flow Trigger for Workflow (Pilot)
Field Description
Value For a flow variable, you can:
• Enter a literal value.
• Click , select a field, and click Insert.
For a record variable, you can:
• Click , select a record, and click Insert.
To help you distinguish between records and fields, all record options are marked with an
asterisk (*) and appear at the top of each list.
• Enter {!this} to use the current values of the record that was created or edited to cause
the workflow rule to fire.
• Enter {!old} to use the most recent previous values of the record that was edited to cause
the workflow rule to fire.
In other words, {!old} identifies the same record as {!this} but uses the record’s values
from immediately before it was edited to cause the workflow rule to fire.
Note:
• If the record was newly created, {!old} is null.
• Unlike {!this}, {!old} can’t be selected by clicking . Manually enter
{!old} in the Value column.
6. To put the flow trigger in test mode, select Administrators run the latest flow version.
When selected and an admin triggers the workflow rule, the flow trigger launches the latest version of the flow. For all other users,
the flow trigger always launches the active version of the flow.
The same values are passed into the flow variables whether the flow trigger launches the active or latest flow version.
7. Click Save.
Don’t forget to associate the flow trigger to a workflow rule.
SEE ALSO:
Flow Trigger Considerations (Pilot)
702
Automate Your Business Processes Considerations for Automated Actions
SEE ALSO:
Daily Allocations for Email Alerts
• Field updates occur after case assignment, lead assignment, and auto-response rules.
• Field updates function independently of field-level security. Therefore, a workflow rule can update fields even though they are hidden
on the user's page layout.
• The result of a field update is unpredictable when a single workflow rule includes multiple field updates that apply different values
to the same field.
• Field updates may affect the information in a related list. For example, if a field such as the Amount or Close Date of an
opportunity is set to be updated, it will affect the Stage History related list on opportunities.
• If a user gets a field update error when saving a record, you can use the debug log to see which field update failed. The debug log
stops when a failure occurs.
• For reminder fields on tasks and events:
– Field updates can set the reminder for a task or event but they can't use the due date of a task or the scheduled time of an event.
– Formulas for date/time values are calculated in days. Divide the value by 1440—the number of minutes in a day—to express
the value in minutes. For example, the formula Now()-7 means seven days ago, while Now()-7/1440 means seven
minutes ago.
• If your organization uses multiple currencies, currency fields are updated using the record's currency. If you choose to update a field
based on a formula, any values in your formula are interpreted in the currency of the record.
• Field updates are tracked in the History related list if you have set history tracking on those fields.
703
Automate Your Business Processes Considerations for Automated Actions
• Workflow rules and some processes can invalidate previously valid fields. Invalidation occurs because updates to records based on
workflow rules and also on process scheduled actions don’t trigger validation rules.
• If you have person accounts enabled, you can use the Is Person Account field as part of the evaluation criteria for workflow
rules. However, because the Is Person Account field is read-only, any field updates set up to modify it will fail.
704
Automate Your Business Processes Considerations for Automated Actions
• Email message workflow rules can only be associated with field updates.
• If a field update references a specific user, you can't deactivate that user. For example, if your field update is designed to change the
owner of a record to Bob Smith, change the field update before deactivating Bob Smith.
• You can update long text area fields, but the option to insert A specific value restricts you to entering up to the maximum
amount of characters allowed in the destination field.
• You can't make a field universally required if it's used by a field update that sets the field to a blank value.
• Workflow rules that update owners don’t also transfer associated items. To ensure transfer, click Change next to the owner’s name
in a record and make your transfer selections.
SEE ALSO:
Cross-Object Field Updates
705
Automate Your Business Processes Considerations for Automated Actions
Tip: To create workflow rules so that case comments or emails automatically update fields on associated cases, select Case
Comment or Email Message in the Object drop-down list when creating a new workflow rule and select Casein the Field
706
Automate Your Business Processes Considerations for Automated Actions
to Update list. Email-to-Case or On-Demand Email-to-Case must be enabled for your organization to use the Email Message
in a workflow rule.
Note: Cross-object field updates to a parent opportunity's Amount and Quantity fields only work if the opportunity has
no opportunity products associated with it.
• Opportunity updating Account—Supported for both business accounts and person accounts.
Note: If you have workflow rules on converted leads and want to use cross-object field updates on the resulting accounts and
opportunities, you must enable the lead setting Require Validation for Converted Leads.
Standard-to-standard cross-object field update actions:
• Can’t be used in, or assigned to, approval processes.
• Update a parent record even if the user doesn’t have edit access to it.
Note: If you have Apex code that updates parent fields in the same relationships as a cross-object field update action, consider
replacing your code with cross-object field updates. Otherwise, both will fire, and since workflow rules run after Apex triggers, the
workflow field update will override any change made by your Apex code.
SEE ALSO:
Considerations for Field Update Actions
Object Relationships Overview
707
Automate Your Business Processes Considerations for Automated Actions
– The reevaluated workflow rule’s immediate actions cause the record to no longer meet the workflow rule criteria.
– An Apex after trigger that is executed as a result of a workflow or approvals action causes the record to no longer meet the
workflow rule criteria.
SEE ALSO:
Considerations for Field Update Actions
• If the endpoint is unavailable, messages stay in the queue until sent successfully or until they
are 24 hours old. After 24 hours, messages are dropped from the queue.
• If a message can't be delivered, the interval between retries increases exponentially, up to a maximum of two hours between retries.
• Messages are retried independent of their order in the queue. This might result in messages being delivered out of order.
• You can't build an audit trail using outbound messages. While each message should be delivered at least once, it might be delivered
more than once. Also, it might not be delivered at all if delivery cannot be done within 24 hours. Finally, as noted above, the source
object might change after a notification is sent but before it is delivered, so the endpoint will only receive the latest data, not any
intermediate changes.
708
Automate Your Business Processes Considerations for Automated Actions
• If a flow trigger fails at run time, the user who created or edited the record to meet the workflow rule criteria won’t be able to save
the record. To troubleshoot run time issues, see the flow action events in the Workflow category of debug logs, which show the
flow version and the values passed into flow variables.
• A flow trigger can set the values of up to 25 variables in the flow, with the following limitations.
– Flow triggers can’t use multi-select picklist fields to set flow variables.
– When a flow trigger uses a currency field to set a flow variable, only the amount is passed into the flow. Any currency ISO code
or locale information is ignored. If your organization uses multiple currencies, the flow trigger uses the amount in the currency
of the record that contains the specified currency field.
– Flow triggers can’t pass values into record collection variables in flows.
• Always keep one version of the flow active if it’s referenced by an active workflow rule’s flow trigger.
• Once you activate a workflow rule using the flow trigger, don’t modify or add a version of the flow to include screens or other
elements that would violate the run restrictions for an autolaunched flow. If you modify a flow to no longer be autolaunched, it can’t
be launched by flow triggers. To work around this situation, you can save the non-autolaunched flow as a new flow and change the
new flow to become autolaunched. Then update the flow triggers to launch the new flow.
• Flow triggers aren’t available as time-dependent workflow actions. You can add flow triggers to workflow rules only as immediate
workflow actions.
• When the system executes a workflow rule with multiple flow triggers, those flows aren’t run in any particular order.
• In a transaction, flow triggers are executed after all workflow field updates, including any Apex triggers and standard validations that
are executed as a result of those workflow field updates. After executing flow triggers, the system executes escalation rules.
• Flows that are launched from workflow rules are governed by the per-transaction limits already enforced by Apex.
• When flows are launched from workflow rules that are triggered by bulk loads or imports, the flows’ data manipulation language
(DML) operations are executed in bulk to reduce the number of calls required and to optimize system performance. The execution
of any of the following flow elements qualifies as a DML operation: Create Records, Update Records, or Delete Records.
For example, suppose that you use Data Loader or the Bulk API to update 50 records, and those updates meet the criteria of a
workflow rule with a flow trigger action. In response, the system executes 50 instances of the flow within the same transaction. Each
instance of a running flow is called an interview. The system attempts to execute each DML operation across all the interviews in
the transaction at the same time. Suppose that five of those interviews are executing the same branch of the flow, which has an
Update Records element called “SetEntitlement.” The system waits for all five interviews to reach that element, and then executes
all five record updates in bulk.
709
Automate Your Business Processes Modify Process Automation Settings
• Control What Happens When a Flow Tries to Set Values for Read-Only Fields
• Control Who Receives Flow and Process Error Emails
• Deploy Processes and Flows as Active
710
INDEX
711