" /> How to use SendRequest function in IRD? - Genesys CTI User Forum

Author Topic: How to use SendRequest function in IRD?  (Read 3822 times)

Offline cmpark

  • Newbie
  • *
  • Posts: 21
  • Karma: 0
How to use SendRequest function in IRD?
« on: November 21, 2022, 06:30:25 AM »
Advertisement
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.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: How to use SendRequest function in IRD?
« Reply #1 on: November 21, 2022, 01:40:37 PM »
You can't update another calls UData...only agent participating on it can do such.
What is your call scenario?


Offline hsujdik

  • Hero Member
  • *****
  • Posts: 541
  • Karma: 30
Re: How to use SendRequest function in IRD?
« Reply #2 on: November 21, 2022, 01:52:11 PM »
[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)

Offline terry

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: 35
Re: How to use SendRequest function in IRD?
« Reply #3 on: December 02, 2022, 02:19:56 AM »
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]

 

Offline Raja Sekhar

  • Jr. Member
  • **
  • Posts: 72
  • Karma: -1
  • Genesys Routing Applciation developer
Re: How to use SendRequest function in IRD?
« Reply #4 on: February 08, 2023, 10:32:26 PM »
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...