Create Flow Local Actions using Lightning Web Components

To execute client-side logic in your flow, build or modify custom Lightning web components to use as local actions in flows. For example, get data from third-party systems without going through the Salesforce server, or open a URL in another browser tab. After you configure the component’s meta XML, and JavaScript code, it’s available in Flow Builder as a Core Action element.

  • Lightning web components in flows must comply with Lightning Locker restrictions.
  • Flows that include Lightning web components are supported only in Lightning runtime.
  • Lightning web components require a browser context to run, so flow local action components are supported only in screen flows.

Here’s a sample ShowToastExampleComponent component and JavaScript class, which triggers an alert that displays a toast message on screen before navigating to the next flow screen. In Flow Builder, local actions are available from the Core Action element.

Use the lightning/toast module instead to display a toast notification on LWR sites. For more information, check out Component Reference: Toast.