I have not been able to find this version of the solution on other threads, so I thought I would share if it helps someone out.
1. In the agent script, create a variable (vReturnFromScript) for this example. Toggle 'input' to true, with no default value. Make multiple variables if you want to get multiple values back from the secure flow.
2. In the agent script, create a custom action.
a. The first step in the action should be the standard 'Scripter.Invoke Secure Flow' action. Select the destination secure flow, enable 'return after flow completion' and put some data in the Flow Data field (this can be accessed in the secure flow as Flow.InvocationData).
b. The second step in the action should be the standard action 'Scripter.Refresh Input Variables'.

3. In the agent script, place a button that you want the agents to click to send the call to the secure flow and associate the Click Action with newly created custom action.
4. In the secure flow, place a set participant data block and use the key name of the input variable in the script (vReturnFromScript) and make the value whatever information you want to return to the agent script. Set as many participant data values as you need to match the variables you set in step 1.
5. Reference the variables in your agent script just like normal. They will have null/empty values until the call returns to the agent from the secure flow, at which point they will take on the value of the participant data key of the same name.
This is similar to the method where you execute a data action in the agent script to get the participant data values from the interaction, but it is cleaner and easier to implement, especially if you have multiple values you want to access or if you are data action conscience.
Community Post 1
Community Post 2
Developer Post 1
Developer Post 2
#PlatformAdministration#Routing(ACD/IVR)#Unsure/Other
------------------------------
Kevin Goodwin
Mediu, Inc.
------------------------------