Embedded screen flows

Embedded screen flows

3B Portals can run a Salesforce screen flow directly inside a portal page using the Screen Flow standard component (x-flow-component), backed by Lightning Out.

Adding a screen flow to a page

In the builder, drag the Screen Flow block (category Interactions) onto the page and set its traits:

How it works

The x-flow-component renders in light DOM so Lightning Out can inject into it. On render (skipped in the builder, where it shows a not previewable card):

  1. It parses component-params into the flow input shape { name, type: 'String', value }. All inputs are passed as String.
  2. It calls $Lightning.use("b3p:lightningOutFlow", ...).
  3. It creates a lightning:flow component in the mount div and calls startFlow(flowName, inputs).
  4. It observes the flow through onstatuschange, reading event.getParam('status'). On STARTED it hides the spinner; on FINISHED it logs completion.

Merge tags work in component-params values, so you can pass the current record or contact into the flow, for example a value of {{contactUser.Id}} or {{record.Id}}. See Merge tags and dynamic data.

Guest user support

The Lightning Out app b3p:lightningOutFlow extends ltng:outApp and implements ltng:allowGuestAccess, and declares a dependency on lightning:flow. That is what lets unauthenticated Site guest users run the embedded flow. The Visualforce host page includes the Lightning Out framework through apex:includeLightning. Make sure the flow itself and any objects it touches are accessible to the guest user profile.

Current limitations

Legacy host page

The package also ships FlowEmbeddedComponent.page, a Visualforce page that hosts a lightning:flow directly with recordId and flowName URL parameters. The standard x-flow-component is the current approach for embedding flows inside builder pages; the standalone page remains for direct linking scenarios.