Mostafa_OUDDERHEM | 2019-12-10 09:01:14 UTC | #1
Hi all,
I have a question regarding a value of variables in Script to be retrieved as Participant data in the Call Flow
For example, I want the Scripter.Agent Name value to be passed to the Call Flow Participant data in order to retrieve it at the last of the call (through API "get call conversation")
I mean that we want to configure input/ouput variable in Script with name like for example: agentFullName
Then, we have to retrieve the name of the agent in the Architect as attributes, once the call finished, see the example below:
attributes":{ "agentFullName":"Jean Dupon", "conversationType":"C", "Contact":"MOSTAFA", "objectCall":"TEST", "scriptId":"bb6c06d3-2523-466c-bd7e-a7db7210f160", "event":"Incoming", "date":"2019-12-09T11:48:57.000Z", "Num_ANI":"0123456789", "ScreenPopName":"TEST"
Please, do you know how I can do this ?
Thank you in advance.
tim.smith | 2019-12-10 16:21:28 UTC | #2
Output variables get written to participant attributes. https://help.mypurecloud.com/articles/script-input-output-variables/
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.
Mostafa_OUDDERHEM | 2019-12-12 22:05:00 UTC | #3
Hi Tim, thanks for your reply
My next question is, in which part of the conversation (If get conversation per ID through API) I can find the values of the ouptut variables configured on the Script ?
Thank you in advance
tim.smith | 2019-12-12 22:43:08 UTC | #4
They're participant attributes on the conversation.
Mostafa_OUDDERHEM | 2019-12-13 06:21:57 UTC | #5
Thank you Tim, yes, I can found the attributes but how to fill the variable automatically without be entered by the agent, for example for Agent Name, how to enter agent name automatically and retrieve it in attributes at the end of the conversation ?
Thank you.
tim.smith | 2019-12-13 16:09:50 UTC | #6
You can use the Set Variable action to set the variable so it will be written to the participant attributes. How you trigger this action is up to you depending on how you want it to behave.
Mostafa_OUDDERHEM | 2019-12-17 11:09:15 UTC | #7
Thank you Tim, I see now how to create custom data action with "Set variable" step Now, what I need only how to trigger this automatically in a field within the Script
Thank you.
tim.smith | 2019-12-17 15:52:36 UTC | #8
Mostafa_OUDDERHEM, post:7, topic:6679
how to trigger this automatically in a field within the Script
You can trigger actions on page load, button press, or input value changed.
Mostafa_OUDDERHEM | 2019-12-17 19:24:08 UTC | #9
Hi Tim, great!! It works fine...thank you
system | 2020-01-17 19:24:10 UTC | #10
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 6679