Add fields to Salesforce Flow (Summer ’21)

Coming in the Salesforce Summer ’21 release is a new way to add fields to a flow screen element.

Instead of manually configuring and adding new fields to a Screen element, you can use the new Fields selector.

Now, before you get too excited about this there are two conditions:

  • You need to be using Summer ’21 edition
  • You need to have a variable representing a single record

This is a beta feature in Salesforce Summer ’21 which is available in pre-release orgs now, in preview orgs from May 7 and in your production orgs between May 15 and June 12.

Being a beta feature means you can test it in your sandboxes but it is not recommended for production use.

The second condition is having a variable that represents a single record. Let’s take a look at what this means:

Here is a simple screen flow that has a Get Records element:

The element is configured to only get the first record (so it meets the condition of a variable containing a single record). It does this by passing in recordId (the ID of the page we started this flow from).

Next, we add a Screen element:

The new Fields (beta) function is now available:

Select the Fields (Beta) tab (1) and then in the Record Variable field (2), specify the record variable that contains the fields we want:

The available fields are now displayed, separated into Required Fields and the regular fields:

The available fields can now be dragged across to the screen element. No longer do you have to manually create and configure new fields!

You will need to add an Update or Create records element to update or create new records – but at least the creation of new fields on a screen is simplified.

Open Opportunities/Cases list view in Flow

I had a challenge today at work. I needed to display a list of Open Opportunities and Open Cases for any given Account. The aim was to give an account manager a quick view of what Opportunities and Cases were currently in progress for the Account before they touched base with their key contact.

At first, I thought I could just use a related list, but I only wanted the open opportunities and cases, not the whole lot. I also wanted to only show five (5) records of each so it did not take up too much space on the page. There was no way I could find to filter the related list view and only show a maximum of five records.

I’m not a developer, I think I am allergic to Apex but I’m pretty confident with my Salesforce flow skills. So I started thinking, I could do a get records and only get the open opportunities/cases that are related to this Account. The next problem was how to display them in a compact format and finally how to display a maximum of five records?

That’s where UnofficialSF.com comes to the rescue and Eric Smith’s datatable flow component. This allows me to display the records in a table format and also limit the dislay to the first five records.

Here is the full description of the flow for the Opportunity related list, the case flow is almost identical but uses the case object.

First step is to create a new variable: recordId, of type text with Available for Input checked (so we can pass the account ID into the flow from the account page).

Create a New Variable

Get the Open Opportunities related to the Account (recordId)

Add an Assignment Element to Count how many opportunities were returned

Install the datatable component

Before you can use the datatable component you need to install it (and it’s two dependencies from UnofficialSF.com)

Start the install here: https://unofficialsf.com/datatable-lightning-web-component-for-flow-screens-2/

Next, add a screen element and insert the datatable component

Note: Turn off the header/footer as they are not needed,


Configuring the datatable component:

Follow the settings here, you can experiment with changing them later.


Continue with the settings further down the page:


Return to the middle of the page and click the button Configure Columns:


Select the columns you want:

Change the width settings, keeping the total width to 552 (to fit a 1/3 page right column).


Save and activate the flow.


Edit the Lightning Record Page for the Account

Add a Flow component(1).

Select the new Open Opportunities flow (2), select single column (3).

Pass across the {!Record.Id} from the Account page into the flow (4).

Add a Component Visibility filter to only show the component if there are open Opportunities to display (5).

Save and activate the Lightning Page.

Open an Account record that has Open Opportunities to display the result.


Celebrate!

If you want Open cases as well, create a second flow with most of the same settings but select the case object and case fields.

Add some Magic to your Flows

Add some Magic to your Salesforce Flows with Flow Magic from Salesforce Labs. No more boring picklists! You will build this flow in one of the mini-projects as part of our online course “Learning Salesforce Flow”. Visit CertifyCRM.com for more information.
#salesforce #learningsalesforceflow #salesforceautomation #salesforceadmins

Disable User Flow

Here is a quick and easy flow to disable users accounts in Salesforce.

Create a new screen flow, it will have these elements when completed:

Add a screen element

Give the header a name:

Add a message to display (Display Text component):

Add a picklist component:

Configure the choice set (type = Record):

Filter out those that are inactive or have no company name to exclude the built in accounts.

Add an Update Record element:

Save, activate and run the flow:

Get more great training resources with our online training material providing everything you need to get certified:

  • Salesforce Administrator
  • Salesforce Platform App Builder
  • Salesforce Advanced Administrator
  • Salesforce Sales Cloud Consultant

Visit our online training site at CertifyCRM.com

Lightning Messaging Utility

The Lightning Messaging Utility is a great little tool from Salesforce Labs (Free) that admins and developers can use to highlight important information to your users.


