How to Pass Record Data from a Flow to a Subflow

Soki Ando
Tera Contributor

I want to trigger a flow when a case is created on a Consumer record, and then automatically create a task using a subflow action. I would like to link the Consumer record that triggered the case creation with the task record that was generated.

When a support case is created on the Consumer record, the flow is triggered, and a task is generated, but the task is not linked to the Consumer record that initiated the process.

I believe the reason for this is that the record data is not being passed from the main flow to the subflow. I would like to know how to resolve this issue.

Current Situation:
I’ve added a related list to the Consumer table and added a reference to the Task table.

I’m setting the Consumer record in a flow variable.
In the first step, I use "Set Flow Variables" to assign the Consumer record. I expect this to pass the Consumer record’s data to the subsequent subflow, but it doesn’t work (the subflow’s flow variable is not being set).
If you know of a solution, please let me know.

5 REPLIES 5

vermaamit16
Kilo Patron

Hi @Soki Ando 

 

The way you are passing the variable value to your sub-flow is incorrect. You need to pass the flow variable by following the steps mentioned below:

1. Click on the button highlighted in yellow to select your flow variable.

AmitVerma_3-1727230463103.png

 

2. Select the flow variable to pass it to your sub-flow. 

 

Thanks and Regards

Amit Verma

Thanks and Regards
Amit Verma

Thank you for your reply.
By the way, do you know which flow variable I should select?
It seems that I can only select specific fields.

SokiAndo_0-1727231689891.png

 

You need to open your sub-flow and check how the inputs are being configured for the sub-flow. I think you are expecting a String variable. From your problem statement, I can understand that you want to pass consumer record so you should set your sub-flow variable accordingly to receive Consumer Record from flow.

Thanks and Regards
Amit Verma

Thank you for your reply. input of a subflow is string. Which flow variable I should select?

SokiAndo_0-1727232847601.png