Flow Builder Integration

Overview

Avonni Dynamic Components offer four distinct ways to connect to Salesforce Flow Builder. You can run auto-launched flows in the background, open screen flows in a modal or side panel, or embed a screen flow directly into your component layout.

Each method serves a different purpose. This page helps you understand which one to use and when.

When to Use Each Method

Method
Flow Type
What the User Sees
Best For

Auto-launched flows only

Nothing — runs in the background

Fetching data on load, bulk record updates, running calculations, any automation that doesn't need user input

Screen flows

A modal popup over the page

Guided processes triggered by a button click (create a record, fill a form, run a wizard)

Screen flows

A side panel (left or right)

Inline editing, contextual forms that stay visible alongside the component

Screen flows

The flow renders directly in the component layout

Embedding a persistent flow as part of the page (questionnaires, checklists, kiosk-style data entry)

How They Compare

Data Flow

All four methods support passing input variables from your Dynamic Component into the flow and capturing output variables back when the flow finishes.

Input variable types supported: Text, Number, Boolean, Date, Date/Time, Salesforce Object (SObject), and Custom. All support collections.

Output variable differences

Method
Output Variable System

Execute Flow

Up to 10 numbered slots (variable1 through variable10) stored in flowInteractionOutputVariables

Open Flow Dialog

Up to 10 numbered slots (same system)

Open Flow Panel

Up to 10 numbered slots (same system)

Flow Component

Maps each output variable directly to a Dynamic Component resource (Variable) — more flexible, no slot limit

Interaction Chaining

After a flow finishes, you can trigger follow-up actions. The available event hooks differ by method:

Method
On Finish
On Error
On Close
On Started
On Paused

Execute Flow

Open Flow Dialog

✅ (user closed the modal)

Open Flow Panel

✅ (user closed the panel)

Flow Component

Common chained actions include: Show Toast, Refresh All Queries, Navigate, Assignment, or even launching another flow.

Execution

Method
Where It Runs
How It's Triggered

Execute Flow

Server-side via Apex

Any interaction trigger (button click, on load, row action, etc.)

Open Flow Dialog

Client-side (lightning-flow inside a Lightning Modal)

Any interaction trigger

Open Flow Panel

Client-side (lightning-flow inside a side panel)

Any interaction trigger

Flow Component

Client-side (lightning-flow embedded in the layout)

Runs automatically when the component renders (if visibility conditions are met)

Common Patterns

Fetch Data on Page Load

Use Execute Flow with an On Load interaction to run an auto-launched flow when the component first renders. The flow can query records, perform calculations, or call external services — then return results to output variables that feed into your component's display.

Example: On Load → Execute Flow Calculate_Account_Health_Score with accountId = {!$Component.RecordId} → Store the score in variable1 → Display it in a Metric component.

Button Click Opens a Creation Form

Use Open Flow Dialog on a button's On Click interaction. Pass context (like a parent record ID) as an input variable. On Finish, refresh the data and show a success toast.

Example: Data Table header button "New Contact" → Open Flow Dialog Create_Contact_Flow with AccountId = Record: Account ID → On Finish: Refresh All Queries + Show Toast "Contact created."

Inline Editing in a Side Panel

Use Open Flow Panel on a row action button. The panel slides in from the right, showing a screen flow pre-filled with the selected record's data. The user edits without leaving the page.

Example: Data Table row action "Edit" → Open Flow Panel Edit_Contact_Status with ContactId = @ThisItem.Id → Position: Right, Size: Medium → On Finish: Refresh All Queries.

Persistent Embedded Flow

Use the Flow component to place a screen flow directly in the component layout. It renders inline — no button click needed. Combine it with other components (a Kanban on the left, the flow on the right) for split-screen workflows.

Example: A Dynamic Component on the Case record page has a Flow Element running Quick_Update_Task_Flow with inputCaseId = {!$Component.RecordId}. Finish Behavior is set to Restart so the user can submit multiple tasks in a row.

Choosing the Right Method

Use this decision tree:

  1. Does the flow need user input (screens)?

    • No → Use Execute Flow (auto-launched, server-side, no UI)

    • Yes → Continue to step 2

  2. Should the flow be visible at all times, as part of the page layout?

    • Yes → Use the Flow component (inline embed)

    • No → Continue to step 3

  3. Should the flow appear alongside the component content, or overlay it?

    • Alongside (side panel) → Use Open Flow Panel

    • Overlay (modal popup) → Use Open Flow Dialog

Info

You can combine multiple methods in the same Dynamic Component. For example: an On Load interaction runs Execute Flow to fetch data, a button opens an Open Flow Dialog for record creation, and a Flow Component provides a persistent inline form — all in the same component

Was this helpful?