Get Values from Flow Output Variables
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.
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.
This example takes the flow's output variables for
numberOfEmployees and displays them in the template.