Salesforce Process Builder vs. Apex vs. Flow

We often want to do some if-this/then-that automation in Salesforce.  But Salesforce gives you many ways to build automation, both declaratively (clicks, not code!) and programmatically: Workflow Rules, Process Builder, Apex, and Flow.  This post goes through the differences between Process Builde, Flow, and Apex (but spoiler, just use Flow).

>> Related: How to Re-run Lead Assignment Rules Using Flows & Apex <<

What are Salesforce Workflow Rules?

Sample Salesforce Workflow

Workflow Rules are quite simple.  You set Conditions and then once conditions are matched, you do Actions, whether that’s a field update or creating a task or sending an email alert.

  • They’re very fast and easy to configure, and so they’re very popular.  ✅
  • But you can’t (usually) create rules across objects.  An example of that would be “if a Contact does This, I want to do Something to the Account.” ❌

What is Salesforce Apex?

sample Apex code

On the opposite end of the spectrum is Apex.  Apex is a programming language that allows developers to enhance Salesforce with custom code. This usually takes the form of Apex Triggers and/or Apex Classes.

  • Sky is the limit in terms of functionality and speed. ✅
  • This is not a common skill among Salesforce Admins and requires development expertise. ❌

What is Salesforce Process Builder?

sample Salesforce Process Builder

Because Workflow Rules are so limited (and Apex so intimidating) Salesforce released Process Builder.

  • Process Builder is also point-and-click, and any admin can use it. ✅
  • It has a little more power and can go cross-object. ✅
  • But it’s slow. ❌
  • And it’s not well-suited to complex logic. ❌

Which brings us to Salesforce Flow

sample Salesforce Flow

Flow is similar to Process Builder, but better in almost every way.  (Indeed Process Builder was created on the Flow engine! If you ever try to deploy a process through a Change Set or query for one, you’ll notice they live under the “Flow Definition” section.)

Flow is also where Salesforce is investing.  On Sep 23, 2021, Salesforce announced they’re deprecating Workflow Rules and Process Builder within the next couple of years (timeline still TBD)  And they cautioned, “the best way for you to future-proof your organization is to move your automation to Flow.”  Message received.

So if you’re creating new automations in Salesforce, always start with Flow, and then resort to Apex if you must.

 

Sponge.io | Marketing and Revenue Ops

Get a System Audit

Whether you inherited a new instance or just want a second opinion, we'll dive in and benchmark your tech stack.

  • This field is hidden when viewing the form
  • This field is hidden when viewing the form
  • This field is hidden when viewing the form
  • This field is hidden when viewing the form
  • This field is hidden when viewing the form

Sponge.io | Marketing and Revenue Ops

Download Resource

Use this form to recieve your free resource in your inbox today!