Perhaps you have been using a rich text component to display a message on your lightning record pages – this is way better!

Using Component Visibility with this component means you can display a message when a pre-set condition is met and these messages will catch the user’s attention.

Once installed, you can simply drag and drop the message into your lightning record page and configure the settings to suit your requirement. The placement, text, background color, and icon are all configurable.

This message below is based on the total customer spend (total of won opportunities) being over a set value, earning them VIP status. The message is only displayed when this condition is met, using Component Visibility.

This next message is a more general one reminding users of a new feature on this object:

Configuration:

For the VIP Message (example above), the configuration was as follows:

  1. Message type was alert. (Options are alert, inline, prompt, illustration)

2. Show Message – yes we want to show it.

3. Message body – the text of the message

4. Message variant was error (options are info, warning, error or offline) This sets the background color of the message.

5. Show icon – yes we want that displayed.

6. Icon name we used utility:moneybag – get the full list of icons from the Lightning Design System reference here: https://www.lightningdesignsystem.com/icons/ use the icon group name as the prefix. (utility, doctype, standard, custom, action)

7. Icon size – medium (options are medium, xx-small, x-small, small)

8. Icon Variant – inverse (options are inverse, error, success, warning) note: these only apply to the utility icons.

The final part of the configuration is the Component Visibility, we only want this message to display when the Rating field value for this account record = Hot.

Get it here:

You can get the app from here:
https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3u00000MBecDEAT

and the Setup Guide from here:
https://partners.salesforce.com/servlet/servlet.FileDownload?file=00P3A00000nKwoiUAC

and the Lightning Design System Messaging Guidelines here: https://www.lightningdesignsystem.com/guidelines/messaging/overview/#site-main-content

Get more great training resources with our online training material providing everything you need to get certified:

  • Salesforce Administrator
  • Salesforce Platform App Builder
  • Salesforce Advanced Administrator
  • Salesforce Sales Cloud Consultant

Visit our online training site at CertifyCRM.com

Using Dynamic Pages

Salesforce has released the Dynamic Pages features for lightning pages in Winter 21. However, we can only apply these features to custom objects that we have created and not standard objects like the opportunity or lead objects where they would be really useful. In the Summer ’21 release due in June 2021, we can use Dynamic pages on the standard objects too.

So, what is all the excitement about Dynamic Pages and what can we do with them?

I’m sure many readers are familiar with long pages with many sections that are difficult to use and require a lot of scrolling up and down to find the information you want. Sometimes we don’t need to see many of the fields displayed until the record has progressed to a later stage. This is particularly the case when we are working with leads, opportunities or cases.

Perhaps the best way to do this is by way of an example:

Here we have a very simple app for a Job Application. The page has been designed as efficiently as we can by breaking the information into sections that relate to the stages of the job application process. However, all of the information is still displayed on one quite long page.

Note: You may want to zoom in with your browser to read the text on some of these screen images.

What we really want is to only display the information that is required to complete each stage of the process and nothing more.

Because we used a custom object for this example, we can use a Dynamic Page.

Convert to a Dynamic Page

In the Lightning App Builder, if you are using a custom object, you will see the small Tips message on the bottom right corner of the page, indicating that you can convert this page to a Dynamic Page.

Clicking this link displays the message shown below:

Next, click anywhere in the detail component (1), and the Upgrade Now button will appear (2).

Clicking Upgrade Now allows you to select the page you want to convert.

Now we can create Field Sections and add the required fields into those sections.

We created a new section for each stage and added the fields we wanted displayed.

Here on the Basic Details stage, we display the Applicant Details section only. This is controlled by using Component Visibility on this section.

Component Visibility

We do the same for each of the other stages, only making them visuble where we want them using Component Visibility.

On the interview stage, we also display a new section for the scores received during the interview.

Add the referee scores and overall score at the Referee Report stage.

Use a Dynamic Action to display the Submit for Approval button at the offer stage.

Dynamic Actions

We converted the standard actions to Dynamic Actions and put conditional visibility on the Submit for Approval button (1) and (2) to only display when the stage = Offer. This way the button is only displayed at that stage.

On the final stage, we changed the photo to another image, again using conditional visibility and the confetti action on the path to celebrate. You can see that the applicant was pretty happy too 😊

System Information

One more thing we did was to add the System Information fields but we hid them under the Chevron for System Information so they would normally be collapsed when we were viewing the Details on the page.

This example may not have been the perfect use case for Dynamic Pages but it does demonstrate how you can selectively display information on a page. This solves one of our user’s pet hates – too much information on the page requiring excessive scrolling.

Remember that you can only use Dynamic Pages on custom objects.

Now is a good time to start planning how to take advantage of these new features in the near future.

