Screen Flow Distribution

Get Started with Flow Distribution

Describe what you should do before you distribute a flow. List the various ways you can distribute a flow. Build a simple screen flow.
  • After building and testing a flow, the next step is to make the flow accessible to users.
    • For flows with screens:
      • Lightning pages, Flow actions, Utility bar, Community pages, Custom Lightning components, Visualforce pages, Web tabs, Custom buttons and links
    • For autolaunched flows, the list also includes:
      • Processes, Bots, Apex actions, and the API
  • Users need to be able to actually run flows. Add the “Run Flows” permission to user profiles/permission sets for the org.
    • To view the permissions assigned to a specific flow, click the down arrow next to a flow, then click “Edit Access.” If “Override default behavior and restrict access to enabled profiles or permission sets” is selected, add the flow itself to profiles/permission sets.
  • Users with the Run Flows system permission can only run Active Flows. Only admins with the Manage Flow user permission can run Inactive Flows.

Display a Flow on a Page in Your Salesforce Org

Describe use cases for displaying a flow on a Lightning page. List the types of Lightning pages. Create a new Lightning page and add a flow to it.
  • If you want to expose a flow as a region of a Salesforce page, the only choice is a Lightning page, built using the Lightning App Builder

    • Several available types of Lightning pages with different use cases:
      • Home pages: seen when users navigate home
      • Record pages: seen when users open a record
      • App pages: page that isn’t tied to an object
      • Email application pages: what users see from Lightning for Outlook or Lightning for Gmail
    • Good option if:
      • Flow is important enough to take up screen space
      • Flow is going to be used frequently
    • If you add a flow to a Lightning page, every time the page loads, the flow starts and its first screen renders. If the flow includes elements that come before that screen, the flow performs those actions even if the users is working with a different element. For this reason, recommend making the first element in these flows a screen so unintended actions are avoided.
  • Just drag and drop a “Flow” element onto the page and select the appropriate flow

Add a Flow as an Action on a Record

Describe use cases for adding a flow as an action. Create a flow action, and add it to a page layout.
  • For some use cases, it makes sense to have the user decide when they’re ready to launch a flow:
    • First element in the flow isn’t a screen
      • Ex: Flow creates a task before displaying a screen to the user. If flow is added to the Account page, the flow would create a task every time a user loaded an account, resulting in a lot of unnecessary tasks being created.
    • Flow isn’t used often enough to be expanded by default
  • Flow Actions are custom actions that renders a flow.
    • Once created and added to a page layout, it appears in the associated record’s page-level action menu. Flow actions can also be placed in the record’s action menu in the Salesforce app.
    • Create via: Object Manager > Buttons, Links, and Actions > New Action > Action Type: Flow
    • Once the flow action is created, add it to the appropriate page layouts to make the button available
      • Page Layout > Mobile & Lightning Actions > drag new action to Salesforce Mobile and Lightning Experience Actions section

Display a Flow on Every Page in Your Salesforce Org

Describe use cases for displaying a flow on every page in your app. Create a Lightning app and add a flow to its utility bar.
  • Previous two sections:
    • Flow is important enough to be expanded automatically: Lightning page
    • Flow should be accessible from a record but not expanded automatically: Flow action
  • Third use case: Flows that should be accessible from records of more than one object: Add flow to Lightning utility bar
    • Lightning utility bar appears as a fixed footer that is tied to a specific Lightning app
  • Set up via: Setup > Apps > App Manager, select an app, select “Utility Items (Desktop Only)”, select “Add Utility Item”, select “Flow”
    • Note the utility bar now running along the bottom of the page, but only in the app specified

Summary

  • Flow belongs in a utility bar when users need access to it from anywhere in an app
  • When you add a flow to an app’s utility bar, it’s available on every page in that app
  • To add a flow to a utility bar: In Setup, open a Lightning app in the App Manager

Display a Flow on a Page Outside Your Salesforce Org

Describe use cases for displaying a flow outside your Salesforce org. List the types of Lightning Community pages. Create a new Lightning Community page and add a flow to it.
  • The previous three options (Lightning page, Flow action, Lightning utility bar) were all for users actively logged into a Salesforce org. What about people without a Salesforce license?
    • Can add flows to our org’s Lightning communities. Putting a flow on a Community page is as easy as putting a flow on a Lightning page.
      • Examples of flows that are perfect for portals built on Salesforce Communities:
        • Surveys
        • Registration forms
        • Interest forms
        • Quote generators, such as for a car they’re selling
    • Another option for external apps: embed the lightning:flow component using “Lightning Out.” Investigate Aura Components as a starting point
  • Adding a Flow to a community is accomplished through the Community “Experience Builder”
    • From the Components pane, drag and drop a “Flow” component onto the page

Summary

  • All Lightning Community page types support the Flow component
  • The following are appropriate to distribute as a Flow in a community, instead of in the actual org:
    • Interest form for new University course
    • Survey to collect product feedback
    • Registration form for company’s conference
  • Flow is fully rendered when you publish the community (not available during preview)