Plum DEV Documentation
voicexml:tags:enumerate

<enumerate>

The <enumerate> element is an automatically generated description of the choices available to the user.

Attributes

None

Notes

NOTE: The element specifies a template that is applied to each choice in the order they appear in the menu. The element may refer to two special variables: _prompt refers to the prompt within the choice and _dtmf refers to the assigned DTMF sequence of the choice.

Example

<?xml version="1.0"?>
<vxml version="2.0">
  <menu id="maincoursea">
    <prompt>
      Please select an entree.
    <enumerate>
      For <value expr="_prompt"/>, press <value expr="_dtmf"/> or say <value expr="_prompt"/>.
    </enumerate>
    </prompt>
    <choice next="#maincoursea1" dtmf="1"> swordfish steak </choice>
    <choice next="#maincoursea2" dtmf="2"> roast beef </choice>
  </menu>

  <menu id="maincoursea1">
    <prompt>
      You chose swordfish steak. Press 1 or say dessert to hear what's for dessert.
    </prompt>
    <choice next="#dessert" dtmf="1">Dessert</choice>
  </menu>

  <menu id="maincoursea2">
    <prompt>
      You chose roast beef. Press 1 or say dessert to hear what's for dessert.
    </prompt>
    <choice next="#dessert" dtmf="1">Dessert</choice>
  </menu>

  <form id="dessert">
    <block>
      <prompt>
        The dessert today is chocolate pie.
      </prompt>
    </block>
  </form>
</vxml>

The output of the above script would be:

Computer: Please select an entree. For swordfish steak, press 1 or say swordfish steak. For roast beef, press 2 or say roast beef.
Human: Roast beef.
Computer: You chose roast beef. Press 1 or say dessert to hear what's for dessert.
Human: Dessert.
Computer: The dessert today is chocolate pie.

Child Tags

Parent Tags