Newer Version Available
Set Flow Input Variable Values from a Wrapper Aura Component
You can set variables only at the beginning of an interview, and the variables you set must allow input access. If you reference a variable that doesn’t allow input access, attempts to set the variable are ignored.
For each variable you set, provide the variable's name, type, and value. For type, use the API name for the flow data type. For example, for a record variable use SObject, and for a text variable use String.
Example
This JavaScript controller sets values for a number variable, a date collection variable, and a couple of record variables. The Record data type in Flow Builder corresponds to SObject here.
Example
Here's an example of a component that retrieves the most recently modified account via an Apex controller. The Apex controller passes the data to the flow's record variable through the JavaScript controller.