Page 1 of 1

Newbie VXML question

Posted: Thu Jul 09, 2009 10:36 am
by evanl@peopleclues.com
Totally new to VXML. What I want to do is let the caller verify the information
they entered. Return a 1 or a 0 to the survey question to perform skip logic.
Would you let me know what I have wrong below?

<vxml version="2.0">
<form>
<block>
<prompt>
Please verify the following information you entered.
Store ID: <value expr="'11111'"/>.
Last 4 digits of your Social Security Number: <value expr="'1234''"/>.
4 Digits Month and Day of your Birthday: <value expr="'1223'"/>.
</prompt>
</block>
</form>
<menu>
<prompt> Is this correct? </prompt>
<choice next="#yes"> Yes </choice>
<choice next="#no"> No </choice>
</menu>
<form id="yes">
<block>
Yes
<var name="result" expr="'1'"/>
</block>
</form>
<form id="no">
<block>
No
<var name="result" expr="'0'"/>
</block>
</form>
<return namelist="result"/>
</vxml>

IVR code for multiple return elements in a doc

Posted: Thu Jul 09, 2009 10:59 am
by support
In your IVR code for your IVR survey, by placing the <return> outside the two <form>'s that you end up at, it will never be reached. You can have multiple <return> elements in a document, one for each outcome. We'd recommend the following IVR code:

Code: Select all

<form id="yes"> 
  <block> 
    Yes 
    <var name="result" expr="'1'"/> 
    <return namelist="result"/>
  </block> 
</form> 
<form id="no"> 
  <block> 
    No 
    <var name="result" expr="'0'"/> 
    <return namelist="result"/>
  </block> 
</form>

Posted: Thu Jul 09, 2009 11:17 am
by evanl@peopleclues.com
So I have changed the return as you suggested, however, when I call, the system just stops after reading the 4 digits month and day text. It never reads the Menu and options to me. any ideas?


<vxml version="2.0">
<form>
<block>
<prompt>
Please verify the following information you entered.
Store ID: <value expr="'#variables.storeID#'"/>.
Last 4 digits of your Social Security Number: <value expr="'#variables.ssn#'"/>.
4 Digits Month and Day of your Birthday: <value expr="'#variables.bday#'"/>.
</prompt>

</block>
</form>
<menu>
<prompt> Is this correct? </prompt>
<choice next="##yes"> Yes </choice>
<choice next="##no"> No </choice>
</menu>
<form id="yes">
<block>
Yes
<var name="result" expr="'1'"/>
<return namelist="result"/>
</block>
</form>
<form id="no">
<block>
No
<var name="result" expr="'0'"/>
<return namelist="result"/>
</block>
</form>
</vxml>

IVR code for menu choices

Posted: Thu Jul 09, 2009 11:24 am
by support
VXML documents do not execute beyond the first <menu> or <form> unless you explicitly jump to the next one. So you should put an id on your <menu>, e.g. <menu id="themenu"> and put a <goto next="#themenu"/> at the end of your first form's <block>.

Also, within your IVR survey, your menu choices have too many #'s. IVR code example:

Code: Select all

<form> 
<block> 
<prompt> 
Please verify the following information you entered. 
Store ID: <value expr="'#variables.storeID#'"/>. 
Last 4 digits of your Social Security Number: <value expr="'#variables.ssn#'"/>. 
4 Digits Month and Day of your Birthday: <value expr="'#variables.bday#'"/>. 
</prompt> 
<goto next="#themenu"/>
</block> 
</form>	
<menu id="themenu"> 
...