Genesys Cloud - Main

 View Only

Sign Up

  • 1.  Randomizing in Architect flow

    Posted 09-11-2025 05:50

    Hi all! 

    I've been trying to build an inbound call flow that will do a transfer to 1 of 3 external numbers. 

    I want this flow to randomize which number it chooses, and that it keeps trying until one of the numbers answers. 

    I tried using the RandomInt function in a switch but that did not work as it only tried one number and it was always the same one. 


    Any suggestions? 


    #ArchitectureandDesign

    ------------------------------
    David Resch
    ------------------------------


  • 2.  RE: Randomizing in Architect flow
    Best Answer

    Posted 09-11-2025 10:45

    Here's an example using a collection of numbers to try & a loop to go through them.


    The full expression for Task.phoneToTry is If(Count(Task.phoneNumbers)>1, Task.phoneNumbers[RandomInt(Count(Task.phoneNumbers)-1)], Task.phoneNumbers[0])

    The full expression for the update data in the failure path isRemoveItem(Task.phoneNumbers, Task.phoneToTry)



    ------------------------------
    Melissa Bailey
    Software Engineer
    ------------------------------