I am trying to launch a flow from an aura component. In the flow, I have an apex variable of type "Apex-Defined Collection variable". How to set the value of this variable from the aura component? I have two other string variables in the flow, I am able to set them, but when I set the value in the apex defined var, the flow fails to launch. Below is the relevant code from the aura component:
const flow = component.find("flowData");
const inputVariables = [
{
name: "varCaseId",
type: "String",
value: component.get("v.recordId")
},
{
name: "varAccountNumber",
type: "String",
value: response.accountNumber
},
{
name: "varIntents",
type: "Intent",
value: response.intents
}
];
flow.startFlow(response.flowAPIName, inputVariables);
If I remove the third element from the inputVariables array, then the flow launches correctly, otherwise not. Any idea what am I doing wrong here?