Experimenting with loops

Hi Genesys dev community,

This is more of an article than a question, but I thought it might be of interest.
For one of my use cases, I needed to have an inbound call flow that contained a loop, and I needed to know at which point the loop was interrupted by the call being disconnected.

My first attempt was candid, I put my loop in a flow, updating participant data every time I was about to finish the loop iteration. The result was quite shocking: no matter at which point the call was abandoned during the execution of the loop, the data attached (i.e. the loop current index) was reflecting as if the loop had completed all the iterations, e.g. my loop count is 99, I abandon the call at iteration 10, the data attached was 98! Not ideal, and also not expected.

I then kept experimenting and thought that maybe the loop was in fact executed ahead of time by the Edge, and then played back. So I decided to add in the loop actions a blocking step (i.e. a call to a data action). The result was exactly the one I expected, the loop was then executed synchronously and all was well (i.e. the data attached was indeed the current index at which the loop was interrupted).

I have attached to this topic the YAML files necessary to reproduce the scenario, if anyone is interested in it. Please read the comments at the beginning of the file.

experimentLoop.yaml (7.9 KB)

Aurelien

PS: I am interested to understand if there is another way of doing this, if this is by design, and if it is documented somewhere. I couldn't find anything relating to this myself.

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