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!

Customer Input then Route - VM Pro Rls 8.1

Status
Not open for further replies.

DBrewsky

Vendor
Jan 23, 2006
1,381
0
0
US
I have a customer who is asking if we can create a module to have a caller enter a date (ie: MMDDYYYY). I need to check this entry against only one variable. Basically, if the date entered is greater than 01312017 or not and route the call. That's it.

I am sure I would need some logic entries to insure the caller doesn't enter in 99999999

For example check to see:
if MM is not less than 00, or greater than 12
if DD is not less than 00, or greater than 31
if YYYY is not less than 1970, or greater than current year

I have thought about this and am curious to see if: 12312016 is greater than 01312016 or not.

The customer is on IP Office 500 V2 with VM Pro 8.1 on a Windows Server 2003. VB Scripting and 3rd arty Database are both disabled.

Thoughts??

Appreciate your input..

--DB

 
In VMPro use a menu for collecting digits using ???????? as the menu option, tell they need to enter day and month with 2 digits and year with 4 digits.
Then use generic actions and user variables to extract the input into UserVarDAY, UserVarMONTH and UserVarYEAR.
eg
Customer enter 01111977 as a date, it will be in $KEY after the menu.
Use a generic action with the following string as action parameter : STRING:UserVarDAY=mid($KEY,1,2) and a next generic action with the following string as action parameter : STRING:UserVarMONTH=mid($KEY,3,2) generic action with the following string as action parameter : STRING:UserVarYEAR=mid($KEY,5,4).
Now you can use conditions to check the user variables UserVarDAY, UserVarMONTH and UserVarYEAR for their respective value.
I would do a reverse check, first year then month and at last the day which can speed up the process.

Do not use DAY, MONTH or YEAR as user variables as this can conflict with system names.

If on R9.1 or higher the above can be done more efficient using VBScript on a Windows VMPro.
 
So I can use basic string functions like MID, LEFT, RIGHT, etc in VM Pro? If so, won't I need to convert the entry to a number to compare the values?

From what you mention, I worked this up but haven't tested it yet.

Compare to 01292017. If the entry matches or is before that date, route to X. If the entry is greater, route to Y.

Verbiage:

Option 1:
Thank you for calling. To expedite your call, you will need to enter your Date of Service by using your telephone keypad to enter the Month, Day and Year. For example, if your date of service is Dec 15th, 2016, you will enter 12152016 then press the pound key.

- or -

Option 2:
"MENU: Thank you for calling. To expedite your call, you will will be asked to enter your Date of Service by using your telephone keypad. After the tone, please enter the Month of your service [(beep in recording) - collect the digits and store in UserVarMonth].

MENU: After the tone, please enter the day of the month [(beep in recording) - collect the digits and store in UserVarDay].

MENU: After the tone, please enter the four digit year [(beep in recording) - collect the digits and store in UserVarYear]."


$KEY (from Menu entry ????????) from option 1 above:
string:UserVarDay=mid($KEY,1,2)
string:UserVarMonth=mid($KEY,3,2)
string:UserVarYear=mid($KEY,5,4)

Compare the variables (direct from Option 2)
if UserVarYear < 2017 route to X
if UserVarMonth > 1 route to Y
if UserVarDay < 30 route to X
else route to Y

--DB

 
Option two passed my mind but you specific asked about the 01012017 string so I based my answer on that.
There is nothing wrong with option 2.
Both are valid methods, it is up to you which you prefer.
 
OK - I will give it a shot and let you know how it turns out.

--DB

 
Because callers can be challenged, I would do this as three prompts. Ask for year as four digit, test that. Then month as two digit, test that, then date as two digit. Easier to evaluate and easier for callers to enter.

Mike Forrence
 
Why not ask the caller rather than have them input?

If whatever is before 01/31/2017, Press 1
If whatever is after 01/31/2017, Press 2
If this confuses you, Press 0 (Disconnect Action)
 
Anytime I have encountered something of this nature it was setup as Aegis stated. I guess if they do not want to reveal when the cutoff is for going to one group or another the original idea would work. If that is not the case Aegis has the simple and best answer really.

The truth is just an excuse for lack of imagination.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top