Start looking at your Opportunity, Lead or Case pages and plan what information is required for each stage. You may want to start rearranging fields into sections and grouping together those fields that will be required at each stage. When you can take advantage of Dynamic Pages, it will be a smaller change for your users.

Get more great training resources with our online training material providing everything you need to get certified:

  • Salesforce Administrator
  • Salesforce Platform App Builder
  • Salesforce Advanced Administrator
  • Salesforce Sales Cloud Consultant

Visit our online training site at CertifyCRM.com

Failed a Salesforce Exam?

failed

You studied hard, did some practice tests, had lots of practice in your own developer org and thought you had it all sorted. You got to the end of the exam and BUST – not the result you were hoping for!

Don’t despair, you are not the first or last to fail a Salesforce exam. Many students have failed the first and sometimes second time until they finally ace it. What matters now is dusting yourself off and having another crack at it!

Repeating what you just studied is probably going to produce the same result so its time to take a different strategy.

Step 1: Take some time off.

If you have been studying hard for several weeks or months, you need a break for at least a few days to relax and recharge.

Step 2: Review your Test Results.

Find the email that gave you all the details of your result. This is important to help you plan the next attempt.

Sample exam result from the Salesforce Administrator Exam


Step 3: Go back to the Exam Guide

Each exam has an exam guide that contains a wealth of information. The key part we want to find is the weighting for each section of the exam – how many marks is each section worth?

The Exam Guide for the Administrator exam is here:

https://trailhead.salesforce.com/help?article=Salesforce-Certified-Administrator-Exam-Guide

Scroll all the way down until you get to the section: Exam Outline

Here are the % weightings that we need:

  • Organizational Setup: 3%
  • User Setup: 7%
  • Security and Access: 13%
  • Standard and Custom Objects: 14%
  • Sales and Marketing Applications: 14%
  • Service and Support Applications: 13%
  • Activity Management and Collaboration: 3%
  • Data Management: 10%
  • Analytics—Reports and Dashboards: 10%
  • Workflow/Process Automation: 8%
  • Desktop and Mobile Administration: 3%
  • AppExchange: 2%


Step 4: Analyze the Results

There are 60 questions on the exam and a passing score of 65% (or 39 marks out of 60).

The next step is to go through the results one section at a time to see where you can get the best improvement.

This table will help determine what you should concentrate on for the next attempt. All you need to do is add “Your Score” and calculate the values for “Your Marks” and “Possible Gain” columns.

Alternatively, just download this spreadsheet and add your scores:


SectionWeightMaximum MarksYour ScoreYour
Marks
Possible Gain
Organizational Setup3%1.80%01.8
User Setup7%4.266%2.771.43
Security and Access13%7.850%3.93.9
Standard and Custom Objects14%8.455%4.623.78
Sales and Marketing Applications14%8.462%5.213.19
Service and Support Applications13%7.875%5.851.95
Activity Management and Collaboration3%1.8100%1.80
Data Management10%666%3.962.04
Analytics—Reports and Dashboards10%650%33
Workflow/Process Automation8%4.820%0.963.84
Desktop and Mobile Administration3%1.80%01.8
AppExchange2%1.20%01.2
Totals100%60 Marks32.0727.93
Your % Score53.43%
Pass Score is 65%


Weight: How important this section is (from the Exam Guide)

Maximum Marks: How many marks out of 60 is this section worth? (weighting / 100 x 60)

Your Score: Your section scores (from the email you received)

Your Marks: How many marks your weighted section scores earned you (maximum of 60 in total) You need 39 to pass.

How to Calculate Your Marks:
Security and Access: Weighting is 13%, Your score is 50%.
13 / 100 x 60 = 7.8 Maximum Marks (if you got them all correct)
7.8 x 50% correct = 3.9 Your Mark
s

In this example, the student needs to earn 7 more marks to take their marks from 32.07 to 39.07 (or 65.01%)

If they just concentrated on the three sections highlighted, they could potentially pick up 11.52 more marks and easily pass the exam.

Remember if the calculations are too hard, just download this spreadsheet and fill in your exam scores.


Step 5: Find some different Training Material

Maybe the material you have been using did not really connect with you? Perhaps another author can explain things differently? If you are a more visual learner then video materials may help you. Do you learn best by reading the text? Could you learn better by doing more in your own developer org?

Find the learning style that suits you.

Step 6: Make a Plan

Now you have identified the sections you need to study and found some training material that better suits your learning style, make a plan to resit your exam and book in a date. Set the date within the next month and then plan learning activities for at least 30 minutes each day.

Plan to have a small celebration when you are successful. Whether it is a special dinner, posting your success to social media, or indulging in your favorite food or drink, you deserve it!

