kaangyib Report post Posted 06/14/2013 04:25 AM Hi support team, I'm trying to have multiple conditions say number function where caller press on one of the menu option, (e.g: For Members Status press "1", to check for auto renewal press "2", and this case, members press on "2") and VG look into a database by validating members ID number and refer to the following data field to read the results: discode (members ID number) disexpiry (contain info of membership expiry date in MMYYYY format) disautorenew (contain info of membership extended expiry date in MMYYYY format) disappv (contain info of membership current sales point in digit format) The multiple conditions are as follow: based on members ID (discode), if members are eligilble for auto renewal, the system will play a AUTO RENEWAL prompt and follow by saying disautorenew data. (**if data field value disautorenew has value, this condition kicks in) based on members ID (discode), if members are not eligible for auto renewal but still can work forward to achieve more personal sales to entitle auto renewal before the expiry date, the system will play a PV sales prompt and follow by saying disappv data in digits, and follow by Achievement prompt and end with saying disexpiry data in MMYYYY date format (** if data field value disautorenew is null and disexpiry value is before current call in date, this condition will kicks in) based on members ID (discode), if members are not eligible for auto renewal, the system will play FAIL RENEWAL prompt. (**if data field value disexpiry is greater than call in date and disautorenew value is null and disappv is lesser than 2000, this condition kicks in) How can I design VG script by having the system to compare this 3 conditions to play the correct condition prompt? And how can I set VG to say date in MMYYYY format which the drop down bar does not contain MMYYYY format and all comes with DDMM, DDMMYYYY and etc. Please advise. Thank you! Share this post Link to post
SupportTeam Report post Posted 06/14/2013 05:01 AM Sounds like you should use multiple Evaluate Expression modules to compare the various returned data and decide if to go to certain module or move onto another Evaluate Expression module to test/compare another set of data. eg: here is a rough outline. [CheckIfAutoRenewal] test: "eligilble for auto renewal" if true goto [Play AUTO RENEWAL] if false goto [CanWorkHarder] [CanWorkHarder] test: "still can work forward to achieve more personal sales to entitle auto renewal before the expiry date" if true goto [PlayPvSalesPrompt] if false goto [CheckIfNotEligible] [CheckIfNotEligible] test: "not eligible for auto renewal" if true goto [Play FAIL RENEWAL] And how can I set VG to say date in MMYYYY format which the drop down bar does not contain MMYYYY format and all comes with DDMM, DDMMYYYY and etc. Do you just want to say the month and the year? Probably best approach is to extract month and year from returned date and play the month and the year separately. eg if you extract MM into variable $RV[theMonth] then you can specify a play module to play this: month$RV[theMonth].wav and the year can be played as a number. Both month$RV[theMonth].wav and the year can be played on one SayNumber module. Extraction of substrings can be made using Left, Mid and Right functions in an Evaluate Expression module. In what format is the date returned from database? Can you post a vgEngine trace (.ZIPed) thatr shows the database query returning date? Share this post Link to post
kaangyib Report post Posted 06/14/2013 06:03 AM Hi, I'm sorry. I really have no knowledge in any programming languages. Where shall I put this 3 evaluate expression module? I have a [capture entered number] module name Enter_DRN, where the caller input their membership ID number sitting infront of [Play Sound File] module, which prompt for the caller to press an IVR option to go to option "2" and follow by [query database] module and lastly continue with 3 separate [say number] module which reads the 3 conditions prompt accordingly. My database query statement is SELECT disexpiry, disautorenew, disappv, discode FROM v_ihqmst WHERE discode = '$RV[Enter_DRN]. The flow is as follow: Enter_DRN > Query Database to check entered DRN is correct, if correct, go to > Play sound file > query database to retrieve (disexpiry, disautorenew, disappv, discode) value > play sound file module (based on condition) where shall I put this 3 evaluate expression module and what shall I input in the "Expression to Evaluate" section? As for the reading date, you mentioned that we can play both the month and year in one say number module in digits format. Can you elaborate more how to set this? I have the month name prompt insert into VG system folder which contains all the voice prompt which starts with month01.wav as January, month02.wav as February and so forth and 1.wav as digit 1, 2.wav as digit 2 and etc. Let say the data field value shows 052014 (MMYYYY). How can I approach this? Share this post Link to post
SupportTeam Report post Posted 06/14/2013 12:47 PM (edited) Sounds like the determination of where the script should go next should be made after the relevant data is retrieved from database. So the Evaluate Expression modules that look at data retrieved from database and make decisions based on this retrieved data should go after the module that retrieves data from database. Sounds like in the first Evaluate Expression module you need to decide whether caller is "eligilble for auto renewal". How do you decide whether caller is "eligilble for auto renewal" based on the retrieved data? Based on what dates/data/calculations ? if you can advise what is the rule that must be followed in determining the eligibility, then we can advise how to specify this rule in an Evaluate Expression module. Regarding the dates. If the data field value is in format MMYYYY and is (say) stored in $RV[GetData_disexpiry] then you can use an expression like this in Evaluate Expression module to extract just the first two characters: Left("$RV[GetData_disexpiry]", 2) and the result will be automatically stored in a new $RV. please see: http://www.voiceguide.com/vghelp/source/html/resultvariables.htm and http://www.voiceguide.com/vghelp/source/html/modevalexpr.htm if title of the above Evaluate Expression module was (say) ExtractMM then the $RV holding those first two chars would be called $RV[ExtractMM] and then to play the corresponding month .WAV file, this would need to be specified as the sound file to be played: month$RV[ExtractMM].wav Edited 06/21/2013 06:12 AM by SupportTeam added quotes around $RV Share this post Link to post
kaangyib Report post Posted 06/21/2013 04:56 AM Hi support team, My database date value shown is mm/dd/yyyy which is 5/21/2013. How can use evaluate expression module to trim the value "dd", which is in this case 21 and just read out May 2013 as the final results? Share this post Link to post
SupportTeam Report post Posted 06/21/2013 05:01 AM (edited) Please use approach shown in previous post to say month, and then use another Say Number type module to say the Year. Year would be extracted like this: Right("$RV[mydatedata]", 4) and then can be assigned to new $RV. Then use that new $RV in another Say Number type module. Edited 06/21/2013 06:11 AM by SupportTeam added quotes around $RV Share this post Link to post
kaangyib Report post Posted 06/21/2013 05:51 AM Hi support team, I got this error in the log file 134923.545 6 46 16 state [trim_month] Evaluate [Left($RV[dbGetEnqTableNames_enqmth1], 1)]134923.545 6 46 16 rv replace start [Left($RV[dbGetEnqTableNames_enqmth1], 1)]134923.545 6 46 16 rv replace end [Left(5/1/2013 12:00:00 AM, 2)]134923.546 6 46 16 eval [Left(5/1/2013 12:00:00 AM, 2)]134923.546 6 46 16 VGMTYPE_EVALEXPR InvokeMember Eval Exception : Exception has been thrown by the target of an invocation.134923.546 6 46 16 eval InvokeMember Eval returned134923.546 6 46 16 rvns add trim_month_Input|Left(5/1/2013 12:00:00 AM, 2)134923.546 6 46 16 rvns add trim_month|134923.546 6 46 16 creating new (non-global) rv : date_trim_month134923.546 6 46 16 rvns add date_trim_month|134923.546 6 46 16 Eval Expr result:[] stored in RV[date_trim_month]134923.546 6 46 16 path {} not found134923.546 6 46 16 matching path not found [], try boolean paths.134923.546 6 46 16 matching path not found (Boolean False)134923.546 6 46 16 HangupCall, source=Path {Fail} not defined., WorkModeScript=Running_Normal, yLineStateAppPov=[Connected], lPlayId=334391, lRecId=0134923.546 6 46 16 moduleTitle=[trim_month] Share this post Link to post
SupportTeam Report post Posted 06/21/2013 06:11 AM Please change: Left($RV[dbGetEnqTableNames_enqmth1], 1) to: Left("$RV[dbGetEnqTableNames_enqmth1]", 1) Share this post Link to post
SupportTeam Report post Posted 06/21/2013 06:13 AM Also note that you would need extra logic in script to handle case where a 2 digit month is used. Share this post Link to post
kaangyib Report post Posted 06/21/2013 06:14 AM Hi support team, Please ignore my previous post.. I managed to get the results because I forgot to put " " in between $RV[dbGetEnqTableNames_enqmth1]. But I got one more issue, I wrote month$RV[date_trim_month].wav in the say sound module and turn out the results is "5" and not "May". Where did it go wrong? If i use Mid and Right method to extract out Mid = month and Right = Year in a seperate evaluate expression module and say number modules, what should i input in the say number module? date$RV[date_trim_date].wav and year$RV[date_trim_year].wav? Please advise. I have attached the results section log file. Log.rtf Share this post Link to post
kaangyib Report post Posted 06/21/2013 06:16 AM Also note that you would need extra logic in script to handle case where a 2 digit month is used. yes.. the month is 2 digits month... how can i approach this? Share this post Link to post
SupportTeam Report post Posted 06/21/2013 06:25 AM Can you please post the full VoiceGuide script file that you are using now? Share this post Link to post
kaangyib Report post Posted 06/21/2013 06:33 AM Can you please post the full VoiceGuide script file that you are using now? Kindly find attached files. main1.vgs 0621_1426_vgEngine.txt Share this post Link to post
SupportTeam Report post Posted 06/21/2013 06:58 AM In the attached script please see the section comprised of these 4 modules: persMnthDigit1 persMnthDigit2 persMnthSay0X persMnthSayXX These 4 modules show how to extract the month from a M/D/YYYY TTTTTT type date and speak out the month. Share this post Link to post
kaangyib Report post Posted 06/21/2013 07:05 AM In the attached script please see the section comprised of these 4 modules: persMnthDigit1 persMnthDigit2 persMnthSay0X persMnthSayXX These 4 modules show how to extract the month from a M/D/YYYY TTTTTT type date and speak out the month. There's no attached script. =) Share this post Link to post
SupportTeam Report post Posted 06/21/2013 07:23 AM Was referring to the main1.vgs script that was attached by you to your post. The modules mentioned are in that main1.vgs script and they show how to deal with extracting the month from the date expression that you have. Share this post Link to post