Choose the Right Automation Tool
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? Serving a customer in this situation and gathering and maintaining related data can involve separate systems with 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 have had to:
- Integrate various systems.
- Configure process logic.
- Design and build an end-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 Flow Builder, which lets you build flows.
To sum up the differences:
- Lightning Flow is the name of the product.
- Process Builder and Flow Builder are the names of the tools.
- Use Process Builder to make processes; use Flow Builder to make flows.
Later, we talk about when to use each tool, but for now here’s a sneak peek at what business processes look like in each tool.
- Process Builder
- Flow Builder
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.||Flow Builder includes several out-of-the-box screen components, like text boxes, radio buttons, and file-uploads. If you need more than what’s offered, add custom Aura components to your screens.|
|Set up automated tasks and processes.||Declaratively configure logic and actions for your business process with either Process Builder or Flow Builder. 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
Process Builder and Flow Builder let you respond to and send platform event messages. In addition, Flow Builder 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 action happens, whether
that’s when records change or when users click a
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 Flow Builder, any flow can be used as a
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 it’s 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.||Flow Builder|
|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.||
|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 a 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.
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
Use Flow Builder to:
- Automate a guided visual experience.
- Add more functionality for a behind-the-scenes process than is available in Process Builder. Use Flow Builder to build the more complex functionality. 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 Flow Builder. 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 action element in the flow.
Now, let’s see these principles in practice with a few sample scenarios.
|Scenario||Tool||What You Build|
|Guide a community member through requesting a new credit card with a step-by-step wizard.||Flow Builder||Flow|
|A sales rep clicks a button on an opportunity, which launches a discount calculator.||Flow Builder||Flow|
|When an account is updated, update all of the contacts related to that account.||Process Builder||Process|
|When an opportunity stage is updated, also 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 Flow Builder||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 offers 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’ll learn more about Approvals later in this module.
If you’re not already using Workflow, you should check out Process Builder and Flow Builder first. They have more features and can do more things. Plus, Flow Builder includes all-new functionality for behind-the-scenes automation.
You can learn more about Workflow by visiting Salesforce Help.
- Salesforce Help: Which Automation Tool Do I Use?