Step 7: Ace that Exam!

Get a good night sleep and go into your exam resit with confidence.


Get more great training resources with our online training material that provides everything you need to get certified in the following:

  • Salesforce Administrator
  • Salesforce Platform App Builder
  • Salesforce Advanced Administrator
  • Salesforce Sales Cloud Consultant

Visit our online training site at CertifyCRM.com

Make the Transition to Flow – Part 2

Why do we need to transition to Flow?

Salesforce is concentrating their future development efforts on Flow, so it’s time to take a good look at the reasons why Flow should be your no-code automation tool of choice on the Salesforce platform.

This is the second in a two-part series designed to help you get started learning flow. If you missed the first part, you can find it here.

Build on your success

Now you have conquered your very first flow, let’s tackle something a little more complex and gradually build up your skills and confidence. Before long you will be over the hump and on your way to tackling more complex flows.

Flow 2: Customer Feedback

The challenge:

We want to get feedback on customer support issues to see how satisfied our customers are with our support service. When we are talking to the customer on the phone and we are closing the case, we will ask three quick questions.

  • Did we solve your problem?
  • Did we solve it quickly enough?
  • How well did we do overall?

For the first questions we have three responses that will earn points towards the total feedback score. The responses can be Yes (2 points), Partially (1 point) or No (0 points).

For the question Did we solve it quickly enough – there is a sliding scale from 1-4 with 4 being the fastest response we could have achieved.

The final question How well did we do overall, also has a scale from 1-4, with 4 being we did an excellent job.

The three questions give a total feedback score out of 10.

We only want the survey to be available once the case is closed. Once the survey has been completed and the total feedback score is recorded, we don’t want the survey to be available again for that case. We do not need to store the responses for the three questions, all we need to keep is the final score.

The survey will not be filled out by the customer, the service agent will do this as they are talking to the customer and closing off the case.

Flow Logic:

Our flow will work something like this. First, we will get the record for the case. We then check if the case has been closed. It must be closed first to get the feedback. If not, we display an error. If the case is closed, we check if the feedback has already been collected, if not we proceed to display the three questions and finally save the new feedback score to the case record.

Create a field on Case to store the result

Before we start building our flow, we need a new number field on the case object to store our feedback score.

The field will have a label of Feedback Score, of type number, length of 2 and zero decimal places:

Create a new Flow

From the setup menu, select Flow and then click New Flow.

Select a Screen Flow:

Step 1: Get Case Record

In this step we will read the case record. We will need to create a variable to pass across the ID of the case we currently have displayed, then we can get the record.

Before we start building our flow, we need to create a few variables, a formula and some choice values for our survey questions.

Variables

To pass the current case record to the flow so we can get the case record and inspect some of the field values, we need to create a new variable named “recordId”. The case of this variable name is very important, the “I” is a capital letter i and the rest must all be lower case. This variable will automatically be populated for us with the value of the current case record.

Click the Manager tab (1), then New Resource (2), and fill out the fields as shown below to create this variable. Note we are making this variable for Input as the value will be passed from the currently displayed case record to the Flow.

We also need variables for the problem_overall score and for problem_solved_quickly. We will use them later but create them now to make life easier. Note we make them available as Output this time because they are going to go out from the Flow and be written back to the case record.

Create a variable of Data Type Number configured as follows:

And one more variable also of type Number:

We should now have three variables:

Get the Case Record

Next, we drag a “Get Records” element onto the canvas (page).

Fill out the details for getCaseRecord as follows:

Step 2: Check if the case is closed

Next, we need to add a Decision element to our canvas and configure it to help check if the case is closed or not:

First, create the CaseClosed outcome:

Next, create the CaseOpen outcome:

Step 2a: If the case is not closed, display error and stop.

If the case is not closed, we can’t add the feedback now so we will display an error and stop the flow.

Drag a Screen element to the canvas:

Configure the Screen element to display an error message:

Next drag a Display Text element into the middle of the screen (1):

Enter the error message (2) and it will be displayed in the middle of our display screen (3).

Step 2b: If the case is closed, continue to step 3.

If the case is closed, we can continue.

Join up the elements we have placed on the canvas:

Step 3: Check if the feedback has been done

Drag another Decision element and configure it to check if the feedback has already been completed. We don’t want to do it again.

Configure the first outcome:

And the second one:

Step 3a: If feedback score > 0, display message and stop.

If the feedback has already been done, we will display a message and stop the flow. Note: This is really not an error, it’s just we have already completed this process and don’t want it repeated.

Drag another screen element to the canvas, then drag a Display Text element into the middle of the screen element and configure as follows:

Step 3b: If feedback score is blank, continue to step 4

If the feedback score is blank, we can continue and collect the feedback.

