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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script Problem

Status
Not open for further replies.

steel451

Technical User
Jul 17, 2004
23
GB

Am having had a problem with the script below, our engineer has given it a clean bill of health but it is still not working.

The problem seems to be that it never reaches the section marked (???), this should offer callers vs prompt which allows them to select an option to go to voicemail via call pilot.

Any ideas?

Steel

/* Check for Emergency Agent */

IF NOT LOGGED OUT AGENT 911911 THEN
GIVE CONTROLLED BROADCAST ANNOUNCEMENT cpilot_access
PLAY PROMPT
VOICE SEGMENT emergency_vs
WAIT 2
DISCONNECT
END IF

/*Force to Queue if agents logged in out of hours*/

IF NOT OUT OF SERVICE ce_svce_progression THEN
EXECUTE agent_login
END IF

/* Check for Holidays where closed*/

IF DATE = ws_bankhols_gv THEN
GIVE IVR cpilot_ivr
WITH TREATMENT 1021
END IF

/* Check for Opening Hours */

IF (DAY OF WEEK = weekends_gv)

OR (DAY OF WEEK = weekdays_gv) AND (TIME OF DAY <> ce_pd_open_hours_mw_gv)

OR (DATE = ce_pd_bankholsopen_gv)

THEN

GIVE IVR cpilot_ivr
WITH TREATMENT 1021

END IF

SECTION agent_login

/* Skillset in service check */

IF NOT OUT OF SERVICE ce_svce_progression THEN
QUEUE TO SKILLSET ce_svce_progression
WAIT 2

END IF

WAIT 5

GIVE CONTROLLED BROADCAST ANNOUNCEMENT cpilot_access
PLAY PROMPT
VOICE SEGMENT pdisp_first_wait_vs

WAIT 2

GIVE MUSIC music_ch

SECTION wait_loop

WAIT 40

IF NOT LOGGED OUT AGENT 911911 THEN
GIVE CONTROLLED BROADCAST ANNOUNCEMENT cpilot_access
PLAY PROMPT
VOICE SEGMENT emergency_vs
WAIT 2
DISCONNECT
END IF

IF NOT QUEUED THEN
IF NOT OUT OF SERVICE ce_svce_progression THEN
QUEUE TO SKILLSET ce_svce_progression
WAIT 2

END IF

(???) OPEN VOICE SESSION cpilot_access
PLAY PROMPT
VOICE SEGMENT pdisp_sec_wait_vs

COLLECT 1 DIGITS INTO collect_digits_dn_cv
INTER DIGIT TIMER 5

END VOICE SESSION

WHERE collect_digits_dn_cv EQUALS

VALUE 1: GIVE IVR cpilot_ivr WITH TREATMENT 1021
DEFAULT: EXECUTE wait_loop

END WHERE

EXECUTE wait_loop

END IF
 
Pay attention to the IF-THEN-END IF statements.

As you did not close out the IF NOT QUEUED clause, the caller will only be offered the OPEN VOICE SESSION if the call is not queued.

I'm guessing you want the following:

IF NOT QUEUED THEN
IF NOT OUT OF SERVICE ce_svce_progression THEN
QUEUE TO SKILLSET ce-svce_progression
WAIT 2
END IF
END IF

followed by

OPEN VOICE SESSION ....
 
I agree with Miles. There is a strict order of executing IF and END IF commands in a nested structure. In your case here, if the 1st IF statement is FALSE, i.e. the call is QUEUED then it will jump to it's respective END IF command i.e. the last one in the nest and not the next one in the nest which belongs to "if not out of service" .
 
Thanks both.

This was spot on will look out for this in future
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top