Using a Lightning Web Component in Salesforce Flows

Let's look at how to use a Lightning Web Component in Salesforce Flows

No one can deny the fact that Salesforce Flows has been getting all the love from Salesforce.

As a part of that Salesforce made sure that a Lightning Web Component can be embedded in a Lightning Flow. The only thing that we need to watch out for is the target in the XML file.

We can source an LWC into a Salesforce Flow by using the below target.

    <targetConfig targets=”lightning__FlowScreen”>
		<property name="NewRecord" type="String"/> 
		<property name="Message" type="String"/> 
Target file of a Lightning Web Component

You might be interested in this!

How to source an LWC to QuickActions, Communities, Home Page and etc.

It’s also very easy to pass data from Flow to LWC using the public properties,  resources in flows and vice versa.