Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Including a counter in a script or Age of call

Status
Not open for further replies.

TecoGuy

Technical User
Feb 24, 2010
9
0
0
GB
I would like to include a counter or age of call in a script therefore the call will be routed to another destination if not answered

Can't for the life in me find why the script below is not working can someone please help me what I'm doing wrong? When I use this to test the call flows as normal but after 3 bounces it does not divert. why? (loop_count is an INT variable with the value of 3)

Section Hold_Loop

ASSIGN loop_count - 1 TO loop_count /* deducts 1 from 3 */

IF loop_count = 0 THEN
WHERE DNIS EQUALS
VALUE 8912 : ROUTE CALL Response_line
END WHERE
End IF

IF NOT QUEUED THEN
IF NOT OUT OF SERVICE cv_skillset THEN
QUEUE TO SKILLSET cv_skillset
WAIT 2
ELSE
IF NOT OUT OF SERVICE Default_Skillset THEN
QUEUE TO SKILLSET Default_Skillset
WAIT 2
ELSE
EXECUTE SCRIPT UNFORSEEN
END IF
END IF
END IF

IF NOT LOGGED OUT AGENT gv_unforseen THEN
EXECUTE SCRIPT UNFORSEEN
END IF

EXECUTE Hold_Loop
 
IF loop_count = 0 THEN
WHERE DNIS EQUALS
VALUE 8912 : ROUTE CALL Response_line
END WHERE
End IF

Is the dnis always 8912?? If the DNIS is not 8912 this statement does nothing.
You could put an IF AND THEN ELSE statement in here or

IF loop_count = 0 and DNIS=8912
THEN ROUTE CALL RESPONSE_LINE
ELSE------

END IF

Going from memory here. Don't have a sccs anymore to play with.
 
We have loads of DNIS number however I need to route all of them to 3 different destinations

so I will proberbly about 30 DNIS numbers to Response_line (variable)

10 DNIS numbers to XXX

10 DNIS numbers to XXX

I'm just using this as a test before implementing the rest so at the end it will be

IF loop_count = 0 THEN
WHERE DNIS EQUALS
VALUE 8912, XXXX, XXXX : ROUTE CALL Response_line
VALUE XXXX, XXXX, XXXX : ROUTE CALL A_LINE
VALUE XXXX, XXXX, XXXX : ROUTE CALL B_LINE
END WHERE
End IF
 
If you change this:

IF loop_count = 0 THEN
WHERE DNIS EQUALS
VALUE 8912 : ROUTE CALL Response_line
END WHERE
End IF

To this:

IF loop_count = 0 THEN
/* WHERE DNIS EQUALS
VALUE 8912 :*/ ROUTE CALL Response_line
/* END WHERE*/
End IF

Does the call route correctly after 3 tries??
 
And what happens if you change

IF loop_count = 0

to

IF loop_count < 1

?
 
I tried both the above statements and neither of them worked. Seems like the loop_count is not working

What am I do doing wrong?

The variable loop_count is INT call variable. I'm sure this is call variable is correct.

The scripting I've changed and tested the following:

1)
Section Hold_Loop

ASSIGN loop_count - 1 TO loop_count /* deducts 1 from 3 */

IF loop_count = 0 THEN
Route CALL XXXXXXXX
End IF

IF NOT QUEUED THEN
IF NOT OUT OF SERVICE cv_skillset THEN
QUEUE TO SKILLSET cv_skillset
WAIT 2
ELSE
IF NOT OUT OF SERVICE Default_Skillset THEN
QUEUE TO SKILLSET Default_Skillset
WAIT 2
ELSE
EXECUTE SCRIPT UNFORSEEN
END IF
END IF
END IF

IF NOT LOGGED OUT AGENT gv_unforseen THEN
EXECUTE SCRIPT UNFORSEEN
END IF

EXECUTE Hold_Loop

2)
Section Hold_Loop

ASSIGN loop_count - 1 TO loop_count /* deducts 1 from 3 */

IF loop_count < 1 THEN
Route CALL XXXXXXXX
End IF