Join up the new elements we have added:

Step 4: Get the Customer Feedback

This time we need to drag a Screen element to the canvas so we can configure our data input screen that will display and capture the answers to our three questions.

Drag a Radio Button element onto the screen:

For this element, we need to configure as follows:

Next, we will configure the three choices:

Click in the first Choice box and click + New Resource:

Select the type of resource as Choice:

Configure the choice_yes, giving it a Label of “Yes” and a choice value of 2. This means if the customer problem was solved with this case, we add 2 points to the case feedback score.

Repeat the process to add the second choice:

And once more to add the third choice:

The Radio Button choices config should look like this:

Next, we will add the first Slider and configure it:

There is one more section to configure the slider, this is where the value for the slider position (where the user slides it to) will be stored. {!problem_solved_quickly}

Now we add the second slider and configure it:

Storing the result in {!problem_overall} – the variable we created back at the start.

Step 5: Save the results

Finally, we need to save the results.

Before we do that we need to add up the scores for the three questions to get a final score (case_feedback_score). To do this we will create a new formula as follows:

Note: That could have been only 0 decimal places as we are using whole numbers.

There are two parts to saving the results. First, we need to copy our total score from our input screen across to the case field. Then we can save the case record.

We will first drag an Assignment element to the canvas and configure that so we have the Feedback_Score__c field on the case record being assigned the value of our formula (which has added the three scores from the survey screen).

At this stage, the case record is held in memory, it has not been saved yet.

Finally, we add an Update Records element to save the new details to the case record.

Drag an Update Records element onto the canvas and configure:

Note that we didn’t need to specify all the fields we wanted to update, we just use the complete record from our getCaseRecord element.

This final step will save the case record to Salesforce, updating our Feedback Score for the survey on this case record.

Connect up the remaining elements so the final flow looks like this:

The last step is to Activate our flow. You can do this from within the Flow Builder:

Or you can do it from the list view of all flows:

On the list of all versions, you can activate, deactivate, run, delete or edit an old version of the flow:

Edit the Lightning Record Page

We only want our flow screen to display when a case is closed. We can configure this within the Lightning Record page as follows:

Drag a flow component onto the page as shown:

Select the new flow component (1) and configure as shown. The filters (2) control when this component will be displayed. The first one specifies to only show when the case has a status of closed and the second one specifies to show only when the Feedback Score is greater than or equal to zero. We still want the flow to display if the survey has been completed as we configured a special message for that back in Step 3a.

Add the Feedback Score to Page Layout

In order to see that our flow has run successfully and the Feedback score is being calculated correctly, we need to add it to the case page layout:

Drag our Feedback Score field onto the page layout. It does not really matter where you place it, in this example it was placed at the top of the page so we can find it quickly.

Save the page layout.

Test your Flow!

If everything has been completed successfully, we can now test our flow.

First, select a case that is NOT closed. We want to see that our flow does not display until the case is closed.

Change the case to Closed.

Our flow appears!

Fill in the survey, taking note of the numbers you selected. Remember for the radio buttons Yes = 2, Partial =1 and No = 0.

Click Next to complete the survey.

If everything went well, your flow will now display a message indicating the feedback has been completed for this case and the Feedback Score will be displayed on the case page:


If you got this far and everything worked, congratulations!!

If something is not quite working as expected, go back and double check your configuration. You can also use the Debug function in the flow to step through the flow to help you identify errors.

Advanced Flow Features

Break your flow apart

For very complex requirements or to create re-usable components that can be used by other flows, you can create a number of sub-flows and call them from your main flow. This has several benefits:

  1. It reduces the complexity of the main flow.
  2. It isolates functionality within the sub-flow, making problem solving and debugging easier.
  3. Your sub-flows can be reused by other flows. If you have a common function that needs to be used several times in your application then you can write it once and call from many flows.

For example:

You need a flow that can take an Opportunity and create a single Order or multiple Orders -OR- take a Quote and create a single Order or multiple Orders. Rather than adding all this complexity into one flow, it is broken down into a main Flow and four (4) Sub-flows.

Reference: You can get this free flow template from www.taveza.com

here: https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FMWAAUA5

Note:   
Sub-flows can only be used on flows that are run after the record is saved.

When we run our flow After the Record is Saved, we have access to the elements for Action, Create Records, Update Records and Delete Records:

But on the Before Save Flow those 4 elements are missing:

Using Actions

Actions also let you break your complex flow apart – we have already seen how we can use sub-flows but there are many more actions available:

  • Apex
  • Quick Actions
  • Post to Chatter
  • Send Email
  • Custom Notifications
  • Route Cases
  • Submit for Approval

Extending your flow

What happens when you need to do something that flow just can’t handle?

