Genesys Cloud - Main

 View Only
Discussion Thread View
Expand all | Collapse all

Question on Loop

  • 1.  Question on Loop

    Posted 03-16-2020 18:37
    I am running into an issue with Architect loops. In the past, if I place a loop and set it to 1, it would play the message once, then loop one more time and move on, now it seems to only play once if set to 1 and continue on, it never loops. Anyone else having this issue? This is in an In-Queue Call flow.
    #ArchitectureandDesign

    ------------------------------
    Angelia Harper
    Avtex Solutions, LLC
    ------------------------------


  • 2.  RE: Question on Loop

    Posted 03-17-2020 00:47
    You will notice that they added End Loop to the tools along with next loop allowing exit from any point much easier.  I would guess that when this was added the base also changed from 0 to 1 starting.

    ------------------------------
    Robert Wakefield-Carl
    Avtex Solutions, LLC
    Contact Center Innovation Architect
    robertwc@avtex.com
    https://www.Avtex.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 3.  RE: Question on Loop

    GENESYS
    Posted 03-17-2020 09:53
    @Melissa Bailey do you have any insights? ​

    ------------------------------
    George Ganahl GCP (Genesys Cloud), ICCE
    Principal Technology Consultant
    Genesys
    ------------------------------



  • 4.  RE: Question on Loop

    GENESYS
    Posted 03-17-2020 20:25
    A loop with a count of 1 should only execute once.  We can't reproduce the double execution even with old code.

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



  • 5.  RE: Question on Loop

    Posted 03-18-2020 08:41
    @Melissa Bailey Okay, so you are saying that the first play of the audio in a loop of 1 will only play once and not loop at all? I thought that the first loop was 0 then it would loop one more time if it was set to 1. ​That seems a little strange to me, the loop starts at 0, correct? I am just trying to make sure I understand the process. If it starts at 0 and the loop is present with 1, why would it not loop one more time?

    ------------------------------
    Angelia Harper
    Avtex Solutions, LLC
    ------------------------------



  • 6.  RE: Question on Loop

    Posted 03-20-2020 04:21
    Hi Angelia,

    The minimum value for the Loop Count is 1.

    You can try to enforce 0 by using an Integer variable, but this will skip the loop action:
    I recently had an issue where I thought my loop was repeating more times than the expected. The problem actually was my Event Handling, there was an execution error making the call re-enter the same flow.


    ------------------------------
    Paulo Mesquita
    Spark NZ Trading
    ------------------------------



  • 7.  RE: Question on Loop

    Posted 03-20-2020 04:30
    The other thing is the number of times you repeat the loop is different than the index value.

    If you create a simple loop to play the index value, the loop will run 3 times but the audio will play "zero" "one" "two" and disconnect:



    ------------------------------
    Paulo Mesquita
    Spark NZ Trading
    ------------------------------



  • 8.  RE: Question on Loop

    Posted 01-26-2023 06:17
    Noticed recently that I had set loop variable initial value to 1 (from default 0).
    Playing audio for the loop variable it still started at Zero (0) which seems wrong to me. I set to 1 for a reason.
    Got played as 0,1,2 for a loop with a max set to 3. 
    I fully expected the first value to be a 1 as that is what I set in the variables initial value to.
    Feels wrong.

    ------------------------------
    Simon Brown
    Maintel Europe Limited
    ------------------------------



  • 9.  RE: Question on Loop

    Posted 01-27-2023 08:02
    Edited by Jan Heinonen 01-27-2023 08:02
    The variable "Current Index Data Name" will get the value from the loop function, so it will set the initial value to 0, and then add 1 for each loop it does.

    When using the variable to play for example a number prompt add 1 to the variable, for example Task.loopCount + 1

    ------------------------------
    Jan Heinonen
    Contact Center Specialist
    GlobalConnect AB
    ------------------------------



  • 10.  RE: Question on Loop

    Posted 01-27-2023 13:12
    maybe we at cross purposes and I do not know what you mean by "Value from the loop function"

    What is the point of an option to set an initial value in the loop object to something other than zero if it ignores it?

    I may have good reason to start it at, for example 5 rather than having to increment the variable "+ 5" in following objects/collections that may need it.
    In any traditional language where I create a number based loop, I set the value, and the loop starts from that value, not ignores it.

    ------------------------------
    Simon Brown
    Maintel Europe Limited
    ------------------------------



  • 11.  RE: Question on Loop

    Posted 01-27-2023 16:59
    You can't set the initial value, you can only select how many times it should loop and select a variable that keeps track of how many loops it has run.

    https://help.mypurecloud.com/articles/loop-action/

    ------------------------------
    Jan Heinonen
    Contact Center Specialist
    GlobalConnect AB
    ------------------------------



Need Help finding something?

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