" /> How to call SCXML from IRD - Genesys CTI User Forum

Author Topic: How to call SCXML from IRD  (Read 3098 times)

Offline gen_den

  • Full Member
  • ***
  • Posts: 176
  • Karma: 0
How to call SCXML from IRD
« on: October 20, 2017, 03:48:56 AM »
Advertisement
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

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: How to call SCXML from IRD
« Reply #1 on: October 20, 2017, 07:48:12 AM »
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.

Offline gen_den

  • Full Member
  • ***
  • Posts: 176
  • Karma: 0
Re: How to call SCXML from IRD
« Reply #2 on: October 20, 2017, 07:54:04 AM »
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

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: How to call SCXML from IRD
« Reply #3 on: October 20, 2017, 08:31:58 AM »
Try to use this function in IRD "KVListFromJSON"

Offline water235

  • Newbie
  • *
  • Posts: 47
  • Karma: 0
Re: How to call SCXML from IRD
« Reply #4 on: October 20, 2017, 03:08:59 PM »
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)

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: How to call SCXML from IRD
« Reply #5 on: October 20, 2017, 03:46:14 PM »
[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


Offline water235

  • Newbie
  • *
  • Posts: 47
  • Karma: 0
Re: How to call SCXML from IRD
« Reply #6 on: October 20, 2017, 05:00:30 PM »
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.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: How to call SCXML from IRD
« Reply #7 on: October 20, 2017, 06:43:52 PM »
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


Offline terry

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: 35
Re: How to call SCXML from IRD
« Reply #8 on: October 20, 2017, 08:53:16 PM »
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. 

Offline vmc

  • Full Member
  • ***
  • Posts: 112
  • Karma: 0
Re: How to call SCXML from IRD
« Reply #9 on: October 21, 2017, 01:00:52 AM »
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


Offline gen_den

  • Full Member
  • ***
  • Posts: 176
  • Karma: 0
Re: How to call SCXML from IRD
« Reply #10 on: October 21, 2017, 05:10:52 AM »
Thank you Guys.. for the comments.
I will try the suggestions and let you know :)