Time Estimate

Topics

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.

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

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 and Cloud Flow Designer. Later, we talk about when to use each tool, but for now here’s a sneak peak of what business processes look like in each tool.
Process Builder
A simple but versatile tool for automating simple business processes. In Process Builder, you build processes.
A sample business process configured in Process Builder
Cloud Flow Designer
A drag-and-drop tool for building more complex business processes. In the Cloud Flow Designer, you build flows.
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 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 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 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?

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.
  • 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

If the business process you’re automating requires user input, use the Cloud Flow Designer to build a flow. That way, you can provide a rich, guided experience for your users, whether in your Salesforce org or in a Lightning community.

For example, build a flow that guides users through the process of requesting a new credit card.

In a credit card request flow, this screen lets the customer choose what they want to get out of the card, like rewards or no annual fee.

Behind-the-Scenes Automation

For example, when someone updates an account’s address, make sure that the addresses for the child contacts match.

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.
    Note

    Note

    If you’re not already using Workflow, we strongly advise against starting. All new functionality for behind-the-scenes automation will come via Lightning Flow.

  • 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.

Approval Automation

To automate your company’s business processes for approving records, use Approvals to build an approval process.

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.

Resources

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.

retargeting