Retrieve Scripts variable as Participant data in a subsequent call flow

Hello,

I'm encountering difficulties to retrieve the value of a variable from my script in the subsequent call flow.
Here is the use case:

An agent gets a call, on his Script he has a specific dropdown list with other agents.
When he select an agent in this dropdown, I populate the variable SelectedUser with "Output" toggle turned to yes.
When the agent has selected the user, he has a button to click to transfer the call.
This button is in fact a "Scripter. Blind Transfer" action to another of our call flows.

When I'm in this call flow, I need to retrieve the value "SelectedUser'" set in the Scripts. So I tried with the "Get Participant Data" default Architect action with "SelectedUser" as a value but it's always empty....

I can't understand why because if I check in my conversation via API I can see it as attributes :

"attributes": {
"SelectedUser": "Nathan Tossens"
},

What did I do wrong? Is it another way to do it?

I know that with "Scripter.Invoke Secure Flow" you can directly pass a data but then the call is not flagged as "Transferred" in Performance -> Interaction so this is not a solution for me.

Thanks in advance for your help.

Regards,

Nathan.

Hi Nathan

Yeah we ran into that too. Output in scripts is more for external apps to process and use.
Which is odd, its easier for an external app to grab that data than it is for a Genesys flow to.

So what we do is setup a data action for Genesys API
/api/v2/conversations/{conversationId}/participants/{participantId}/attributes
We can use this to update the participant data and then in your flow you can use the normal get participant data action to retrieve it.

If you need a hand setting up this data action, just sing out.

Documentation on Output variable

The Output property makes it possible to store the value of a script variable for use after a call ends, without having to set up a data action, or add supplemental columns to a contact list. When Output is set to Yes, the value of this script variable is written to the conversation object. Its saved value may be programmatically retrieved by a customer’s external process. To use a variable as an output variable, enable Output. When the value of this variable changes during execution of a script, the conversation object is updated in 3 seconds.

3 Likes

Hi Anton,

it works perfectly :slight_smile:

Thanks a lot for your help !

Kind regards,

Nathan.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.