Runtime Considerations for Flow Screen Components

When you’re configuring components for flows, review these considerations for defining attributes and flow runtime behavior.

  • Handle null default input values.

    If a flow admin doesn’t set a default input value for a custom screen component, Flow Builder passes a null value at component run time. To set a default value at run time, add a null handler.

  • Handle hidden component output values.

    If a screen component is hidden, all output attributes are set to null when the user navigates away from the screen.

  • Notify runtime of attribute changes.

    Lightning web components use events to report changes from components to flows. To notify the flow runtime of attribute changes, a component fires the FlowAttributeChangeEvent event. For example, use this event when using conditional visibility to render a screen component when conditions are met or when mapping the value of output attributes to flow variables. For code samples, see lightning-flow-support.

  • Consider the default attribute behavior.

    All flow screen component input attributes are also output attributes by default.

See Also

Release Preview

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.