" /> Update Listobject from Composer - Genesys CTI User Forum

Author Topic: Update Listobject from Composer  (Read 2230 times)

Offline eugene

  • Jr. Member
  • **
  • Posts: 85
  • Karma: 2
Update Listobject from Composer
« on: October 28, 2017, 06:25:12 AM »
Advertisement
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

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Update Listobject from Composer
« Reply #1 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


Offline eugene

  • Jr. Member
  • **
  • Posts: 85
  • Karma: 2
Re: Update Listobject from Composer
« Reply #2 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.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Update Listobject from Composer
« Reply #3 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


Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Update Listobject from Composer
« Reply #4 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]

Offline terry

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: 35
Re: Update Listobject from Composer
« Reply #5 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>

Offline eugene

  • Jr. Member
  • **
  • Posts: 85
  • Karma: 2
Re: Update Listobject from Composer
« Reply #6 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.