Genesys Cloud - Main

 View Only

Sign Up

  • 1.  Workflow Loop only iterates first 2 items (0,1) - not continuing despite Next Loop

    Posted 14 hours ago

    Hi all,

    I'm building a Genesys Cloud Workflow triggered by the STA Topics event (v2.speechandtextanalytics.conversation.{id}.topics) and I'm running into an issue with loop behaviour.

    What I'm trying to do:
    Loop through Flow.jsonData.participants to extract the first available queueId, then continue with queue filtering and topic logic.

    What I've done so far:

    • Converted participants into a collection:
      State.participants = ToJsonCollection(Flow.jsonData.participants)
    • Created a loop with:
      • Index: State.participantLoopIndex
      • Max Loop Count: 10
    • Inside the loop, I tested with a minimal setup:
      • Send Notification: "DEBUG LOOP\nIndex: " + ToString(State.participantLoopIndex)
      • Followed by Next Loop

    Expected behaviour:
    The loop should iterate through all items (e.g. index 0, 1, 2, 3...)

    Actual behaviour:
    The loop only runs:
    Index: 0
    Index: 1

    Then it stops, with no errors.

    Additional details:

    • Participants count is correct (e.g. 4 or more)
    • Workflow trigger is firing correctly
    • Even when I remove all logic and keep only debug + Next Loop, the issue persists
    • All paths appear to lead to Next Loop

    Question:
    Has anyone experienced a loop stopping after the first 2 iterations in a Workflow?

    Is there any known limitation or specific configuration required for Loop / Next Loop to iterate through all items?

    Thanks in advance for any help!


    #API/Integrations

    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------


  • 2.  RE: Workflow Loop only iterates first 2 items (0,1) - not continuing despite Next Loop

    Posted 3 hours ago

    Hi @Phaneendra Avatapalli,

    I have not seen the issue you mention. However, as alternative, you could perhaps use a Genesys Cloud Function to process the event and get the first queueid involved with in the conversation, in this way you avoid do the loop in the workflow.

    Regards,

    SG



    ------------------------------
    Saugort Dario Garcia
    Arquitecto de soluciones
    ------------------------------



  • 3.  RE: Workflow Loop only iterates first 2 items (0,1) - not continuing despite Next Loop

    Posted 3 hours ago

    Hello Phaneendra

    I believe what you are hitting it the send notification action has a built in rate limit of 3 successful invocations per workflow execution. When the Send Notification action is successfully invoked 3 times within the same workflow execution, any subsequent invocations automatically take the failure path with an errorType of "ActionInvocationLimitExceeded". Since you're running a loop with Send Notification for debugging (iterations 0 and 1), and if your failure path is not connected or handled, the workflow will simply stop execution without errors. 

    My recommendations, the first being to add the failure output path to see why its stopping. If the failure path is not connected, the workflow execution will terminate silently when it encounters a failure scenario. 

    My next recommendation, since you're trying to extract the first available queueId from participants, you should:

    1. Remove the Send Notification action from your loop debugging
    2. Use a Decision action inside the loop to check if queueId exists:
      • Yes path: Set a variable with the queueId, then use Exit Loop to break out
      • No path: Use Next Loop to continue to the next participant
    3.  Ensure all paths connect to either Next Loop or Exit Loop
    4. After the loop exits, continue with your queue filtering and topic logic

    This approach will be more efficient and won't hit invocation limits.

    Hope this helps!



    ------------------------------
    Cameron
    Online Community Manager/Moderator
    ------------------------------