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!

Scripting Help

Status
Not open for further replies.

mt6322

Technical User
Feb 19, 2004
159
US
Please help edit and correct my script - because I kept on getting an error
Line: 57 Position: 2 Code: 16 Error: An end of file is encountered in the script in the middle of a statement. Thanks for your help.

Here is the script:

/* This Script is for Key Accounts, calls via Meridian Mail menu (CDP 4807). Callers are Queued to the Key Accounts
skillset with Priority 2. */


IF (Out of Service Key_Accounts) THEN
ROUTE CALL 6795
END IF

IF (DAY OF WEEK=Monday..Friday) AND (TIME of Day=M_F_HoursA)
THEN EXECUTE Open_Skillset
END IF

EXECUTE Nite

SECTION Open_Skillset

IF NOT OUT OF SERVICE Key_Accounts THEN
QUEUE TO SKILLSET Key_Accounts WITH PRIORITY 2
WAIT 2
END IF

GIVE MUSIC Music_Source

IF NOT QUEUED THEN
ROUTE CALL 6795
END IF

SECTION Hold_In_Queue

WAIT Delay_IntervalA

IF NOT QUEUED THEN
ROUTE CALL 6795
END IF

IF Age of Call > 60 then
ROUTE CALL 6795

IF Idle Agent Count Key_Accounts < 1 AND Age of Call > 18 then
ROUTE CALL 6795

WAIT Delay_IntervalA

GIVE RAN Busy_Ran1

Delay_IntervalA ASSIGNED Delay_IntervalA + 10

Execute Hold_In_Queue

SECTION Nite

GIVE RAN Closed_Ran

DISCONNECT

 
Oops,

you are missing the END IF after

IF Idle Agent Count Key_Accounts < 1 AND Age of Call > 18 then
ROUTE CALL 6795

Jeff
 
Thanks for your response. I have added the END IF line but still getting:

Error: An end of file is encountered in the script in the middle of a statement.

Any other ideas ? Appreciate your help.
 
Did you put both END IF lines in? You are missing them on both of the IF..THEN clauses:

IF Age of Call > 60 then
ROUTE CALL 6795

IF Idle Agent Count Key_Accounts < 1 AND Age of Call > 18 then
ROUTE CALL 6795

at the end of the script.
 
This will be my final script, please check if the flow is correct.Thanks a lot for all your help.

/* This Script is for Key Accounts, calls via Meridian Mail menu (CDP 4807). Callers are Queued to the Key Accounts
skillset with Priority 2. */

IF (Out of Service Key_Accounts) THEN
ROUTE CALL 6795
END IF

IF (DAY OF WEEK=Monday..Friday) AND (TIME of Day=M_F_HoursA) THEN
EXECUTE Open_Skillset
END IF

EXECUTE Nite

SECTION Open_Skillset

IF NOT OUT OF SERVICE Key_Accounts THEN
QUEUE TO SKILLSET Key_Accounts WITH PRIORITY 2
WAIT 2
END IF

GIVE MUSIC Music_Source

IF NOT QUEUED THEN
ROUTE CALL 6795
END IF

SECTION Hold_In_Queue

IF NOT QUEUED THEN
ROUTE CALL 6795
END IF

IF Age of Call > 60 THEN
ROUTE CALL 6795
END IF

IF Idle Agent count Key_Accounts < 1 AND Age of Call > 18 THEN
ROUTE CALL 6795
END IF

WAIT Delay_IntervalA

GIVE RAN Busy_Ran1

Delay_IntervalA ASSIGNED Delay_IntervalA + 10

Execute Hold_In_Queue

SECTION Nite

GIVE RAN Closed_Ran

DISCONNECT

 
There are many different ways to accomplish the same thing and everyone has their own scripting style, so consider these "suggestions".

Most callers will go to DN 6795 if the skillset is closed, instead of the nite treatment as you are checking the skillset before the day of week and time of day check. You might want to swap the order of those checks.

Consider adding the clause BY LONGEST IDLE AGENT to your QUEUE TO SKILLSET command like so:

QUEUE TO SKILLSET Key_Accounts BY LONGEST IDLE AGENT WITH PRIORITY 2

If your Global settings specify longest idle time since last CDN/ACD call, you must include the LONGEST IDLE TIME clause to make it work this way.

You are playing music for Delay_IntervalA seconds before giving the caller the first delay message. Usually you want to provide the first delay message, then music.

Next, you can simplify the clause:
IF Idle Agent count Key_Accounts < 1 AND Age of Call > 18 THEN
ROUTE CALL 6795
END IF

If there is an idle agent, the call will be connected once the QUEUE TO SKILLSET command was executed above. So you can just check the Age of Call and not worry about the idle agent count.

And last (for me, but I'm sure others will chime in), I would try to requeue the call after checking for queue status at the top of the Hold_In_Queue section like this:

IF NOT QUEUED THEN
IF NOT OUT OF SERVICE Key_Accounts THEN
QUEUE TO SKILLSET Key_Accounts BY LONGEST IDLE AGENT WITH PRIORITY 2
WAIT 2
ELSE
ROUTE CALL 6795
END IF
END IF

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top