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>
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
Newbie VXML question
IVR code for multiple return elements in a doc
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>
Last edited by support on Thu Mar 04, 2010 4:49 pm, edited 2 times in total.
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com
-
- Posts: 24
- Joined: Wed Oct 29, 2008 10:25 am
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>
<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
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:
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">
...
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com