Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Use the Index counter in a loop to read variables

    Posted 03-08-2023 15:42
    No replies, thread closed.

    Hi all,

    I struggle to avoid replicating coding. 

    We are using dialler and we need to reset several contact list prior to loading the new data. For that I have created a Data Action that calls the /api/v2/outbound/contactlists/${input.contactListID}/clear  API with as input variable the GUID of the contact list.

    We then designed a flow to give the users of dialler the opportunity to do this themselves however we have to create 6 times the same Data action for each separate contact list.

    We tried to use variables named cList0 to cList5 and to pull the contents of the variables into the Call Data Action in the flow using "flow.cList"+ToString(Flow.tableLoopIndex) that unfortunately doesn't seem to work. does anyone have a suggestion as to what would be the best approach to minimise code?

    We have to develop something for individual call lists as well where we were thinking about a similar approach but this makes it very challenging do do this in a minimalistic coding way.

    Thanks


    #Integrations
    #Outbound
    #Telephony

    ------------------------------
    Ruud Reinold
    BNP Paribas Personal Finance UK
    ------------------------------


  • 2.  RE: Use the Index counter in a loop to read variables

    Posted 03-08-2023 15:58
    No replies, thread closed.

    "flow.cList" is a literal string value, i.e. the letters f, l, o, w, period, c ...  Architect does not resolve that into a variable.  Create a collection variable (Task.listCollection in the following example) and add all the values into it.  Then loop through the collection.  Set the loop maximum loop count to expression mode and use the expression Count(Task.listCollection)
    Inside the loop get the the item from the collection using the expression Task.listCollection[Task.tableLoopIndex]



    ------------------------------
    Melissa Bailey
    Genesys - Employees
    ------------------------------



  • 3.  RE: Use the Index counter in a loop to read variables

    Posted 03-08-2023 16:04
    No replies, thread closed.

    Top, thanks for the tip and the lightning fast response Melissa!



    ------------------------------
    Ruud Reinold
    BNP Paribas Personal Finance UK
    ------------------------------