Salesforce Winter ’24 Release Flow Top New Features.
1. Create Custom Error Messages in Record-Triggered Flows
Use the new Custom Error Message element to create targeted error messages for your end users to explain what went wrong or how to correct it. The error messages display in a window on the overall record page or as an inline error on a specific field. The associated record change is rolled back. Error messages can be created for before-save and after-save flows. We delivered this feature thanks to your ideas on IdeaExchange.
When a user performs an action like deleting a record that triggers a flow, sometimes the flow runs into an error. Before, when the flow failed, it wasn’t possible to display a specific error message to the user. Now you can inform the user exactly what caused their operation to fail, so they can fix the problem and try again.
Add a Custom Error Message element (1), choose where to display the error message (2), and enter the error message text (3).
2. Save a Flow Without Configuring Some Elements
Now you can configure flows faster by saving flows before some elements are fully configured. With this update, Flow builder is taking its first steps to support saving a draft of a flow at any point in the building process. Errors that previously prevented saving are now just warnings. You can save flows without fully configuring the Start elements in record-triggered flows and Create Records elements in all flows. To facilitate this change, some element properties windows now slide open next to the flow in the canvas. With the element properties window update, you can see and interact with your flow while you configure the element. Previously, all element properties windows blocked the view of the flow while open. The cancel button functionality in the element properties window has been replaced with the ability to undo changes one at a time with the undo button.
In Flow Builder, open a Start, Create Records, Delete Records, Get Records, Update Records, or Pause element. Or edit an existing Action or Subflow element. Reposition the flow by clicking and dragging the canvas. Also, see the element you’re working on in the context of the flow (1). To keep your changes, hide the window, and return to the canvas, click (2). To undo changes one at a time, click (3). Identify elements that haven’t been fully configured (4). Save your work before fully configuring Start elements in record-triggered flows and Create Records elements (5). Move from one updated element to another without completing the element’s configuration.
3. Build Screen Flows with Reactive Components (Generally Available)
Reduce the number of screens that your users click through, and build screens that feel like single-page applications with reactive flow screen components. Configure supported standard components or custom Lightning web components to react to changes in other components on the same screen in real time. For example, create a Data Table component that lists Opportunity records. On the same screen, add a Radio Buttons component, and set the default value of the component to the stage of the first Opportunity that the user selects. Previously, if you needed a component to react to changes in another component, you placed the components on separate screens.
- Build Screen Flows with Reactive Global Variables
Save time by referencing global variables in reactive formulas on flow screens. And use custom labels in reactive formulas to display translatable text to your users. For example, if you create a custom setting called DiscountPercentage, which specifies org, profile, and user discount percentages, you can reference the variable in reactive formulas across a screen flow. The screen flow applies the correct discount value for the user running the flow and recalculates the value as the user makes changes. Previously, reactive formulas didn’t support global variables. - Build Screen Flows with Reactive Selections
Use choice components to respond to user selections elsewhere on the same screen. For example, if you have a flow screen that lists opportunities in a Data Table, you can include a reactive Choice Lookup component that specifies an opportunity stage. As the user selects and deselects opportunities, the value of the Choice Lookup component changes to reflect the selected opportunity’s stage. Or let’s say you have a flow screen used for returning merchandise. Create a Picklist component with reasons for the return such as Don’t Want, and add a Radio Buttons component to automatically select how the customer funds are returned, for example, Store Credit. - Use More Formula Functions in Reactive Screens
If your flows run on API version 59.0 or later, you can now configure a flow screen component to perform real-time logic with the SUBSTITUTE, ADDMONTHS, and ^ formula functions. When the flow detects a change to a value referenced in the formula, it immediately recalculates and updates the value of the corresponding screen component. Previously, these formulas didn’t react to changes elsewhere in the flow until the user navigated to a different screen. - React to Changes on the Same Screen Using Display Text Components (Beta)
Configure a Display Text component to react to changes in other components on the same screen. For example, you have a Currency component, where a user enters the wholesale cost of an item, and a Display Text component that shows the retail price of the item, which is three times the wholesale price. Each time the user updates the wholesale cost, the flow updates the displayed retail cost. - Reactive Components Update the First Time a Screen Loads
A flow now updates the value of a field when the screen loads if the field is configured to react to changes in another field on the same screen. If you navigate to a previous or later screen and then return to the current screen, the flow doesn’t update the reactive components again. Previously, fields didn’t update unless the user performed an additional action, such as changing a value in a field. This change applies only to flows that are running on API version 59.0 or later. - Inform Screen Reader Users of Reactive Changes on a Flow Screen
Upgrade your flows to run on API version 59.0 or later to let screen reader users know when flow screen components change due to their actions on other components on the same screen. For example, if a user changes a field on a screen that results in a component on the screen becoming visible, the screen reader announces, “Due to your recent changes, the content on the screen has changed.”
4. Transform Your Data in Flows (Beta)
Transform collections of data between flow resources with the new Transform element in Flow Builder. Combined with the Action element that makes an HTTP callout, you can build a flow that fully integrates data outside Salesforce with no code. Previously, you built a flow that included the Loop element and the Assignment element. Now you can do it all with the Transform element when transforming data in screen flows, autolaunched flows with no triggers, and record-triggered flows.
Here’s an example screen flow for a sales agent who returns two orders for store credit. The agent’s customer has an account in Salesforce. The customer’s order data is stored in a system outside Salesforce. To update the Order record in Salesforce, the flow gets the latest order data from the external system and transforms the data, so the flow can save the changes in Salesforce.
The Transform element maps the amount, customerId, and status fields from the source data to the fields for the target data. Based on the mappings, the Transform element automatically creates a dotted line to identify the collections that contain the mapped fields, so you can view the identified collections in both resource data structures more easily. An item in a source collection must be mapped to an item in a target collection, where both collections are at the same hierarchical location in their respective resource. For example, the 2XX collection and the Order collection are the first collections in their respective resources. The source data shows only one resource.
The mapping between the source data’s amount field and the target data’s Amount__c field uses a formula to transform the data.
The formula subtracts a fixed amount from the source data’s amount field for a restocking fee. The result of the formula is the transformed value for the target data’s Amount__c field. The formula shows the new merge field syntax, where [$EachItem] represents each item in a collection. In this example, the merge field references a collection of 2XX, and each 2XX item has an amount field. For each amount field, the formula subtracts 5. A formula expression must reference the source data.
NOTE A source or target data field can reference up to 2 collections, for example: {!Orders[$EachItem].Customers[$EachItem].Name}
Next in the flow, the Update Records element saves the changes to the database. And finally, the Action element makes another HTTP callout to update the order status in the external system.
When debugging the Transform element in an autolaunched flow with no trigger or a record-triggered flow, you can now work with the source and target data in a rich and interactive format.
5. Create Autolaunched Flows Based on Data Changes in Data Cloud
You can now start a Data Cloud-Triggered Flow based on changes in a data model object or calculated insight object. For example, you can update a Unified Individual’s loyalty status based on changes to their loyalty balance.
From Setup, in the Quick Find box, enter Flow, and then select Flows. Click New Flow, and then select Data Cloud-Triggered Flow.
In the flow’s Start element, select the data space, the object, and define the conditions that trigger the flow.
6. Screen Flow Components Retain Values After State Changes
Screen flows now retain values when a user resumes a paused flow, experiences an input validation error, or returns to an earlier screen. Previously, if you didn’t provide a default value when you configured the Name, Address, Data Table, Email, or other components, the flow removed user-specified values when these events occurred.
7. Refresh Values Between Screens for More Components
You can now refresh the values of choice, Date, Date & Time, Number, Currency, Text, and Long Text Area components when a user navigates to a previous screen and then forward again. For example, a user enters the cost of three services on the first screen. When the user navigates to the next screen, the screen flow displays the total cost. If the user returns to the first screen and changes a value, you can refresh the total cost on the next screen or leave it unchanged. However, if a user navigates to a previous or later screen and then returns to the current screen a second time, the flow doesn’t update the reactive components again.
Drag a component to a screen. In the component’s properties pane, under Advanced, select an option for Revisited Screen Values.
8. Get Data Cloud Records More Easily in Flow Builder
Salesforce objects and Data Cloud objects are now organized into separate sections in Flow Builder. When you select a Data Cloud object, an object card provides more details.
In the Get Records element, select whether to get records from a Data Cloud object or a Salesforce object, and then select the object.
9. Find Flow Resources More Easily in Create Records Elements
Now it’s easier to find and select a record or record collection in Create Records elements in Auto-Layout. With this update, Flow Builder takes the first step toward an improved resource selection experience.
In a Create Records element, select Use all values from a record. Then, click in the Record or Record Collection field. Identify where you are in your resource selection with a new clickable breadcrumb path (1). Recognize resource types quickly with more intuitive icons (2), and create a resource faster with the New Resource option that’s been moved to always show in the footer of the menu (3). Get helpful information about a resource without leaving the menu by hovering over the resource, then hovering over (4).
Easily identify menu items with their user-friendly labels (5) and descriptions (6).
Find screen components and their outputs faster by going to the screen where they appear, instead of searching the list of all screen components (7).
10. Control Execution of Orchestration Stages and Steps with Requirements
Each orchestration step uses a selected condition that determines when it can start. And each orchestration stage and interactive orchestration step uses a condition to determine its completion. Previously, when you had complex criteria, you created an evaluation flow to determine when a step can start or a stage or an interactive step can end. Now you can define up to 3 requirements in the Properties panel to control stage and step execution.
In the Properties panel for the stage, select When the specified requirements are met, the stage is marked Completed.
In the Properties panel for the step, select When the specified requirements are met, the step starts.
In the Properties panel for the interactive step, select When the specified requirements are met, the step is marked Completed.
After selecting the condition, define up to 3 requirements.
Which Salesforce Winter ’24 Flow new feature are you excited about the most? Please let us know in the comments!