When you embed a flow in a lightning-flow component, you can show or reference the flow’s variable values.
To use this component, build a flow with the Salesforce Flow Builder first. The component includes the navigation buttons Back, Next, Pause, and Finish.
If your flow has custom Lightning web components or Aura components, then you can’t use lightning-flow on Experience Cloud sites that use Lightning Web Runtime.
Note
Use the onstatuschange Event Handler
To get values from the flow’s output variables, use the onstatuschange event handler. Output variables are returned as an array. The variable must allow output access. If you reference a variable that doesn’t allow output access, attempts to get the variable are ignored.
Example: Display Output Variables from Flow
This example takes the flow’s output variables for accountName and numberOfEmployees and displays them in the template.
This release is in preview. Features described here don't become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can't guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.