Going with the (Salesforce) Flow

After finishing up my Salesforce Certified Administrator certificate, I’m currently working towards my Platform App Builder certificate where there’s a focus on declarative versus programatic automation options. Salesforce has multiple tools that while being similar offer very different functionality.

As the phrase goes, all roads lead to Rome - but what road provides the best user experience? (And how is each road different?)

We have five automation roads to explore in our trip to Rome, namely: Workflow Rules, Process Builder, Flow Builder, Approvals, and Apex. We’ll start with the simplest option (Approvals) and work our way up to the more complex (Apex) and figure out the rest in between.

Thankfully Salesforce gives us a handy-dandy notebook help article that gives us a beneficial if unwieldy table to keep in our back pocket. You can find the help article on this link. Time to sit down in our thinking chair.

For a brief history of Salesforce automation:

  • Workflow Rules were the original automation tool.

  • Then came Process Builder, with its visual interface for mapping automation.

  • Now Salesforce Flow is the current focus with a visual interface and more customisation than Process Builder.

When to use an Approval Process:

If ever a person needs to be granted approval for something at your business, that’s when to use a Salesforce Approval Process (I promise it gets more complex). They can be established for standard objects (like Opportunities, or Leads) or custom objects (Like an internal Salesforce Change Request). In simple terms the user will initiate an approval request to a second user (typically a manager), and in doing so the record will be locked to prevent it from being changed. From there you can set behaviour of what to do if the manager accepts the approval, or declines it. Here’s a module on Trailhead to explore further.

Salesforce Ben provides an example use case.

Stacy’s Web Services has a custom object called “Free Trial”, which contains information about a Free Trial given to a prospect. There’s the Start Date, End Date, Sales Rep, a Lookup to the Opportunity, and a Status picklist, with values Pending (default), In Progress, Completed, and Canceled. The Sales VP would like all new Free Trial requests to be routed to himself for approval, and then the Sales SVP if the Opportunity Amount is more than  $50,000. These Free Trials do incur a cost to the business, so we do not want to give them out on a low value deal unless there is a compelling business reason.

When to use Workflow Rules:

Firstly it would be remiss for me not to mention that Process Builder and Workflow Rules are being set to retire in the not too distant future. Per this recent Salesforce Article there isn’t a set EOL date yet but they’re planning on turning off the ‘create new’ button by the end of this year. Effectively Salesforce plans to add all the features of Process Builder and Workflow Rules into Flow so you have a one-stop-shop for all of your automation needs. Fear not - it’s still important to know what this tool is capable of and Salesforce has bought out a migration tool to convert a workflow rule into a Flow, with plans to support Process Builder soon. With that info-dump out of the way what are Workflow Rules for? Workflows are the foundation of Salesforce Automation - you can use them to do things like update a field, send an email, create a task, or communicate with another system. They can be triggered whenever a record is created, whenever it meets a certain condition, or whenever it is first set to meet a certain condition. Simple beginnings.

When to use Process Builder:

Process builder can do everything a workflow can do! (Well — almost everything. It can’t send outbound messages) while bringing in a tonne of new features. Put simply Process Builder is best at automating repetitive processes such as assigning work, sending emails, and automatically updating records when criteria are met. Every process consists of a trigger, at least one criteria node, and at least one action. You can configure immediate actions or schedule actions to be executed later. Process Builder also has versions, so you can retain deactivated processes. This is hugely helpful for troubleshooting as you have a full version history available to you. It’s also the first automation tool with a visual interface.

Here’s a Trailhead module to explore the powers of Process Builder.

When to use Flow Builder:

Flow Builder is the future of click-not-code automation at Salesforce and is the most powerful automation tool that Admin’s have available to them. In simple terms, you can use Flow Builder to create flows that can have user input, guided user interactions, rich branching logic, and can operate on several records at once.Every flow is made up of three building blocks. Per Salesforce Ben:

  1. Elements are the individual building blocks of the Flow. These perform logical actions such as assignments, decisions, or loops. There are also data elements that will query the database or commit record changes.

  2. Connectors determine which element leads to which. Winter ‘21 enables Auto-Layout, and connects the Elements together automatically.

  3. Resources are the individual variables of data that are to be used in a Flow – these can be strings of text, numbers, records, formulae, or collections.

If you need to perform mass updates across multiple unrelated records, or complex logic into opportunity conversion, these are common examples for when you should use Flow.

The use cases for Flow are endless, and its capabilities are growing with every Salesforce release. Here’s a Trailhead module to learn more.

When to use Apex:

While you can do a substantial amount of automation with clicks-not-code you will occasionally encounter a scenario where your business requirements will involve something that can’t be accomplished through a declarative option. Enter Apex. The only caveat? You need a developer if you aren’t one yourself.Apex provides the limitless possibilities of “everything else” you might need to do within Salesforce. Some examples include deleting records, or updating unrelated records, or anything else. 

Here's a Trailhead module to get you started.  In summary, while we have multiple automation roads, we have one destination - automating tasks so that we can spend time on our business needs and goals and not filling in that same field for the tenth time today. 

Lots to remember? Here’s that cheat sheet from Salesforce. 

See you on the Trail.

Previous
Previous

Turn Off the Lights! with Dark Mode for Salesforce Lightning

Next
Next

Organisational and Personal planning with a V2MOM