Summer 18 Release – Lightning Flow Highlights

Salesforce released its latest features this summer of 2018.  I’ve gone through the 521 Pages release notes and providing you the summary of the features.  Heavily focused on Lightning, as usual, the norm in Salesforce releases now, I have split the highlights into 4 different posts: Lightning Experience Highlights, Development Highlights, Lightning App Builder Highlights, Lightning Flow Highlights.


Summer 18 – Lightning Experience Highlights

Summer 18 – Development Highlights

Summer 18 – Lightning App Builder Highlights


This post is about Lightning Flow Highlights.  

Flows in Essentials and Professional Editions

Everything you love about flows is now available in Essentials and Professional editions. With these editions, you can have up to five active flows.

Capture Date/Time Values in Flow Screens

Use the new Date/Time screen field type in the Cloud Flow Designer to capture times in the flows, such as when scheduling events or appointments. No Lightning components or other code required.

A flow at runtime that includes a date/time field. The focus is in the time portion of the date/time field, and a time picker is displayed.

Use Lightning Components as Flow Actions (GA)

Pull data from an on-premises or private cloud database directly into your flow without going through the Salesforce server. Or do things directly in the browser, such as open a particular URL or confirm that a record was created with a toast message. Local Action elements call the client-side controller of a Lightning component, which means you can integrate directly with the browser.

Example: Let’s say you have a flow that creates a case. At the end of the flow, you want the user to be redirected to the detail page of the created case. To do so, you create a Lightning component that uses the force:navigateToSObject event and use a Local Action element to add it to your flow.

When you create a Lightning component that implements the lightning:availableForFlowActions interface, the component appears in the Cloud Flow Designer’s palette under the Local Actions section.

Track Progress Through a Flow with Stages

Indicate a user’s point in the flow using the new stage resource and two new system variables: $Flow.ActiveStages and $Flow.CurrentStage

For example, the Online Purchase flow includes stages for users to review their cart, enter shipping details, enter payment details, and confirm the order. The stages display at runtime using a custom Lightning 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.

Lightning component displaying all active stages with a highlighted current stage

Update Active Stages and Collections with New Assignment Operators

Now you can easily remove specified items and truncate collections and active stages. You can count the number of collection items or active stages and store that number in a variable. You can add items to the beginning instead of only the end.

For example, to clear all active stages with an Assignment element, select the remove all operator, and enter the$Flow.ActiveStages system variable in both Variable and Value columns.

An assignment row that clears all active stages.

Take a look at all the assignment operators here

Launch Flows as Subtabs in Lightning Console Apps (GA)

Guide your users through multi-step processes with Lightning Guided Engagement and the Guided Action List component. Associate records to flows using Salesforce automation tools. When a record that has an associated flow is opened in a console app, the flow is launched as a subtab.

Debug Your Flows in Cloud Flow Designer

Cloud Flow Designer now offers a debug option to help you test and troubleshoot your flows. Easily set input variables, quickly restart flows, and view all the gory details of what’s happening in real time as your flow executes.

Cloud Flow Designer button bar
Set the debug options and input variables. Then click Run.
Debugging options and input variables

Note that debugging a flow runs the flow and performs its actions, including DML operations and Apex code execution. As is always the case when running flows, if you close or restart a flow mid-run, previously executed actions, database changes, and callouts aren’t rolled back.

If you opt to show details, they appear in a panel on the right.

Flow screen and Debug Details panel

Control Who Receives Flow and Process Error Emails

When a process or flow interview fails, Salesforce sends a detailed flow error email to the admin who last modified the process or a flow.  To change where flow error emails are sent, go to the Process Automation Settings page in Setup. Then update the Send Process or a Flow Error Email To field.  

To specify users and email addresses as Apex exception email recipients, go to the Apex Exception Email page in Setup.

We added the org name and ID in the error email so that you know which org to troubleshoot if you are managing multiple orgs.

Monitor Process and Flow Usage Against Per-Transaction Governor Limits

Processes and flows can do powerful things, and those things often count toward your per-transaction limits. Now you can use debug logs to identify which actions contribute the most against those limits.
Access debug logs from the Logs tab in the Developer Console. Or from Setup, enter Debug Logs in the Quick Find box. In the debug level, set Workflow to Finer

Example

... |FLOW_START_INTERVIEW_LIMIT_USAGE|SOQL queries: 1 out of 100
... |FLOW_START_INTERVIEW_LIMIT_USAGE|SOQL query rows: 100 out of 50000
... |FLOW_START_INTERVIEW_LIMIT_USAGE|SOSL queries: 0 out of 20
... |FLOW_START_INTERVIEW_LIMIT_USAGE|DML statements: 1 out of 150

Demystified Process Errors for Your Users

The error messages are now friendlier and include the process name and error ID. If the error occurs when creating or updating a record, the message also includes technical details for the user to give you to help with troubleshooting.

Then

Message stating that a flow trigger failed to execute and that an unhandled fault occurred

Now

Message specifying which process failed and this error: Opportunities with this Lead Source are not permitted for Q1

Flow Interviews End When User Sessions End

To be consistent with Classic runtime, a flow interview in Lightning runtime ends when a user is logged out. When a user session expires while a flow interview is in progress, some actions during the interview could be lost.  Interviews don’t perform actions, such as sending emails or creating, editing, or deleting records, until the associated transaction completes. Transactions complete either when the interview finishes, executes a Screen element or executes a Wait element.

Granular Batching for Scheduled Actions and Flow Interviews

Use Case Spring ’18 and Earlier Summer ’18 and Later
A process has a scheduled action that executes 50 SOQL queries. Three sets of the scheduled action have the same execution time, but they were triggered by three different users. The scheduled actions for all three users are batched together and executed in the same transaction. The process fails because the transaction exceeds the Apex governor limit of 100 SOQL queries per hour. The scheduled actions are batched together per user, so they’re executed in three separate transactions. Each transaction stays below the Apex governor limit of 100 SOQL queries per hour.
The following scheduled actions have the same execution time.

  • A scheduled action from one process that updates an account
  • A scheduled action from another process that updates a user role
Both scheduled actions are batched together in the same transaction. The batch fails because a single transaction can’t execute DML operations on both standard and Setup objects. The scheduled actions are batched together per process and executed in two transactions. The two batches succeed because the DML operations for standard objects are executed separately from the DML operations for Setup objects.

Enable Partial Save for Create and Update Operations in Processes

This update prevents a failed process from causing all running processes in the transaction to fail. Instead, Salesforce rolls back only the records that fail to save. Previously, if a failed process blocks one record in a batch from being saved, all records in the batch aren’t saved.  Check critical updates to activate this feature.


Summer 18 – Lightning Experience Highlights

Summer 18 – Development Highlights

Summer 18 – Lightning App Builder Highlights


 

Advertisements

3 Replies to “Summer 18 Release – Lightning Flow Highlights”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s