Genesys CTI User Forum

Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: eugene on October 28, 2017, 06:25:12 AM

Title: Update Listobject from Composer
Post by: eugene on October 28, 2017, 06:25:12 AM
Hello, is it possible to update a list object from Composer workflow?

For example, i have list name

my_list,
  my_item,
      my_key, my_value

Is it possible to programmatically under certain conditions update or add to the list object

my_list,
  my_item,
      my_key, my_updated_value
Title: Re: Update Listobject from Composer
Post by: cavagnaro on October 28, 2017, 12:51:41 PM
No by using default methods. Composer as IRD, act as read access only to CME.
You want to use PSDK in some form being called by Composer. In that way you can create, edit, delete virtually anything at ConfigServer objects.


Enviado de meu E6633 usando Tapatalk

Title: Re: Update Listobject from Composer
Post by: eugene on October 28, 2017, 03:26:07 PM
Thanks Cav, i recall coming across in IRD there was a function call to update edit the list object and was hoping there'd be such feature via Composer.

Didn't want to go the full fledge PSDK route.
Title: Re: Update Listobject from Composer
Post by: cavagnaro on October 28, 2017, 03:30:37 PM
Jummm.... If there is in IRD should be on Composer...
Will validate just to confirm

Enviado de meu E6633 usando Tapatalk

Title: Re: Update Listobject from Composer
Post by: cavagnaro on October 28, 2017, 06:33:13 PM
I haven't found nothing on IRD about list modification on CME.
But you have two functions to work on IRD with lists already at memory (you read from CME and update a value there for purposes of routing)


[color=rgb(68, 74, 82)][font=Roboto][size=15px]SetIntegerKey and SetStringKey[/size][/font][/color]
[color=rgb(68, 74, 82)][font=Roboto][/size][/font][/color]
[color=rgb(68, 74, 82)][font=Roboto][/size][size=15px]According to Composer docs:[/size][/font][/color]
[color=rgb(68, 74, 82)][font=Roboto][/size][size=15px]This may be replace with ECMAScript String manipulation on the list.[/size][/font][/color]
[color=rgb(68, 74, 82)][font=Roboto][/size][/font][/color]
[color=rgb(68, 74, 82)][font=Roboto][/size][size=15px]As you are talking about a JSON object, would be very easy to manipulate it.[/size][/font][/color]
Title: Re: Update Listobject from Composer
Post by: terry on October 28, 2017, 06:34:32 PM
Something like below (delegating to URS)

<state id="SetObjectProperty">
<datamodel>
  <data id="reqid" />
</datamodel>

<onentry>
<script>
                var s_URI = 'urs/call/@' + system.InteractionID + '/func/SetObjectProperty';
                var message = [16, 21, "my_list", "my_item", "my_new_value"];
</script>
<session:fetch requestid="_data.reqid" srcexpr="s_URI" method="'urs'">
                <param name= "params" expr="uneval(message)" />
</session:fetch>
</onentry>
<transition event="session.fetch.done" target="statex">
...
</transition>
<transition event="error.session.fetch" target="statey" />
....
</state>
Title: Re: Update Listobject from Composer
Post by: eugene on October 30, 2017, 05:14:51 AM
Thanks Terry, just spoke to genesys engineer on this as well and you're right we'd have to go indirectly via calling SetObjectProperty function from URS to execute.