Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: cmpark on November 21, 2022, 06:30:25 AM
-
I have to use SendRequest to attach userdata.
Because I need to change the userdata of another call, I can't use the current connid. (Update funciton)
so, How to user SendRequest funtion for attach userdata?
maybe,
SendRequest[RequestUpdateUserData,Cat['thisdn:', v_thisdn, '|connid:', v_connid, '|userdata:', v_userdata]]
But I don't know the format of the v_userdata part.
-
You can't update another calls UData...only agent participating on it can do such.
What is your call scenario?
-
[quote author=cmpark link=topic=12367.msg55107#msg55107 date=1669012225]
I have to use SendRequest to attach userdata.
Because I need to change the userdata of another call, I can't use the current connid. (Update funciton)
so, How to user SendRequest funtion for attach userdata?
maybe,
SendRequest[RequestUpdateUserData,Cat['thisdn:', v_thisdn, '|connid:', v_connid, '|userdata:', v_userdata]]
But I don't know the format of the v_userdata part.
[/quote]
You could try something like this:
instead of "userdata:" + something
use
"userdata.userdataname1:userdatavalue1"
"userdata.userdataname2:userdatavalue2"
The dot operator is used to access keys inside a KVList (which is the type of AttributeUserData)
-
On top of hsujdik comments you can use SendRequestAlt function, it is very similar but accept input (event atteributes) as list and user data can be set all at once (either as json string or kvlist already created) something like
LIST list = KVListInit['thisdn', v_thisdn, 'connid', v_connid, '{l}userdata', '{"abc":123,"cde":"tyu"}']
SendRequestAlt[RequestUpdateUserData,list]
or
LIST v_userdata = KVListInit['abc', 123, 'cde', 'tyu']
LIST list= KVListAddList[ KVListInit['thisdn', v_thisdn, 'connid', v_connid'], 'userdata', v_userdata]
SendRequestAlt[RequestUpdateUserData, list]
-
You can use the URS Web API
Access your URS web API's using http://urhost:httpport/urs/help
As long as you know the connection ID of the call you ahve to update the userdata, it is possible.
5. Changing interaction attached data:
urs/call/connid/update?sync=1&key1=value1&key2=value2...