Ora

How do I add screen flow?

Published in Salesforce Flow Automation 4 mins read

To add a Screen Flow in Salesforce, you'll utilize the Flow Builder to create interactive, step-by-step processes that guide users through a series of screens. These flows are perfect for collecting information, updating records, or performing actions based on user input, acting like a wizard within Salesforce.

Getting Started: Creating a Screen Flow

The journey begins in Salesforce Flow Builder, where you define the logic and user interface of your interactive process.

  1. Access Flow Builder:
    • From Salesforce Setup, navigate to Process Automation > Flows.
    • Click the New Flow button.
  2. Select Flow Type:
    • Choose Screen Flow from the available flow types. Screen Flows are specifically designed to interact with users and display data.
    • Click Create.

Designing Your First Screen

Once you're in the Flow Builder canvas, the first critical step is to add a screen element to begin gathering or displaying information.

  1. Add a Screen Element:
    • From the Toolbox on the left side of the canvas, drag the Screen element onto the workspace.
  2. Configure Screen Properties:
    • In the Screen Properties pane that appears on the right, you'll define the screen's basic details:
      • For the Label, enter a descriptive name such as Questions. This label is crucial for your own organization and clarity on the Flow Builder canvas.
      • Important Note: The label you enter here (Questions) is for internal reference only within the Flow Builder canvas and is not visible to end-users. Users will see the overall flow's name prominently displayed at the top of the screen when they run the flow.
      • The API Name will automatically populate based on your label but can be adjusted if needed.
    • Click Done to save the screen's basic configuration.

Adding Components to Your Screen

After creating the screen, you need to populate it with interactive components to collect input or display information.

  • Drag and Drop Components: From the Components section in the Toolbox, drag the desired input or display elements onto your screen.
    • Input Components are used to gather data from users:
      • Text: For short text entries (e.g., Name, Email).
      • Number: For numerical input (e.g., Age, Quantity).
      • Date/Time: For selecting specific dates or times.
      • Checkbox: For true/false selections.
      • Picklist: For selecting from a predefined list of options.
      • Lookup: To search for and select a related record (e.g., Account, Contact).
      • File Upload: To allow users to attach files.
    • Display Components are used to show information to users:
      • Display Text: For instructions, messages, or dynamic content.
      • Image: To embed visual elements.
  • Configure Component Properties: For each component you add, set its Label, API Name, and any other specific properties (e.g., default values, validation rules, required fields).

Essential Steps After Screen Design

To make your Screen Flow functional and available to users, follow these critical steps:

  1. Connect Elements:
    • Connect the Start element to your newly created Screen element by dragging a connector line between them. If you have multiple screens or other elements, connect them logically to define the flow's path.
  2. Save Your Flow:
    • Click the Save button in the Flow Builder header.
    • Provide a descriptive Flow Label (this is what users might see as the flow's name).
    • An API Name will be generated.
    • Add an optional Description.
    • Click Save.
  3. Activate Your Flow:
    • Once saved, click the Activate button in the Flow Builder header. An inactive flow cannot be run by users.
  4. Distribute Your Flow:
    • A Screen Flow needs to be placed somewhere for users to access it. Common distribution methods include:
      • Lightning Pages: Add it as a "Flow" component on a record page, app page, or home page.
      • Experience Cloud Sites: Embed it on a page within your community.
      • Custom Buttons or Links: Create a custom action that calls the flow.
      • Utility Bar: Add it to the utility bar of a Lightning App for easy access.
      • Custom Tabs: Create a tab that hosts your flow.

Best Practices for Screen Flows

To create effective and user-friendly screen flows, consider these tips:

  • Simplify User Experience: Keep screens concise, use clear and intuitive labels, and provide helpful guidance through text or tooltips.
  • Test Thoroughly: Always test your flow in various scenarios, including different user profiles and data conditions, to ensure it works as expected.
  • Implement Error Handling: Use fault paths or custom error messages to gracefully handle unexpected issues and provide a better user experience when things go wrong.
  • Use Naming Conventions: Maintain consistent and descriptive naming conventions for flows, screens, variables, and components to improve maintainability.
  • Security and Permissions: Ensure that users have the necessary permissions to run the flow and access any records or fields involved.