We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

Is it possible to redirect someone to a <field> using

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
jamesmm
Posts: 1
Joined: Thu Jul 10, 2003 12:13 pm
Contact:

Is it possible to redirect someone to a <field> using

Post by jamesmm »

Hello,
I'm trying to redirect users in my script using the <goto> tag.

I have only one form on this page and would like to have the users goto a field item with the name "callersMRF"

I have tried redirecting to this field using the # infront of the name and with out. It will not work.

Is it possible to redirect someone to a <field> using the <goto> tag?

Thanks,
James

admin
Site Admin
Posts: 35
Joined: Thu May 29, 2003 3:12 pm

IVR example of GoTo tag...

Post by admin »

You can use the <goto> tag to jump to fields within a form by using the "nextitem" attribute rather than the "next" attribute. Use the name of the field as the value of the nextitem attribute.

Note that you may also need to use the IVR tags clear or reprompt to alter the order of fields chosen by the form interpretation algorithm.

For sophisticated changes in IVR call flow, an alternative is to place each field you want to jump to within its own form. You can then use the < goto > tag to jump to that form. With this approach, you may need to use document scoped global variables to store and refer to variables. Here is a simple IVR example:

Code: Select all

<?xml version="1.0" ?> 
<vxml version="2.0"> 

<var name="employee_id" expr="''"/>
<var name="employer_code" expr="''"/>

<form id="main_form"> 
<block> 
   <audio src="welcome.wav">
       Welcome!
   </audio> 
   <goto next="#get_employer_identifier_code"/>
</block> 
</form> 


<form id="get_employee_id"> 
  <field name="employee_id_number" type="digits">
     <prompt>
        <audio src="get_employee_phone.wav">
          Please enter your employee phone number.
        </audio>
     </prompt>
     <filled>
        <assign name="employee_id" expr="employee_id_number"/>
     </filled>
  </field>
</form> 



<form id="get_employer_identifier_code"> 
  <field name="employer_id" type="digits">
     <prompt>
        <audio src="get_employer_id.wav">
          Please enter your employer identification number.
        </audio>
     </prompt>
     <filled>
        <assign name="employer_code" expr="employer_id"/>
     </filled>
  </field>
</form> 

</vxml> 


In the above IVR example, the user would hear:
Welcome!
Please enter your employer identifier number.
[call disconnects]

because the first form in the vxml file executes first, and there is a goto, which jumps to the third form.

Post Reply