Site icon UnofficialSF

Summer ’21 Flow Preview

Always a pleasure to divulge the next functionality that will be available to Flow users and builders!

Scheduled Paths in Record-Triggered Flows

The ability to schedule delayed activity that keys off of an initial trigger, known as Scheduled Actions in Process Builder, comes to Flow in the form of Scheduled Paths.

To create a Scheduled Path, you can now use either Autolayout or Freeform mode, but you need to get everything lined up properly:

Multicolumn Screens are now Generally Available

Each section can be divided into up to 4 columns, and its visibility can be controlled dynamically. 

Built on SLDS, sections are responsive by default. In small mobile devices, they stack vertically.

Customers can use sections to create multicolumn layouts on their screens, and then embed whatever screen components they like in those components. Or they can use a section to apply the same visibility rule to a group of components.

Automatic Fields

This is the initial beta of a feature that may have as big an impact as Multicolumn Screens. You are now able to start dragging object fields onto screens. You will always be able to drag a rich set of components onto the Screen, but we wanted to provide an automatic way to simply pick an object and grab its fields.

The initial Beta only support some of the basic field types, and it requires the presence of a record variable. Create or use an existing manual variable or reference an upstream output. If you want to use these fields to create new records, provide a manual variable and later pass it to a Create Records element.

In future releases, we’ll support picklists, lookups, compound fields like Name and other field types. We’ll also add automatic output handling so you can more easily support ‘New Record’ use cases: You’ll be able to drag fields onto a screen and have them automatically grouped for subsequent Create Records calls.

232 Supported Data Types
Checkbox
Text
Date
Date/Time
Number
Text Area
Text Area (Long)

Choiceapalooza Enhancements

Choiceapalooza is the internal project name for a large list of improvements that make it easier to work with choices and choice questions. In Summer ’21, these changes are in effect:

Customizable Default Values

Previously, the only way to set preselect an option for a choice component was to use a static choice resource. There was no elegant option if you wanted to select a default from a picklist or record choice set.

Now, you can select an upstream flow resource or manually enter a value that should be selected by default.

Matching Rules

Rule 1:

IF

Default Value is a static choice

AND

that static choice is included in the list of choice options for the component

——

THEN

At run time, we preselect choice options by matching the choice option’s API name.

Rule 2

IF 

Default Value is a static choice

AND

that static choice is NOT included in the list of choice options for the component

——

THEN

At run time, we resolve the Value of the Default Value choice, and preselect any of the choice options whose value matches.

Rule 3

IF 

Default Value is not a choice. 

——

THEN

At run time, we resolve the reference in Default Value, and preselect any of the choice options whose value matches.

Rule 4 (Multiselect)

IF 

Default Value resolves to a value with semicolons included.

AND

You’re using a multi-select component.

——

THEN

At run time, we treat that value as multiple defaults, and we preselect any of the choice options whose value matches any of the strings between the semi-colons. 

* Caution: Make sure none of the values in your choice options have semicolons in their value. For record choice sets, we recommend setting Value to the record ID.

Improved Picklist Requirement Control

Admins can now control whether a picklist is required or not. This comes in the form of two enhancements: 

Previously, picklists were always required, and if no default was provided, the first option in the list was selected. Which meant the picklist was required but an option was selected for the user. 

* To get this behavior, upgrade your flow’s API Version for Running the Flow to 52.

Switch Components Without Starting Over

From the property editor of an existing choice component, change how the choice options are displayed at runtime by changing the compone type.


Improved Component Preview

Many more standard components now preview in the canvas when you’re building a screen in Flow Builder. 

How It Works

We attempt preview if all required attributes have values set.

The Address component has no required attributes, so it immediately previews. 

Because the flow isn’t running, we can’t resolve references. If an attribute has a reference instead of a manually-entered attribute, like {!myVar}, we don’t pass that value into the preview. Those attributes are ignored. This means that if a required attribute is set to a reference, we don’t attempt preview.

Detect Conditional Visibility

In Flow Builder, we now identify which components have conditional visibility applied by: 

New Sort Collection Element

A new element has joined Flow Builder! With the Collection Sort element, you can reorder the items in a collection variable. You can sort a collection of values, a collection of records, or an Apex-Defined collection. You can also limit the number of items that remain in the collection variable after the sort.

With the Collection Sort element, you can reorder the items in a collection variable. You can sort a collection of values, a collection of records, or an Apex-Defined collection. You can also limit the number of items that remain in the collection variable after the sort.

Select a collection variable (1). If it’s a record collection variable or an Apex-defined collection variable, enter the field to sort the collection in Sort By (2). Click Add Sort Option (3) to add up to two additional sorting fields. If the collection variable contains a single list of values, Flow Builder automatically sets and hides the Sort By field.

All text-based fields, including picklists, are sorted alphabetically. Boolean fields are sorted as false first if Sort Order is set to Ascending, or sorted as true first if it’s set to Descending.

Mulesoft Actions for Flow and Bots (Developer Preview)

Import your MuleSoft Anypoint Platform APIs in a few clicks with External Services Enhancements for MuleSoft. Select your MuleSoft Name Credentials and let Salesforce do the heavy lifting of importing your endpoints and converting them into actions immediately available in Flow Builder.

Developer Tools: Access Errors from Custom Flow Components

As part of the existing onStatusChange action, developers can now access an errors object that includes both error messages and error codes.

Developers can add code in their wrapper that reacts to particular errors in a flow. For example, when the running user doesn’t have access (error code FLOW_ACCESS_RESTRICTED), hide the flow component.

Flow Orchestrator (Pilot)

Orchestrator is the biggest thing Salesforce Automation has done in many years. The pilot will get a post of its own.

