Hi
At the first go , it looks like a very difficult thing to achieve. i am not sure if you can achieve this ,
but here is some things you can try
first of all , you have to put a " Get reporting statistics " step in all your scripts , which will check for how many agents are logged in to the Queue.
then you have to use some " if \else " statement to pass some value to a variable ( you have to use an enterprise variable )
like " if ( Agentloggedin ==1 )
set lastagentloggedin ==1 )
and then using enterprise variables from CDA , you can pass this value to CAD.
and you can generate email from Script as well , depending upon no of agent logged in and send that email to supervisors.
now playing a message to agent , whether there is any caller in the queue , i am not sure how you can do that.
i hope this helps you to start thing up.