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.
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.
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.
Build Process-Driven Experiences with Lightning Flow
- Process Builder
- A simple but versatile tool for automating simple business processes. In Process Builder, you build processes.
- Cloud Flow Designer
- A drag-and-drop tool for building more complex business processes. In the Cloud Flow Designer, you build flows.
With these two tools, Lightning Flow makes it easy for you to do the following.
|Use Case||Lightning Flow Functionality|
|Create exactly the right screens to guide users through a process.||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.|
|Build the guts of your business processes—the logic and actions—with little-to-no code||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 your business processes 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.|
|Put your business processes to work behind the scenes or in your Salesforce apps and portals.||Make sure your behind-the-scenes processes
start when the right thing 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 logic, actions, or screens across multiple business processes.||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?
- Guided visual experiences: Business processes that need input from users, whether they’re employees or customers.
- 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.
Guided Visual Experiences
For example, build a flow that guides users through the process of requesting a new credit card.
Business Processes that Start Automatically
Most behind-the-scenes business processes are designed to start automatically when a particular thing occurs. Generally, we refer to that “thing” as a trigger. Business processes can be automatically triggered when:
- A record changes
- A platform event message is received
- A certain amount of time passes or specified time is reached
Regardless, for business processes that should start automatically, we recommend using Process Builder for a few reasons.
- Process Builder is the simplest Lightning Flow tool for the job.
- For a given object, Process Builder lets you control the order of your business processes without any code.
- In Cloud Flow Designer, you can’t define a trigger. For a flow to start automatically, you have to call it from something else, like a process or Apex trigger.
(Remember: With Process Builder, you build processes. With Cloud Flow Designer, you build flows.)
If you can't automate all your logic and actions in Process Builder, don’t worry. You can build the more complex functionality in the Cloud Flow Designer, then call the resulting flow from Process Builder. If the functionality is too complex even for the Cloud Flow Designer, you can do the same with Apex code.
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.
Business Processes That Start with a Click
But what if you don’t want your behind-the-scenes process to start automatically? For example, if a sales rep wants to offer the customer a discount, you need to offer a way to automatically calculate the available discount.
If your behind-the-scenes business process should start when a user clicks something, use Cloud Flow Designer to build a flow. Then distribute that flow with a custom button or link on the appropriate page.
For example, an employee’s time-off request has to be approved by the employee’s manager. You need to ensure that when a time-off request is submitted for approval, the right person (the employee’s manager) receives the request.
Beyond the Basics
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 that later in this module.
- Salesforce Help: Which Automation Tool Do I Use?