Call Apex or add Lightning Components to your flow!



Extending with Apex

To call Apex, drag an Action (1) on to the canvas then select Filter By: Type (2) and then you can select one of the available Apex actions (3).

Reference: https://help.salesforce.com/articleView?id=flow_build_extend.htm&type=5


Extending with Lightning Components

Adding a Lightning Component – here is a quick example of how an (already installed) component can be added to a Screen element:

There are plenty more free samples on the AppExchange here:

https://appexchange.salesforce.com/appxSearchKeywordResults?keywords=Flow%20actions

Remember: If you are installing into your Developer org you need to select Install in Production. A Developer Org is not a sandbox. Sandboxes only exist within a fully licenced Salesforce org.

Extending with Heroku

“This post focuses on expanding flows with Heroku compute. Specifically, how to expose Heroku apps as external services and securely access them via flows using Flow Builder as the low-code development environment.”

https://medium.com/salesforce-architects/extend-flows-with-heroku-compute-an-event-driven-pattern-a9840a91ce5b

Naming Standards

Keeping a consistent naming convention is important to be able to quickly identify what a Flow does. I like to start with the object name, followed by a short description of what the flow does. e.g. Lead-UpdateRating



Get more great training resources with our online training material that provides everything you need to get certified in the following:

  • Salesforce Administrator
  • Salesforce Platform App Builder
  • Salesforce Advanced Administrator
  • Salesforce Sales Cloud Consultant

Visit our online training site at CertifyCRM.com



References

Refer to some of the resources listed here for some more inspiration and helpful examples demonstrating what you can achieve with a flow.

Get Started with the New Flow Builder

https://admin.salesforce.com/blog/2019/getting-started-with-the-new-flow-builder

An Introduction to Salesforce Flow

https://www.salesforceben.com/introduction-salesforce-flow/

Automation Champion – Learning Flow

https://automationchampion.com/learning-flow/

The Wizard’s Apprentice Lightning Flow Builder video series

https://thewizardnews.com/2019/05/28/wizards-apprentice-lightning-flow-builder-overview/

Jen W Lee’s Salesforce Blog

https://jenwlee.com/  Jennifer Lee has some great blog articles on how to flow.

Flow Components

https://unofficialsf.com lots of components that you can install and add to your flows.

Flow Tutorials

https://www.youtube.com/playlist?list=PL9kdg63vJl6C0URtd8NW18zcjaRSsczQ_

Automation Components

https://github.com/trailheadapps/automation-components/wiki

Flow Best Practices

https://help.salesforce.com/articleView?id=flow_prep_bestpractices.htm&type=5

Salesforce Automation Guide

https://salesforce-automation.herokuapp.com/

Architect’s Guide to Building Record-Triggered Automation on Salesforce Using Clicks and Code (Salesforce)

https://quip.com/VJfCAFhEBO0W

Process Builder vs Flow

https://www.salesforceben.com/process-builder-vs-flows-become-the-ultimate-admin/

Best Practices for Process Builder

https://www.salesforcebolt.com/2020/10/best-practice-for-process-builder-in.html?m=1&fbclid=IwAR32pdC_YsQPKjg6nWbz6YHWCQP1h_QYZ34-tEZCYHqP-HvrkALxnwNdas8

Transition to Salesforce Flow

(Part 1 – Why and How do I get there?)

With Salesforce concentrating its future development efforts on Flow, it’s time to take a good look at the reasons why Flow should be your no-code automation tool of choice on the Salesforce platform.

Why Choose Flow?

There are three key reasons to choose Flow:

  • Performance
  • Architecture
  • Future

Better Performance

Performance tests conducted by Salesforce indicate that Before Save Flows can improve performance by 10-20x over Workflows or Process Builder.

Salesforce analyzed the actions executed by Workflows, Process Builder, and Flow by customers in April 2020. Of the 150 billion transactions executed, 100 billion (66%) were for same record updates. If converted to Before Save Flows these actions would have a significant performance improvement.