IF NOT QUEUED THEN
IF NOT OUT OF SERVICE cv_skillset THEN
QUEUE TO SKILLSET cv_skillset
WAIT 2
ELSE
IF NOT OUT OF SERVICE Default_Skillset THEN
QUEUE TO SKILLSET Default_Skillset
WAIT 2
ELSE
EXECUTE SCRIPT UNFORSEEN
END IF
END IF
END IF

IF NOT LOGGED OUT AGENT gv_unforseen THEN
EXECUTE SCRIPT UNFORSEEN
END IF

EXECUTE Hold_Loop

3)
Section Hold_Loop

ASSIGN loop_count - 1 TO loop_count /* deducts 1 from 3 */

IF loop_count < 1 THEN
Route Call XXXXX
Else

IF NOT QUEUED THEN
IF NOT OUT OF SERVICE cv_skillset THEN
QUEUE TO SKILLSET cv_skillset
WAIT 2
ELSE
IF NOT OUT OF SERVICE Default_Skillset THEN
QUEUE TO SKILLSET Default_Skillset
WAIT 2
ELSE
EXECUTE SCRIPT UNFORSEEN
END IF
END IF
END IF
END IF

IF NOT LOGGED OUT AGENT gv_unforseen THEN
EXECUTE SCRIPT UNFORSEEN
END IF

EXECUTE Hold_Loop



None of the above worked
 
Try replacing
ASSIGN loop_count - 1 TO loop_count /* deducts 1 from 3 */
by
Loop_count Assigned (Loop_count - 1) /* deducts 1 from 3 */

If that also does not work try to 'add up' (start with loop_count = 1) and program

Loop_count Assigned (Loop_count + 1) /* adds 1 */
IF loop_count > 3 THEN
Route Call XXXXX
...

1 question; Why is'nt there a 'WAIT 15' (or other value) in your waitloop?
If the call is queued it would take seconds to reach the final loop_count value.




 
Hello,
Let me tell you how I do to count loops;
1) define call variable as INT, doesn't matter the value (put 9999); In my example I’ve named the call variable “loop_counter_cv”
2) in your script in front of the section loop put this:

ASSIGN 0 TO loop_counter_cv

3) in the section loop put this statement;

SECTION LOOP

……

IF loop_counter_cv < 2 THEN
ASSIGN loop_counter_cv + 1 TO loop_counter_cv
ELSE
ASSIGN 0 TO loop_counter_cv
END IF

IF loop_counter_cv = 2 THEN

