Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: gen_den on October 20, 2017, 03:48:56 AM
-
Hi Experts,
can you please let me know how I can call the SCXML flows from IRD?
My requirement is that from my IRD strategy I need to execute SCXML flows, which will return some values. The value returned will be a JSON object.
How can i handle that ? Any suggestions ?
Thanks
-
You can easily call ORS strategies via HTTP interface of ORS component - for more information follow the ORS documentation. Of course, you can "transfer" the interaction to the routing point or IQ where the ORS executed the logic.
-
Thanks Kubig for the response. I used the Web Service block in IRD. I can hit SCXML but the JSON response which i am getting is not getting handled properly. in IRD i used all the data types to handle this response. But may be its JSON Object it doesnt save in any variable and the value is blank in logs.
I will try to post some logs
-
Try to use this function in IRD "KVListFromJSON"
-
I was able to do something like this,
1. create a new InteractionData.
2. Create a RP - where you can load the SXCML logic
3. from URS transfer the call to that RP where you have got the SCXML
4. Include the logic in SCXML to attach the data on this Interaction Data that you created in URS. (Make check for looks) or redirect the call to a different RP on URS again
5. once you get the data - do whatever you want to do.
7. you can convert the json to a string and attach to the attached data as well. (if you would prefer)
-
[quote author=water235 link=topic=10701.msg48595#msg48595 date=1508512139]
I was able to do something like this,
1. create a new InteractionData.
2. Create a RP - where you can load the SXCML logic
3. from URS transfer the call to that RP where you have got the SCXML
4. Include the logic in SCXML to attach the data on this Interaction Data that you created in URS. (Make check for looks) or redirect the call to a different RP on URS again
5. once you get the data - do whatever you want to do.
7. you can convert the json to a string and attach to the attached data as well. (if you would prefer)
[/quote]Seems kinda a lit bit complicated for just grabbing JSON. There are functions already in IRD that let you do this.
Enviado de meu E6633 usando Tapatalk
-
may be , but if he has the scxml, it is jsut attaching and reading the data -
he could directly use strigfy fn in scxml and attach in the attach data and his work is done.
-
Or just use the IRD function that will do exactly the same and no need to have another point of control into his call flow.
Just different points of view
Enviado de meu E6633 usando Tapatalk
-
Store entire JSON doc in some variable. Turn it into KVList by reassigning to LIST variable or by using KVListFromJSON function and after that use KVList access functions (like KVListGetStringValue) to get specific values.
-
Agree with most responses. I've handled JSON queries completely within URS/IRD.
Less complicated and easier to troubleshoot.
Sent from my Redmi Note 3 using Tapatalk
-
Thank you Guys.. for the comments.
I will try the suggestions and let you know :)