進行状況の追跡を始めよう
Trailhead のホーム
Trailhead のホーム

Install an AppExchange Solution

Learning Objectives

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

  • Describe Salesforce Labs solutions.
  • Install an AppExchange solution in your org.
  • Add an AppExchange solution to a process flow.

Grab your mouse and your sense of adventure. In this unit, we take you step-by-step through the process of installing and using an AppExchange solution. Then, you get to apply what you learned with a hands-on challenge. 

Here’s a high-level summary of the tasks at hand.

  1. Install the Service Agent Script for Lightning Flow component.
  2. Create a flow.
  3. Add the component to the flow.
  4. Run the flow.

Get to Know Salesforce Labs

A Salesforce Labs banner image with mountains in the background and test tubes and beakers in the foreground

In this exercise, we use a Salesforce Labs solution. If your mind just conjured up an image of mad scientists and petri dishes, think again. Salesforce Labs is a program that lets Salesforce engineers and other trailblazing employees create solutions and share them with you on AppExchange. They range from simple utilities to entire vertical solutions and are:

  • Free.
  • Ready to install.
  • Designed to solve common business challenges.
  • Open source. You can peek under the hood to see how they work and customize them as needed. It’s a great way to learn more about how the platform works.

Last but not least, Salesforce Labs solutions are an excellent way to see what’s new and exciting from Salesforce. We’re constantly launching Labs solutions that use our newest products and features.

Install a Flow Component

Your first task is installing the Service Agent Script for Lightning Flow component in your Trailhead Playground. 

First, launch your Trailhead Playground.  

  1. Make sure you’re logged in to Trailhead.
  2. Scroll to the hands-on challenge at the bottom of this page. Select the Trailhead Playground you want to use from the org list dropdown, and click Launch.

Next, get your username and password. 

  1. In your playground, click Setup and select Setup.
  2. Enter Users in the Quick Find box, then select Users.
  3. Check the box next to your name. Take note of your username.
  4. Click Reset Password(s) and then click OK. This step sends an email to the address associated with your username. If you don’t see the email, check your spam folder.
  5. Click the link in the email.
  6. Enter a new password and confirm it.

Now log in to AppExchange and install the Service Agent Script for Lightning Flow component. 

  1. In a new browser tab, navigate to https://appexchange.salesforce.com and click Log In.
  2. Enter the username and password you just got from your Trailhead Playground and click Log In.
  3. In the search bar, enter Service Agent Script for Lightning Flow and click the component listing. If you can’t find it, here’s a direct link.     A view of the Service Agent Script for Lightning Flow solution listing on AppExchange
  4. Click Get It Now.
  5. Click Install in Production. Yes, production. Your Trailhead Playground is a production instance for your personal use. You can make customizations in your playground without impacting anything else (in this case, your production org).
  6. Check the box to acknowledge you’ve read the terms and conditions, and click Confirm and Install.
  7. If prompted, enter your Trailhead Playground credentials again and click Log In.
  8. You’re the only user who needs access to this solution, so select Install for Admins Only and click Install.     A view of the Install for Admins Only option selected in the installation flow
  9. The package might take a few minutes to install. Once you see a message telling you the installation is complete, click Done to see the package in your org.

Your org displays the Installed Packages page in Setup. From here, you can view the details of individual packages and perform administrative tasks, such as uninstalling packages. 

Enable Lightning Runtime for Flows

Service Agent Script for Lightning Flow is an Aura component. To run a flow that contains an Aura component, you must enable Lightning runtime for flows in your playground org.

  1. In your playground, click Setup and select Setup.
  2. Enter process automation (1) in the Quick Find box, and select Process Automation Settings (2).     The setup menu with a circle around the phrase process automation in the quick find search box, and around the quick find result Process Automation Settings
  3. Verify that Enable Lightning runtime for flows is selected. If it isn’t, select it and click Save.     Process automation settings with a circle around Enable Lightning for runtime flows

Create a Flow

Now, create a flow that uses the Service Agent Script for Lightning Flow component to display a script from within the flow. 

  1. In your playground, click   Setup  and select Setup.
  2. Enter flow (1) in the Quick Find box, and select Flows (2).   The setup menu with a circle around the word flow in the quick find search box, and around the menu item Flows
  3. Click New Flow.
  4. Select Screen Flow (1), and click Create (2) to launch Flow Builder.    A view of the New Flow form with circles around the flow type Screen Flow, and the Create button

Flow Builder is a point-and-click tool for building flows.

Add a Screen Element to the Flow

The Flow Builder toolbox lists available elements. To add an element to the canvas, drag it from the toolbox onto the canvas. To include a visual element, such as a script, in a flow, use the Screen element. 

  1. In Flow Builder, drag the Screen element onto the canvas.     Flow Builder, showing where to drag the Screen element from the toolbox to the canvas
  2. In the New Screen window, set the screen’s Label to Retention Offer Screen. The API Name automatically populates as Retention_Offer_Screen.     The New Screen form with a circle around the Label property and the label value set to “Retention Offer Screen’
  3. Drag the agentScript component onto the screen element. You can find the Flow solutions that you install from AppExchange in the Custom section of the components list.     The New Screen form with a circle around the the agentScript component
  4. Select agentScript and, for API Name (1), enter retention_offer_script.
  5. For Script (2), enter We have a special offer for you.     The agentScript configuration form with circles around the API Name and Script fields
  6. Click Done.

Connect the Flow Elements

Next, connect the Start and Screen elements so that the script loads when the flow runs.

  1. Drag the connector node at the bottom of the Start element (1) onto the Retention Offer Screen element (2).    The Flow Builder canvas with the Start element connected to the Retention Offer Screen element

Save and Run the Flow

You’ve configured the screen element and added it to the flow. Save the flow and you’re ready to run.

  1. Click Save.     The Flow Builder canvas with a circle around the Save button
  2. For Flow Label (1), enter Retention Offer Flow. The Flow API Name automatically populates with Retention_Offer_Flow.
  3. Choose Screen Flow from the Type (2) dropdown.
  4. Click Save (3).     The Save the flow form with a circle around the Flow Label and Type fields, and the Done button
  5. A warning message notifies you that the flow includes a screen component, which is available only in Lightning Experience. Salesforce Classic users cannot utilize screen components. Click X to close the warning message.
  6. Click Run.
  7. Verify the script displays on the screen.
    The script displays on the screen when the flow runs.

Well done! You used Flow Builder to create a flow that uses the Lightning Flow component you installed from AppExchange. 

Resources