(https://quip.com/VJfCAFhEBO0W)

Check out this great article by Luke Freeland on benchmarking performance that compares triggers, Flow, and Process Builder.
https://metillium.com/2020/10/salesforce-record-automation-benchmarking/

Better Architecture

Workflow rules and Process Builder use a different runtime environment to Flow and will never match Flow’s faster performance and lower resource consumption. The start-up phase for both Workflow and Process Builder is inefficient and wasteful of resources.

In addition, Salesforce is concentrating its efforts on Flow performance, debugging, management and deployment which will not benefit either Workflow or Process Builder.

(https://quip.com/VJfCAFhEBO0W)

Future Development

Salesforce has recently made it pretty clear that the future for no-code automation is Flow. This does not mean that Workflow and Process Builder are going to disappear any time soon.

What this does mean is that the future development of new features will be largely around Flow. They will continue to support Workflow and Process Builder but what you have today in functionality terms is what you will have for the next several years with no improvements either planned or in development.

(https://quip.com/VJfCAFhEBO0W)

The roadmap for Flow is to match and exceed the features of Workflow and Process Builder. There are still a few shortcomings where functionality does not yet match but these are on the roadmap for development over the next 12 months.

How do I get there?

So, if I am using Workflows and Process Builder now, how do I move to Flow?

There are a number of steps to follow:

  • Upskill
  • Target Selection
  • Tool Selection
  • Identify Actions
  • Start Small
  • Build on your success

Upskill to Flow

If you are already comfortable creating Workflows and building processes with Process Builder, you will find the initial learning curve to move Flow is a steep one. Many of the functions that were done for you in Workflows and Process Builder are done differently in Flow. You may need to retrieve records, assign values and update those records; however, you have much greater flexibility and capability with Flow.

If you need to read many related records from several different objects to perform a transaction you can do that with Flow. Imagine building a wizard like app in Flow that reads Account, Contact and Opportunity records and then displays the key data for further input or update.

You also have the capability of asking the user for input. You can retrieve records and then ask the user what they want to do next, perhaps based on values in those records.

Select your Target

Salesforce recommends a single tool be used for your automation and a single process for each object. While this is not always possible, it should be a target that you aim for.

There are exceptions to this rule, especially in a large complex organisation and you may want to explore the approach listed below:

Source: https://medium.com/@apeattie/salesforce-process-builder-best-practices-24e674b2b2b1

What you don’t want is a mixture of Workflows, Process Builders, Flows and Apex Triggers all updating the same object. The problem is not just the additional performance overhead every time a user creates or updates a record but determining the order of execution.

This means which one will fire first? With multiple automation tools or multiple Workflows, Processes or Flows on an object, you have no guarantee which one will execute first.

Perhaps the best starting point is to select an object with a small number of workflows and work towards combining them into a single Process Builder or Flow.

Select your Tool

While you have a choice of three no-code automation tools to choose from, Process Builder or Flow Builder should be your top candidates.

We recommend you only use Process Builder as a bridging step towards Flow if you are not yet experienced building flows.

If you are already comfortable building Flows then Flow should be your tool of choice.

Use Process Builder when you need ISNEW, ISCHANGED, PRIORVALUE functions. These should be available in Flow in the next 12 months (by the Winter 22 release).

Note: There may still be situations where your automation is very complex or needs to operate on a large number of records. In this case, the best tool may be an Apex Trigger. You may need help from an experienced developer.

Identify all the Actions required

Having selected your target object and preferred tool, create a list of your existing Workflows, Process Builders and Flows that operate on that object.

Take a close look at each action and complete the following table for your selected object:

Lead Object Automations:

ToolNameWhenWhatHowDescription
WorkflowUpdateRatingCreateUpdate RatingRevenue > $500,000 and Lead Source = Partner ReferralUpdate rating to Hot if conditions are met
WorkflowNotifySalesMgrCreateSend EmailIndustry = BankingEmail Sales Manager if industry = banking
Process BuilderAdd TaskUpdateAdd task to call Lead within 3 daysLead Source = Web and Status = Working – ContactedCreate a task to place a follow up call to the lead

Start Small

Start with a very simple Flow so you understand the process of creating, running and debugging a flow. It will help your confidence to get over the steep learning curve and get you motivated to climb the next step.

The UpdateRating workflow in the table above would be a good starting point for your first flow.

Flow 1: Update Rating for a Lead

Let’s create a simple flow:

Start by creating a new flow of type: Record-Triggered Flow.

Trigger the Flow When: A record is created

Run the Flow: Before the record is saved

Select the object: (Lead)

You will need two decisions and one assignment element for this flow

Drag a Decision element to the canvas:

Configure the first decision to check: is the Annual Revenue greater than $500,000?

Drag another decision element to the canvas:

Configure the second decision to check: is the Lead Source = Partner Referral?

Drag an Assignment element to the canvas:

We will now configure the field we want updated (Rating).

Join up the elements:

Save your flow and activate it.

Notice how we did not need to get the lead record or save the record?

The flow will get the record automatically for us as it is triggered when the record is created. Because it is a before save flow, the flow is actually run before the record is saved by the user. No need to do anther save, it is all done in one transaction.

This simplicity and before save feature are what makes this flow execute quickly.

Test your flow:

Now go back to your Sales App or any app that has access to leads and create a new lead record. Enter a number > $500,000 for Annual Revenue and select Partner Referral as the lead source. Save the record and check that the rating has been set to Hot by your flow.

If this was successful, congratulations you have built your first flow!!

Build on your success

Now you have conquered your very first flow, tackle something a little more complex and gradually build up your skills and confidence. Before long you will be over the hump and on your way to tackling more complex flows.

In part 2 of this two-part article, we tackle a more complex flow that gathers feedback from a customer with a simple form and creates a customer feedback score.

Part 2 published now:
https://blog.certifycrm.com/make-the-transition-to-flow-part2/


Get more great training resources with our online training material that provides everything you need to get certified in the following:

  • Salesforce Administrator
  • Salesforce Platform App Builder
  • Salesforce Advanced Administrator
  • Salesforce Sales Cloud Consultant

Visit our online training site at CertifyCRM.com


Trailhead resources to get started with flow:

Trail: Build Flows with Flow Builder
https://trailhead.salesforce.com/en/content/learn/trails/build-flows-with-flow-builder

Trail: Automate Your Business Processes with Lightning Flow
https://trailhead.salesforce.com/en/content/learn/trails/automate_business_processes

Module: Lightning Flow for Service
https://trailhead.salesforce.com/content/learn/modules/service_lightning_flow_for_service

Salesforce Automation Tools

In this article, we compare the three no-code automation tools for Salesforce. These tools can automate business processes in Salesforce without writing Apex code:

  • Workflows
  • Process Builder
  • Flow Builder
Compare Salesforce Automation Tools

Workflows

Workflows are the oldest of the automation tools.

Features

  • Quick, relatively simple to configure.
  • Can update the current record or a parent record only.
  • Can only have one if/then statement.
  • Can send email alerts.
  • Can create time-dependent actions.
  • Can send outbound messages (without code to an external app).
  • Triggered by a record update or record creation.
  • No longer actively developed, but still supported.

Recommendation

Avoid where possible except for very simple tasks.

Start moving existing Workflows to Process Builder or Flow.

No longer actively developed – means no new features will be released.

Process Builder

The next generation of automation tools, Process Builder provides a full Graphical User Interface to build automations with point-and-click tools.

Features

  • Can have multiple if/then statements.
  • Supports the ISNEW, ISCHANGED, PRIORVALUE functions that are currently missing from Flow (expected within 1 year).
  • Can be triggered by record creation/update, another process, Apex or Platform Events.
  • Can create any record and update related records.
  • Often updated with new features and capabilities.
  • Supports Custom Metadata and Custom Settings.
  • Can launch Flow or Apex.
  • Can post to Chatter and send Custom Notifications.
  • Can submit the current record for approval.
  • Can send email alerts.

Recommendation

Use Process Builder as a bridging step towards Flow.

Use when you need ISNEW, ISCHANGED, PRIORVALUE functions.

Handle complex tasks by calling Flow or Apex.

Move any existing Workflows to Process Builder unless you are comfortable working with Flow Builder and Flow meets your needs – then move straight to Flow.

Use a single process per object. (see note for exceptions)

Source: https://medium.com/@apeattie/salesforce-process-builder-best-practices-24e674b2b2b1

Process Builder is “Often updated” – means there may be some small improvements but Flow is now the main focus for development by Salesforce.

Flow Builder

Features

  • Allows more complex automations with multiple logic branches.
  • Is more complex to learn.
  • Is the future of Salesforce automation with Flow constantly being updated in each release with new features and capabilities.
  • Provides a user interface, ideal for creating wizard type functions.
  • Is the only no-code tool that can delete records.
  • Has a visual debugger built-in to Flow Builder.
  • Supports Custom Metadata and Custom Settings.
  • Can launch sub-flow or Apex.
  • Can post to Chatter and send Custom Notifications.
  • Can submit the current record for approval.
  • Can send email alerts.

Recommendations

Make Flow your preferred platform for no-code automation tasks and start learning how it works. Plan to move your Workflows and Process Builder automations to Flow over the next 12-24 months.

Monitor the improvements to Flow capability over the next 12 months and take advantage of new functionality as it is released by Salesforce. Read the release notes and test the new functions.

unofficialsf.com is a great source of flow components that you can use in your own flows.

Complex business processes may need to use Apex code.

Comparison to Windows:

If we were to compare the three no-code tools to Microsoft Windows, it would look something like that below. Are you still stuck using Windows XP on your desktop?

Compare Salesforce Automation Tools

References:

Salesforce Automation Guide

https://salesforce-automation.herokuapp.com/

Salesforce Process Builder Best Practices

https://medium.com/@apeattie/salesforce-process-builder-best-practices-24e674b2b2b1

Architect’s Guide to Building Record-Triggered Automation on Salesforce Using Clicks and Code

https://quip.com/VJfCAFhEBO0W