Choose the Right Automation Tool

Lightning bolt icon used to indicate that the content is for Lightning Experience

Attention, Trailblazer!

Salesforce has two different desktop user interfaces: Lightning Experience and Salesforce Classic. This module is designed for Lightning Experience.

You can learn about switching between interfaces, enabling Lightning Experience, and more in the Lightning Experience Basics module here on Trailhead.

Learning Objectives

After completing this unit, you'll be able to:

  • List the tools included in Lightning Flow.
  • Describe the tools available for automating guided visual experiences.
  • Describe and compare the tools available for behind-the-scenes automation.
  • Describe the tools available for approval automation.

People Expect Automation

No matter whether they’re buying movie tickets, paying bills, or changing restaurant reservations, if a customer is interacting with a company, they expect a seamless, personalized experience.

For example, when a customer needs to replace her credit card, the average service agent needs to know a bunch of things. Is it damaged, lost, or stolen? If it’s stolen, is she worried about recent transactions? Where should we send the new card? Each of those questions can involve separate systems and have varying degrees of complexity.

Automation Used to Be Hard

Providing a seamless, automated customer experience has historically been challenging, time-consuming, and code-heavy. Depending on the precise nature of your business processes, you may need to:

  • Integrate various systems.
  • Configure the process logic.
  • Build modern, rich screens to provide a pleasant user experience.
  • Make the experience available from anywhere: desktop or mobile devices, internal apps, or external portals.

Meet Lightning Flow

Lightning Flow provides declarative process automation for every Salesforce app, experience, and portal.

Included in Lightning Flow are two point-and-click automation tools: Process Builder, which lets you build processes, and Cloud Flow Designer, which lets you build flows.

To sum up the differences:

  • Lightning Flow is the name of the product.
  • Process Builder and Cloud Flow Designer are the names of the tools.
  • Use Process Builder to make processes; use Cloud Flow Designer to make flows.

Later, we talk about when to use each tool, but for now here’s a sneak peek of what business processes look like in each tool.

Process Builder
A sample business process configured in Process Builder
Cloud Flow Designer
A sample business process configured in Cloud Flow Designer

With these two tools, Lightning Flow makes it easy for you to do the following.

Use Case Lightning Flow Functionality
Create a guided tutorial or wizard with screens. Cloud Flow Designer includes several out-of-the-box screen fields, like text boxes, radio buttons, and a file-upload component. If you need more than what’s offered, add custom Lightning components to your screens.
Set up automated tasks and processes. Declaratively configure logic and actions for your business process with either Process Builder or Cloud Flow Designer. If needed, you can build custom Apex code to fill any functional gaps.
Connect to external systems. Communicate changes between your Salesforce org and your external systems with platform events. Process Builder and Cloud Flow Designer let you respond to and send platform event messages. In addition, Cloud Flow Designer can retrieve data from third-party systems with External Services.
Add automation to your pages and apps. Make sure your behind-the-scenes processes start when the right thing happens, whether that’s when records change or when users click a particular button.

Once you build guided visual experiences, add them to Lightning pages, Community pages, the utility bar in your Lightning apps, and more.

Reuse what you build. In Cloud Flow Designer, any flow can be used as a subflow.

In Process Builder, create an invocable process to reuse that process’s logic or actions in other business processes.

Which Automation Tool Is Right for My Use Case?

When its all said and done, a process-driven experience isn’t backed by only one process. It’s a combination of all the business processes in your org that can impact your customer. Each business process typically falls into one of these camps.

Type of business process Description Available tools
Guided visual experience Business processes that need input from users, whether they’re employees or customers. Cloud Flow Designer
Behind-the-scenes automation Business processes that get all the necessary data from your Salesforce org or a connected system. In other words, user input isn’t needed.
  • Process Builder
  • Cloud Flow Designer
  • Apex
Approval automation Business processes that determine how a record, like a time-off request, gets approved by the right stakeholders. Approvals

From Processes to Flows to Apex

One of the hardest things for an admin or developer to figure out is when to use what tool for the job at hand. In general, it’s best to start with declarative, no-code tools and work your way up to code solutions.

Process Builder

Use Process Builder when you need to start a behind-the-scenes business process automatically. Processes can start when:

  • A record is created
  • A record is updated
  • A platform event occurs

Cloud Flow Designer

Use Cloud Flow Designer to:

  • Automate a guided visual experience.
  • Add more functionality for a behind-the-scenes process than is available in Process Builder. Build the more complex functionality in the Cloud Flow Designer. Then call the resulting flow from the process.
  • Start a behind-the-scenes business process when a user clicks something, like a button.

For example, when an opportunity is won, your company wants a renewal opportunity to be created automatically. As you see later in this module, you can build parts of that use case as a process, but the rest has to be built in a flow.


Use Apex when you need more functionality than is available in Process Builder or Cloud Flow Designer. Build the more complex functionality as invocable Apex methods. Then call the resulting Apex as an Apex action in the process or as an Apex element in the flow.

Now, let’s see these principles in practice with a few sample scenarios.

Sample Scenarios

Scenario Tool What you build
Guide a community member through requesting a new credit card with a step-by-step wizard. Cloud Flow Designer Flow
A sales rep clicks a button on an opportunity, which launches a discount calculator. Cloud Flow Designer Flow
When an account is updated, update all the contacts related to that account. Process Builder Process
When an opportunity stage is updated, update a custom checkbox field. Process Builder Process
Create a task when a platform event occurs. Process Builder Process
Update a lead record in Salesforce after a certain amount of time passes, or when a specified time is reached. Process Builder Process
When an opportunity closes, automatically create a renewal opportunity. Process Builder and Cloud Flow Designer Process and flow
Route an employee’s time-off request to a manager for approval. Approvals Approval process

Wait. What’s an Approval Process?

Surprise! We snuck another tool in here. Approvals isn’t included in Lightning Flow, but it’s a declarative way to automate something that Lightning Flow doesn’t cover. That said, Lightning Flow does support automating how a record gets submitted for approval. You see more on Approvals later in this module.

What About Workflow Rules?

If you’re not already using Workflow, you should check out Process Builder and Lightning Flow first. They have more features and can do more things. Plus, all new functionality for behind-the-scenes automation will come via Lightning Flow.

You can learn more about Workflow by visiting Salesforce Help.


Lightning bolt icon used to indicate that the content is for Lightning Experience

Remember, this module is meant for Lightning Experience. When you launch your hands-on org, switch to Lightning Experience to complete this challenge.