Genesys Cloud - Main

 View Only

Discussion Thread View
  • 1.  Performing a sum on a string collection

    Posted 07-10-2024 09:39

    I"m probably way over thinking this, but is there a way to do a sum on a string collection? For example, after you've played the list of items in the string, you want to perfromn a sum of all of the items in the string collection. 


    #ConversationalAI(Bots,AgentAssist,etc.)

    ------------------------------
    Rusty Lockett
    MNET LLC
    ------------------------------


  • 2.  RE: Performing a sum on a string collection

    Posted 07-10-2024 10:00

    Hi Rust, that is a complex scenario.

    You need access to all levels, or export values for many "int".

    An external resource can help you, such as AWS Lamba.

    Att,



    ------------------------------
    Breno Canyggia Ferreira Marreco
    https://www.linkedin.com/in/brenocfm-40b62182/
    ------------------------------



  • 3.  RE: Performing a sum on a string collection
    Best Answer

    Posted 07-10-2024 18:05

    Actually I was able to accomplish this. 

    1. Perform a loop
    2. Then an update data step
      1. Create a varaiable. Value will be todeciaml(getat(CollectionListVariable1, loopvariable)
      2. Create a variable. Addlist(DecimalCollectionList, VariableInStep2.1)
    3. sum(decimalcollectionlist). 


    ------------------------------
    Rusty Lockett
    MNET LLC
    ------------------------------



  • 4.  RE: Performing a sum on a string collection

    Posted 07-10-2024 18:13

    Good job!!!

    Att,



    ------------------------------
    Breno Canyggia Ferreira Marreco
    https://www.linkedin.com/in/brenocfm-40b62182/
    ------------------------------



  • 5.  RE: Performing a sum on a string collection

    Posted 08-20-2024 10:22

    Hi Rusty,

    Can you expand a little on how you accomplished this? I feel like I'm missing some detail to make with work. Particularly, I can't seem to get the addlist to work. Maybe just a screenshot if possible?

    Thanks



    ------------------------------
    Scott D
    Delta Dental of Washington
    ------------------------------



  • 6.  RE: Performing a sum on a string collection

    Posted 08-20-2024 10:38

    Actually, I was able to figure it out. The part I was missing was that the default behavior of the update data step for a collection is creating a new blank collection and adding the specified value as item 0.

    If you change to expression instead, you can accomplish what Rusty described.

    Thanks for the inspiration, this helped solve a big problem I was having.



    ------------------------------
    Scott D
    Delta Dental of Washington
    ------------------------------



  • 7.  RE: Performing a sum on a string collection

    Posted 08-20-2024 10:44

    Yes! My apologies for not spelling that out. 



    ------------------------------
    Rusty Lockett
    MNET LLC
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources