Process builder and workflow make way to Flows (½)

By

6 minutes de lecture
Image d'illustration d'une employée travaillant sur un ordinateur portable

Overview

“If you can do it with a Workflow, then do it with a Process Builder, because everything a Workflow does, a Process Builder does it better”. If you are familiar with this sentence, maybe that is because you started working with Salesforce more than two years ago.

Now, there is a brand new one : “Why use a Process Builder when you can use a Flow ?”.

Indeed, these last three years have been golden ones for Flow Builder. If you have some Salesforce certifications, you sure have seen some of the last Flow releases in your certification maintenance(s) (Platform App Builder and Administrator certification maintenance for example).

This article will present you why Flows are slowly replacing Process Builders and Workflows.

1- Winter’22 flow releases

Firstly, in this article, I will present to you some of the lastest features Salesforce has released for Flows.

Send outbound messages

Remember when you were dealing with your Salesforce Admin certification in 2019 ?

To the question : “As an administrator, you need to send messages to an external system, what should you use ?”

Back in time, you would have answered “Workflow Rule or Apex” without any hesitation. Well now, you can also answer “Flow Builder”. In fact, you can do so by creating a new action and selecting “Outbound message”.

What is an outbound message ?

It is a message sent to a designated endpoint like external services. You configure them from SetUp. Then you configure the external endpoint and create a listener for the message.

Record triggered flow starts element change

Before Salesforce Winter’22 release, when you wanted to set up a record triggered Flow you had three choices :

  • Apex code
  • Process builder
  • Flow if you were brave enough to go through this

Now you can choose to configure the trigger of your Flow. Moreover you can optimize your Flow for “Actions and related records” or “Fast field update”  in the starting menu before creating your flow.

Call a subflow from a record triggered flow

Nevertheless, does it ring a bell ? It does for me ! No need to create a Flow, and then go back to Process Builder to call it when you need some features from Flow and some others from Process Builder.

You can now stay on the same tool to create a flow and call it from another one or many other ones depending on your aim. It also looks like different apex triggers calling the same method for different purposes.

Roll back your data element

Back in times we were using Flows to develop features that do not need a custom solution. And one of the many things you could do with Apex and you could not with Flow was managing errors in your code (try/catch).

Now that you have the Roll Back Record data element, you can roll back your Flow when it encounters an error.

But it is not the only use case for this feature. In fact, through the many other use cases, you can also use it if a user changes his mind about his actions.

Relabel the navigation button in a screen flow

A specific request from your user ? The “Next” button is not specific enough ?

Before this release, you had to create a brand new LWC to fit this request even if the back end could be done with a screen Flow.

Now, you just need to hit the “Use a custom label” checkbox and type the name of your button.

2- Why use flow instead of process builder/workflows ?

Secondly, the very first reason why is because Salesforce plans to disable the option to create new Workflow Rules and Process Builders in Winter’23, according to the recent dreamforce announcement. 

However, the second reason why is because Process Builders and Workflow Rules are not actively being updated by Salesforce anymore (hence the disabling).

And if those two reasons are not enough, here are many others :

  • The number of active workflow rules at once is limited
  • Workflow rules scheduled actions are limited to 1000 triggers per hour
  • Workflow rules are limited in actions and in the number of actions they can trigger (only one decision and therefore one action)
  • You can create screen flows to interact with the user whereas you can not with PBs/WFRs
  • You can test your flows and debug them
  • Flows can have different and more complex orders of operations than PBs

Moreover, to put in a nutshell, Flows are becoming the Apex of the Administrators whereas PBs and WFRs are slightly disappearing. And I have no doubt that Flow Builder will become more and more user friendly within the next releases.

3- Useful badges to make up with flows and forgetting about PBs/Workflows

Otherwise, while waiting for the next article of this story, there are some nice trailhead badges to make up with Flows (by order of difficulty) :

1- Build Flows with Flow Builder | Salesforce Trailhead

2- Automate Your Business Processes with Salesforce Flow | Salesforce

3-Salesforce Flow for Service | Salesforce Trailhead

Of course, it is always useful to stay tuned with the salesforce certification maintenances (even if you did not pass the certification) : administrator and app builder are good ones.

Conclusion

All in all, if you are an administrator and you are not confident in using Flows, maybe you should try some of those badges to help you reconnect with this feature. with some practice, it will get easier and easier.

As a developer, you still have the choice between developing and using a flow. Some of you will prefer coding (and how could I not agree with them ?). But maybe developing your flow skills can be an asset to shine during your next interviews.

In conclusion, I myself am not that much comfortable with Flow Builder, but lately I have been comparing Flows to code in order to land on my feets. I will gladely share my experience in the next article.

 

Sources

Read more posts

Enforce code standards with PMD

Developers working on a project usually set coding rules to have a standardized codebase. It is an important piece of the code maintainability, and it can be very easy …
March 2023
Advices
Scratch orgs

Uncovering Salesforce Settings: A Step-by-Step Guide for Scratch Orgs

Today, it’s pretty easy to build your Scratch Org definition file when you know what Settings you want to activate, as they are mapped with the same setting names …
February 2023
Advices
Business Analyst

Core qualities of a Business Analyst?

A common definition we are used to hear is that being a Business Analyst means to have a combination of both hard skills and soft skills. What does a …
June 2022
Advices

Day 22 : Salesforce new “Migrate To Flow tool” in Spring 22

As most of you already know, the workflow rules and process builders are planned to be retired in 2023 (no precise date defined so far). Today, I’m going to …
December 2021
Advices

Day 18 : Fake callout responses for test classes !

Hello everybody ! Today let’s talk about Apex tests classes in Salesforce. Everyone loves a good test class, and Salesforce makes it official by requiring to have a minimum …
December 2021
Advices
Wrapped up gifts

Day 13 : CI/CD Salesforce deploys only delta with github actions

Most projects today configure the CI/CD to deploy all metadata from the git repository, even those that haven’t been changed. When you are on a small project, you don’t …
December 2021
Advices