/* Put what command you what

ELSE

/* Put what command you what (if not you can END the IF statement)

END IF

/* Put a wait time equal with the time you the script to repeat the section loop

EXECUTE LOOP

For example I want after 15 sec the call to be routed to another number. You can do that in at least two ways.


ASSIGN 0 TO loop_counter_cv

SECTION LOOP

. . . .

IF loop_counter_cv < 2 THEN
ASSIGN loop_counter_cv + 1 TO loop_counter_cv
ELSE
ASSIGN 0 TO loop_counter_cv
END IF

IF loop_counter_cv = 2 THEN
ROUTE CALL XXXX
END IF

WAIT 5

EXECUTE LOOP
Second Way

In the section Loop

SECTION LOOP

IF AGE OF CALL > 15 THEN
ROUTE CALL XXXX
END IF

WAIT 5

EXECUTE LOOP

Let me know if it works ?
 
I tried all the above and I still didn't work
Can I confirm the INT variable should be a call variable?

Any more ideas?
What I am trying to achieve is:
“I want the call to hunt to 3 different agents which are available however if they do not pick the call up I want the call to be routed to somewhere else as we want the call to be answered urgently”

Therefore the agents have 3 chances to pick the call up otherwise it will be routed out
Please help to find out what is wrong
 
I think your problem is your asigning the value within the loop place your Assign value before the loop. If its in the loop your setting it back to the original value.
 
I'm agreeing with dj4020, also see my example from above, where the assign value is in front of the section loop. If the problem persist, write here the entire script, to see if are any other problems.
 
From the example 'CallCenterExpertise' gave me I did the following code which didn't work where I assigned the variable outside the loop

ASSIGN 0 TO loop_count

Section Hold_Loop
IF loop_count = 2 THEN
ROUTE CALL XXXXXX
else
/* Command to route call to skillset
END IF

ASSIGN loop_count + 1 TO loop_count

EXECUTE Hold_Loop
 
Teco
In yopur example you show that you have indeed set the counter to 0 before going into the loop. However in your example your only asking if counter is equal to 2 then rout call. You need to increment your loop counter
i.e. ASSIGN counter_cv + 1 TO counter_cv

Is this all you have in the script loop ? ? ?
 
Ooops I guess taking a second look you do have it there. Sorry ! !
 
Teco- There is no doubt that this format below should work. You have verified that this is setup as a call variable integer type? Not sure in the example what you have the else or first comment out /* doing. Change to END IF after ROUTE CALL XXXXX to test. If the call var and this else/comment out statement in hold_loop is correct you must ahve something else going on in the script.

ASSIGN 0 TO loop_count

Section Hold_Loop
IF loop_count = 2 THEN
ROUTE CALL XXXXXX
else
/* Command to route call to skillset
END IF

ASSIGN loop_count + 1 TO loop_count

EXECUTE Hold_Loop
 
Below is all the code which I have used


ASSIGN 0 TO loop_count

Section Hold_Loop
IF loop_count = 2 THEN
ROUTE CALL 907921871207
else

IF NOT QUEUED THEN
IF NOT OUT OF SERVICE cv_skillset THEN
QUEUE TO SKILLSET cv_skillset
WAIT 2
ELSE
IF NOT OUT OF SERVICE Default_Skillset THEN
QUEUE TO SKILLSET Default_Skillset
WAIT 2
ELSE
EXECUTE SCRIPT UNFORSEEN
END IF
END IF
END IF

IF NOT LOGGED OUT AGENT gv_unforseen THEN
EXECUTE SCRIPT UNFORSEEN
END IF
END IF

ASSIGN loop_count + 1 TO loop_count

EXECUTE Hold_Loop
 
Are these actual queues, agents and such ? Or are these a test for getting this working ? ? ?
 
Try to terminate the call to either MUSIC or an announcement prior to the Hold Loop:

ASSIGN 0 TO loop_count

Give Music (or GIVE IVR/RAN msg)
WAIT 5

Section Hold_Loop
IF loop_count = 2 THEN
ROUTE CALL 907921871207......

If that fails make it simpler just to prove counter logic to begin with:

Give Music (or GIVE IVR/RAN msg)
WAIT 5

Section Hold_Loop
IF loop_count = 2 THEN
ROUTE CALL 907921871207
END IF

ASSIGN loop_count + 1 TO loop_count

EXECUTE Hold_Loop
 
My last comment on "simpler test"- be sure to begin with:

ASSIGN 0 TO loop_count

Forgot to add that....

 
As picklemogg said above you should use a wait command. I've tried to write down the hole script as I think it will work. I've also test it in my site and works :)


ASSIGN 0 TO loop_count

Section Hold_Loop
IF loop_count < 2 THEN
ASSIGN loop_count + 1 TO loop_count
ELSE
ASSIGN 0 TO loop_count
END IF

IF loop_count = 2 THEN
ROUTE CALL 907921871207
else

IF NOT QUEUED THEN
IF NOT OUT OF SERVICE cv_skillset THEN
QUEUE TO SKILLSET cv_skillset
WAIT 2
ELSE
IF NOT OUT OF SERVICE Default_Skillset THEN
QUEUE TO SKILLSET Default_Skillset
WAIT 2
ELSE
EXECUTE SCRIPT UNFORSEEN
END IF
END IF
END IF

IF NOT LOGGED OUT AGENT gv_unforseen THEN
EXECUTE SCRIPT UNFORSEEN
END IF
END IF

GIVE RAN XXX (or give ivr etc.)
WAIT 5

EXECUTE Hold_Loop
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top