Among the powerful things that can be built on Orchestrator: Approval Processes. Here’s a simple two stage approval process implemented with just a few clicks:

Points of note:

Each step is assigned to specific workers

Each Work Step has an associated screen flow that gets run by the workers after they get notified. Orchestrator will be a paid product but licensing and pricing won’t be announced for some time.

Join the pilot by asking your Account Executive. (This is a Salesforce policy, unfortunately. If you don’t have an AE, you’ll have to wait a little longer, but beta will be coming in September).

Next Best Action Flows (Pilot)

Our existing Next Best Action decisioning service is being extended to run on the Flow engine. This allows NBA strategies to be built in Flow Builder as flows, providing powerful platform features such as Templates, Versioning, Packaging 2.0 support, Sub Strategies, Debugging enhancements. Flow Builder will be home to low code AI driven Recommendation, OOTB Reporting and analytics and other cutting edge decisioning elements.

Support for ISCHANGED, ISNEW, and PRIORVALUE

We continue to march down the list of Process Builder features and implement them in Flow Builder.

Record-triggered flows for new and updated records now support the ISCHANGEDISNEW, and PRIORVALUE formula functions. You can copy your Process Builder or workflow rules formulas containing these functions into record-triggered flows. When copying formulas containing ISCHANGED and PRIORVALUE from Process Builder into record-triggered flows, use the $Record global variable instead of the object. For example, to use ISCHANGED(account.x) in a record-triggered flow formula, change it to ISCHANGED($Record.x). The ISNEW formula function requires no changes because it has no parameters.

You can also use the new Is Changed operator in your condition logic for Start elements and Decision elements in record-triggered flows. With the Is Changed operator, you can define conditions that check whether certain field values on the record have changed in the current transaction. If the conditions are met in the Start element, the flow is triggered to run. If the conditions are met in the Decision element, the flow executes the outcome in the flow path.

The Is Changed operator isn’t available for flows that are triggered when a record is created or deleted. When you edit the Start element and configure the trigger, select the A record is updated or the A record is created or updated option for when the flow is triggered, and select the After the record is saved option for when the flow runs. When you set up the condition for the object, use the Is Changed operator with fields of the selected object. If the condition with the Is Changed operator is True, then the flow is triggered to run when the field value is changed. If the condition is False, then the flow is triggered to run when the field value is not changed.

Salesforce Flow Accessibility Enhancements

This release, accessibility enhancements are centered on focus management when users attempt to navigate to another screen. If there’s an error on the current flow screen, the focus is set to the first field with an error. If there aren’t any errors on the current flow screen, using Previous or Next displays the appropriate screen and the focus is set to its first focusable field. Also, screen readers are now able to read labels associated with more components, including Currency, Multi-Select Picklist, Name, Number, Picklist, Radio Buttons, and URL.

Autolayout Canvas is 5x Larger

We increased the auto-layout canvas limits, so you can stretch out your flows and avoid errors for exceeding canvas limits. The new canvas is over five times larger, designed to accommodate your largest flows. Give it a try by converting your largest flow to Auto-Layout!

Faster Field Updates in Record-Change Triggered Flows

We’ve enhanced the Update Records element for record-triggered flows. A new option lets you directly update the record that triggered the flow. Instead of a Decision element, you can use the Update Records element to set filter criteria for the triggering record. The Update Records element only displays fields you can update, and it’s available in all record-triggered flows. These changes mean you can now easily switch between record-triggered flows that run before or after the record is saved.

Before this release, the Update Records element was only available in record-triggered flows that ran after a record was saved. In record-triggered flows that ran after the record was saved, you used the Update Records element to query for the record that triggered the flow. But if you wanted to change that flow to occur before the record was saved, you couldn’t use the Update Records element. You had to use Decision elements to do conditional updates and the Assignment element to set field values. 

Add an Update Records element to your record-triggered flow. While all three options for How to Find Records to Update and Set Their Values are displayed, only the first option is selectable for before-save record-triggered flows. In this example, we’re setting up a before-save record-triggered flow for accounts.

When using the first option, you can only update fields on the record that triggered the flow. To update fields on related records in after-save record-triggered flows, select one of the other options.

Note: To use the Is Changed operator in a flow triggered when a record is updated, set condition requirements in the Start element.

Debugging Improvements : Debug Record-Triggered Flows

You can now debug Record-Triggered Flows.

Debugging Improvements : Find Failed Interviews Faster

The Debugging team continues to hammer out new improvements, starting with a list view that shows failed flow executions (interviews).

Failed flow interviews for these flow types are saved and available to open in Flow Builder from the Failed Flow Interviews list view.

When you select list view filters for Interview Status in Classic, you see Running, Paused, Completed, and Error values. Only flow interviews that have the interview status of Paused or Error can appear in the list view. The Paused Flow Interviews component shows the Paused or Failed Date column, but the component shows only paused flow interviews.

From Setup, enter flow in Quick Find box, and then select Paused and Failed Flow Interviews. The default list view is Paused Flow Interviews.

Debugging Improvements: Debug Flows that have Pauses

Now you can continue to debug a flow even after a Pause element is executed. If the pause conditions are met, you can choose a pause configuration that resumes the flow. Only pause configurations that run when a specific time occurs are supported. Previously, you couldn’t resume a flow after a Pause element when you debugged a flow in Flow Builder.

Debugger Improvements: View Transaction Changes

Schedule-triggered flows and autolaunched flows that have no triggers can now show debug details for transactions that are committed or that are rolled back due to an error. If a flow fails, you can debug the flow to see whether record changes were permanently saved to the database via committed transactions before the failure.  

Debugger Improvements: Debug Visually in Autolayout Mode

Considerations to keep in mind when you debug flows built in auto-layout:

Skip to toolbar