We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
How do I return prompt choices?
-
- Posts: 2
- Joined: Tue Dec 11, 2012 11:31 am
How do I return prompt choices?
When a prompt choice is returned do I have to submit that choice, and if so, how do I get the message_reference so I save the data to the correct record?
Re: How do I return prompt choices?
Hi,
We are not sure if we're totally understanding your question. If you would like to save a choice and associate it with the outbound message_reference, you will need to send both values to your save script.
start_url.php:save_choice.php:Hope this helps.
Regards,
Plum Support
We are not sure if we're totally understanding your question. If you would like to save a choice and associate it with the outbound message_reference, you will need to send both values to your save script.
start_url.php:
Code: Select all
<?php
header("Content-type: text/xml");
echo "<?xml version=\"1.0\"?>";
?>
<vxml version="2.0">
<var name="message_reference" expr="'<?= $_POST['message_reference'] ?>'"/>
<form>
<field name="choice" type="digits">
<prompt> Enter a number. </prompt>
<filled>
<submit next="save_choice.php" namelist="choice message_reference" method="post"/>
</filled>
</field>
</form>
</vxml>
Code: Select all
<?php
header("Content-type: text/xml");
echo "<?xml version=\"1.0\"?>";
//Save the file here
//reference $_POST['choice'] and $_POST['message_reference']
?>
<vxml version="2.0">
<form>
<block>
<prompt> Thank you. Your choice has been saved. </prompt>
<disconnect/>
</block>
</form>
</vxml>
Regards,
Plum Support
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com