cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3109
Views
0
Helpful
11
Replies

Queue Loop Counter not working

ckgilliam
Level 1
Level 1

I have a script where I want to use a queue loop and have it loop 3 times before going to closed and cannot get this counter to work. Any suggestions?

 

 

 

11 Replies 11

GaryB-UK
Level 1
Level 1

Hi

I would suggest that you go into each of the items that reference the variable and select a different item and the select it back again. I have had this type of issue when I have either changed the name of a variable or changed they type. It seems like uccx does not detect the change.

You could also run a reactive debug and step through. You should then see if the loop counter variable changes as the call loops. Personally I would set the loop counter before it enters the loop just to make sure the value it set even though it should pull from the default

Gary

Still here, I will be testing tonight and provide feedback.

Hi

I would suggest doing the following tests:

1: Run the script through and check what it does and note down the steps it take

2: Run the test again and check the status of the variables

3: Try putting a set command just before the IF statement forcing the counter to 0

4: Create another variable and then reference that

Also I did notice that there is a check for logged in agents, could that be forcing a closed?

Let me know how you get on

 

Gary

This is how I do it.

Create a new Variable Called iCounter set Type to INT.

 

in the first part of the script,

SET iCounter to "0"

LOOP NAME

Increment iCounter

Then do your if statement

GOTO LOOP

LOOPING.png

If this helps, do not forget, rate!!

You could even remove the Increment step by doing this:

 

If (++iCounter == 3) Then

That would do the increment piece, right before doing the comparison, so you end up with the same result, and save a step.

 

Also, I would recommend you check for the iCounter being over the threshold too, because if a caller hits the Increment step and goes to value 3 in your loop,  but then an Agent becomes available at that very moment, the script will jump to the Select Resource step.  Then, if any only if, the Agent Ring No Answers, the script falls back down into the Queue loop area, and then the Increment step will execute again, causing the value to be 4.  Your If step would then not execute the True branch because 4 != 3.

 

E.g.,

If (++iCounter >= 3) Then

Reena Mundary
Level 1
Level 1

Hi       ,

 

what's the behavior of the script now?

How many times the looping is happening or counter is not working at all?

As per your current logic it will loop 4times as counter initial value is 0. just set the value to 1 and then execute it.

 

 

 

It is not working at all, I did reactive debug and it steps straight to the closed label and never loops.

Hi

Did the call enter the IF statement and what value did the variable show as it checked the value?

 

Gary

When you are doing reactive debug from which step, its directly going to closed label?

GaryB-UK
Level 1
Level 1

Hi

 

Are you still having the same issue and do you need any more assistance?

 

Thanks

 

Gary