Cisco Support Community
Community Member

CCX Script Editor - If Statement Question

This is what I thought was going to be pretty straight forward but it's not working that way for me. 


The request is to have a step added to ring the Supervisors cell phone when the queue isn't staffed.

I added the following, (below) to this if step (stat_LoggedInResources_CSQ < 1) in the "True" branch, before the email step

1. added delay

2. added hold prompt

3. added redirect 

When I call the trigger during testing and there are agents in ready, the call is skipping the default logic and going right to the redirect for an unstaffed or non-ready agents queue.


Any help is greatly appreciated, and I thank all in advance.

Community Member

Have you done a reactive

Have you done a reactive script debug and validated that the Get Reporting Statistics step actually sets the stat_LoggedInResources_CSQ variable to the value you are expecting?

Community Member

Hi John, this script is a pre

Hi John, this script is a pre-existing production script that's been in use for the last 4 years. It works fine, until I add in the re-direct call step on unstaffed or not ready agents in queue.

Hi,can you give us a


can you give us a screenshot of the modified script?

Also, did you try reactive debugging the script as suggested by john.welsh?


Community Member

Hi Gergely, thank you for

Hi Gergely, thank you for your response.


Yes I did, and it does set the value correctly. Here is the screener of the edited script with the step to redirect the customer to the on-call agent.


Community Member

Hi Gergely, did you get to

Hi Gergely, did you get to see this?

Hi,I am sorry, I still don't


I am sorry, I still don't get it.

Let me ask you this: if the condition is met (the value of stat_LoggedInResources_CSQ is 0) the call does not seem to follow the True branch of the If statement?


Community Member

Hi Gergely. If the logged in

Hi Gergely.


If the logged in resources is "0", the true branch sends an email notification to the supervisor advising there are no logged in resources to take calls.

They now want, (in addition to the pre-existing email notification) a redirect to send the caller to the "On Call" cell phone.

When I add the redirect step into the true branch 'all' calls go directly to the on call cell phone bye-passing all other logic, even if agents are logged in and ready to take calls. No calls will go to an agent, all calls will go to the cell phone. I can't figure out why when I add in the additional step to the true branch it screws up the script.

Hi. This is weird. Can you

Hi. This is weird. Can you please attach the script?


Community Member

Hi Gergely, thank you, I've

Hi Gergely, thank you, I've attached the script. This is the original script, (without my edited in redirect step).


Thank you

Er... I am not sure what I am

Er... I am not sure what I am supposed to do with the original script. I would like to see the modified script, please, if possible.



Community Member

Hi Gergely, in the "True"

Hi Gergely, in the "True" branch of the If (stat_LoggedInResources_CSQ < 1) Then step.


Thank you

Community Member

Hi Gergely, I hadn't heard

Hi Gergely, I hadn't heard back, did I provide enough information?



Hi Ross,sorry, I was just

Hi Ross,

sorry, I was just very busy, did not have time for this.

I took a look at the modified script and I compared it to the original one. The new script seems to be alright, although I would place the email sending part before the Call Redirect step (but this is all cosmetic).

To be quite honest with you, I don't have the slighest idea what's going on here. Adding a few steps underneath the True branch of the If step should not affect other parts of the script, naturally.

Is it possible to do a reactive debug and stepping over the script until it reaches, or, rather, passes the If statement (meaning it should either reach the True or the False branch - either on the Delay 1 sec step or the "for debug" Annotation step.

Sorry again for the delay.


CreatePlease to create content