Open Flow Dialog

Overview

The "Open Flow Dialog" interaction lets users launch Salesforce flows directly from within a screen flow. An administrator can configure this interaction to streamline processes, guide users through complex tasks, or provide quick access to specific functionality.


Tutorials


Specification

The "Open Flow Dialog" lets you launch a Salesforce flow from within your screen flow. Here's a breakdown of the attributes you can configure:

Launching the Flow

  • Flow API Name: Select the flow you want to launch when a user triggers this interaction.

Passing Data to the Launched Flow (Input Variables)

  • Input Variable / Name: The API name of the variable in the launched flow that you want to set.

  • Input Variable / Value: The value you want to pass to the input variable.

  • Input Variable / Type: Choose the data type you're passing (Text, Number, Boolean, Date, Date/Time, Custom).

  • Allow multiple values (collection): Enable this to pass a collection of values (like a list of records) to the input variable.

Configuring the Dialog Box

  • Modal Header: Enter a title for the dialog box that will display the launched flow or mapped this to a variable to make it dynamic.

  • Accessible Description: Describe how to improve accessibility for users with screen readers.

  • Size: Choose the dialog box size (Small, Medium, Large).

Handling Flow Outcomes (Output Variables)

  • Output Variable / Name: The API name of the variable in the launched flow that you want to capture. This must match precisely the API name in the launched flow.

  • Output Variable / Variable Number: Select a number to identify this output variable. You'll use this number to access the variable in your original flow.

Actions After the Launched Flow

  • On Finish: Choose actions to happen after the launched flow finishes, such as refreshing data in the original flow or triggering a fun animation.

  • On Close: Define an interaction that occurs when the user closes the dialog box.

  • On Error: Specify an interaction to run if an error occurs in the launched flow.

Accessing Output Variables

  • You can access captured output variables in your original flow using the flowInteractionOutputVariables attribute of the "Open Flow Dialog" component. Refer to the variable by its assigned number.


Capture Output Variables

To use this feature, make sure you have version 6 or later of the Avonni Components package.

The "Open Flow Dialog" interaction now allows you to capture output variables from the flow you launch. This means you can pass information from the launched flow back to your original screen flow, making your flows more dynamic and efficient.

Step-by-step guide

  1. Launch a Flow Within a Flow: Use the "Open Flow Dialog" to embed another flow within your current screen flow. This is the flow from which you'll get data.

  2. Prepare the Launched Flow

    • In the launched flow, create a variable to hold the information you want to pass back.

    • Important: Make sure this variable is marked as "Available for Output" by checking the corresponding checkbox.

  3. Configure the "Open Flow Dialog"

    • Find your original screen flow's "Open Flow Dialog" interaction element.

    • In the interaction's properties, locate the "Output Variables" attribute.

    • Add a new output variable and enter its API Name. This must match exactly the API name of the variable you created in the launched flow.

    • Select a variable number from the list. This number helps you identify the variable later.

  4. Use the Captured Variable

    • In your original flow, you can now access the captured variable. Look for it under the flowInteractionOutputVariables attribute of the "Open Flow Panel" component and select the chosen variable number above.

    • Use this variable in subsequent elements and logic within your flow, just like any other variable.

Example

Imagine you have a flow to collect customer information. You can use "Open Flow Dialog" to launch a flow that validates the customer's address. The address validation flow can then return a "Validation Status" output variable (e.g., "Valid" or "Invalid"). You can use this variable in your main flow to decide whether to proceed with the order or display an error message.

By capturing output variables, you can create more interconnected flows, automate more of your business processes, and improve the user experience.

Last updated