Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: gen_den on November 27, 2017, 02:45:34 PM
-
Hi EXpert,
need your urgent help in following.
In my IRD strategy i am doing a GET request and below is the response saved in variable varStatus. This variable is of type LIST:
varStatus(LOCAL) <- LIST[1]: 0._desired_time:2017-11-28T10:00:00.000Z|0._callback_state:SCHEDULED|0._service_name:vfde|0._expiration_time:2017-11-29T09:59:59.000Z|0._channel:web|0._topic:Bill|0._entity_type:acn|0._onlineuser_id:7676|0._id:808-7ebec14e-86b8-4b04-9da7-e7235783dfea|0._customer_number:0447852294177|0._url:/genesys/1/service/callback/vfde/808-7ebec14e-86b8-4b04-9da7-e7235783dfea|0._entity_id:1740346767|0.[b]_delete_url[/b]:/gmchat/service/cb-setup-v1?_callback_number=0447852294177&_entity_id=1740346767&_onlineuser_id=&_delete=yes&_topic=Bill|0._reschedule_url:/gmchat/service/cb-setup-v1?_callback_number=0447852294177&_entity_id=1740346767&_onlineuser_id=&_reschedule=yes&_topic=Bill|0._callback_number:0447852294177
Next Block is where i am trying to assign the value of _delete_url in variable varDeleteURL , this variable is of type STRING.
In order to do so I am using function [b]KVListGetListValue[varStatus,'_delete_url'][/b].. But i am getting value is BLANK:
ASSIGN: varDeleteURL(LOCAL) <- STRING[1,0]: ""
can you please let me know if i am using the correct function or any other way i can retrieve the value of _delete_url ?
-
You have to use syntax "0._delete_url" or make from the result "0" new KVList and then you can use your syntax (KVListGetListValue[varListStatus,'_delete_url'])
-
Hi Kubig,
Thanks for the reply, forgot to mention this value 0 is dynamic, it changes according the number of times call scheduled by customer.
In that case how can i achieve that ?
Also make from the result "0"?
Thanks
-
As I wrote, just create new list from the result and then you can use the basic syntax (KVListGetListValue[varListStatus,'_delete_url'], where varListStatus is KVList created from varStatus variable)
-
Sorry i just did'nt follow you here "new list from the result "
My result is :
[i]0._desired_time:2017-11-28T10:00:00.000Z|0._callback_state:SCHEDULED|0._service_name:vfde|0._expiration_time:2017-11-29T09:59:59.000Z|0._channel:web|0._topic:Bill|0._entity_type:acn|0._onlineuser_id:7676|0._id:808-7ebec14e-86b8-4b04-9da7-e7235783dfea|0._customer_number:0447852294177|0._url:/genesys/1/service/callback/vfde/808-7ebec14e-86b8-4b04-9da7-e7235783dfea|0._entity_id:1740346767|0._delete_url:/gmchat/service/cb-setup-v1?_callback_number=0447852294177&_entity_id=1740346767&_onlineuser_id=&_delete=yes&_topic=Bill|0._reschedule_url:/gmchat/service/cb-setup-v1?_callback_number=0447852294177&_entity_id=1740346767&_onlineuser_id=&_reschedule=yes&_topic=Bill|0._callback_number:0447852294177[/i]
I need to create a new variable of Type LIST ?
Sorry if it's very basic question :(
-
You can try STRING key= KVListGetKey[varStatus, 1]; LIST subList= KVListGetListValue[varStatus, key];
But basically it depends from what exactly GET request returns (in other words what value you assigned to varStatus in first place).