Seeing Issues with Nested Loops

I have questions about how long we can loop. And I am observing odd behavior when trying to experiment with nested loops. I will describe the odd behavior in a separate post.

Background:

Our WhatsApp threading timeline is set to 72 hours. We have so far only supported web chat so allowing messages to come after hours is a new situation for us. We are concerned about sending after hours messages to a queue before the contact center opens because of the following reasons:

  1. A large number of messages that came overnight could cause a longer wait for people who are contacting us just as the contact center opens (unless we use routing priority to prioritize interactions coming in live).

  2. The overnight wait in queue would adversely affect our ability to analyze metrics.

Our approach is to check if the contact center is closed. If so, we use a bot to tell the user that we are closed. We ask (1) if they would like to proceed and let us know what they need and we will respond when the contact center is open, or (2) would they like to disconnect now and try again when we are open.

If they choose to proceed then I have two nested loops in the messaging flow (not the inqueue flow). The inner loop has a maximum count of 99. In the inner loop, I use the Wait action to wait one hour. I then use a check schedule group action to see if the contact center is open. If it is not open then I go to the next loop iteration. I keep iterating until the contact center is open. I then use a bot to send a message to say we are now open and ask if they are available. I send them to a queue when they say they are available.

Questions

I want to make sure there are no surprises with this approach.

  1. Are there any limitations about how many simultaneous flows we can have looping? I imagine the load would be similar to the load we have when we have multiple conversations going through a flow but I would like to make sure looping does not change anything. Any other load-related considerations?

  2. Are there any pricing implications?

  3. Are there any limitations about how long a flow can loop? I can imagine it going past 100 hours (e.g. someone sends a message on Wednesday evening shortly after closing time the day before the Thanksgiving holiday, and the contact center is closed until Monday morning). This thread (Genesys Cloud - Main - Genesys) has this information below.

It is about email flows and there is no comment from a Genesys employee so I would like to get input from Genesys directly: E-mail queue flows have a bit of an undocumented "issue" in that they only run for 72 hours, unless something has changed since I tested this a bit over a year ago. After that they will just stay in queue but don't process the queue flow. I encountered it when a customer wanted to have an overflow on e-mail after 5 days in queue and the overflow never happened.Another funny "feature" with e-mail queue flows is that it will start by running the Recurring State once every minute. After 5 runs it adds 5 seconds so it will now run every 1m 5s.

Thanks for your assistance!

Best,

Waqar

This post describes the odd behavior I am seeing. I have repeatedly seen the flow to become stuck, which I imagine is occurring in the loops. When I say stuck, I mean the flow stops functioning. I don't see the behavior (e.g. a communication sent, or transfer to a queue) that is supposed to occur after the loop. I am not sure if the loop is stuck, or if the flow is somehow disrupted. However, I will continue to use the word stuck to describe that scenario.

I am seeing this behavior across our dev org, and our production org.

Summary of Observations

I created a simple flow that has an outer loop and an inner loop. I simply log values of the indices of the outer loop and inner loop using an Update Data action, and a Call Common Module action (which creates a log by writing to a participant data). I do nothing else in the loop.

Set Outer loop to 5, inner loop to 5: Loop executes 25 times and proceeds as expected. Outer loop reaches index 4, inner loop reaches index 4. The loop exits and the message is routed to a queue as expected.

For the same loop as above, leave outer loop set to 5, set inner loop to 96: loop became stuck at outer loop index 3, inner loop index = 80

I have seen the loop become stuck multiple times upon reaching the max value of inner loop in the first iteration of the outer loop. It's as if it became stuck just before starting the second iteration of the outer loop.

Any suggestions?

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.