The Menu object presents a list of choices and lets the caller select one of them. When the caller has selected an item, the dialog continues with the processing of the object referenced in that item. After the subdialog is finished, the dialog flow may optionally return to the menu.
The Object Definition below covers the configuration of the Menu object with VoiceObjects Desktop. For information on how to define this object type using VoiceObjectsXML refer to the VoiceObjectsXML Definition paragraph.
The Menu object belongs to the object category Components.
The following dialog flow example shows a simple menu dialog within an information portal. The caller selects Stock Quotes from a list of available Menu items and after processing the Stock Quotes subdialog the dialog flow returns to the main menu.
|
Object – Caller |
Dialog Flow |
|
|
Main menu. You can choose from among the following services: News, Stock Quotes, Travel, and Entertainment. Which are you interested in? |
|
|
Stock Quotes |
|
[Process dialog flow of:] Stock Quotes |
|
|
|
[Repeat menu:] Back in the main menu. Choose again: News, Stock Quotes, Travel, or Entertainment. |
The Definition of the Menu object provides the following sections:
· Welcome Message
To define the introductory output for the entire menu.
· Menu Items
To define the list of individual menu choices available.
· Selection Request
To define the output playing a final selection request message.
· Options
To configure processing options.

For information regarding additional object configuration refer to Pre-/Postprocessing, Event Handling, Navigation, Tuning, and Properties in this Object Reference.
The Welcome Message defines an optional output to be presented to the caller in the Initial section, as well as modified outputs for event cases in the Event Reprompt section (only processed in the voice and video channel).

In the voice and video channel, the optional welcome message in the Initial section may contain the list of Menu items available. Alternatively, this list may be provided by the Menu items themselves (see below). If Menu items are dynamically added or removed via custom layers (see Chapter 7 – How to Use Layers in the Design Guide), their individual outputs should be used.
In the text and Web channel, the outputs of the Menu items must be used to present the items. In these channels, the welcome message only holds the introductory text, e.g. Main menu.|Please choose:.
For further information on the usage of the pipe symbol “|” in the text and Web channel, and in general for details on how to configure an Output object, refer to Output in this Object Reference.
For a detailed description of how to use the reprompting mechanism provided in the Event Reprompt section, refer to Chapter 8 – Advanced Event Handling in the Design Guide. Note that reprompting only applies to the voice and video channel.
In the Menu Items section, one or more Menu items can be defined.

In each Menu Item section the following properties can be specified:
|
Property |
Description |
|
Label |
Optional parameter to identify the Menu item in a list. |
|
Layer |
Optional parameter to indicate the layer that the Menu item belongs to. For more information on layers, see Layers in this Object Reference or Chapter 7 – How to Use Layers in the Design Guide. |
|
Channel |
Identifies the channels in which the respective Menu item is to be active. If a Menu item is appropriate for all channels, the default channel layer setting Default should be used. Otherwise, define one of the four channels Voice, Video, Text or Web. For your convenience, use the two combined settings Voice/Video or Text/Web in case the Menu item is to be active in those combinations. Using a combined channel is the same as defining two Menu items with the individual channel setting, with all other settings being the same. |
|
Object |
Specifies the object that is to be processed when the caller selects this Menu item. |
|
DTMF/text key(s) |
Allows defining keys (DTMF keys in the voice and video channel, and access keys in the text channel) that can activate this Menu item. Typically, exactly one key or key sequence is associated with an item, but it is possible to allow more than one key or key sequence to activate a Menu item. In that case, define a comma-separated list of keys. Examples: · "1" · "3, 10" i8 Note: If DTMF/text keys are defined for an item, any corresponding grammar definition specified in the embedded Grammar object of the item will be ignored (i.e. DTMF grammars in the voice and video channel, and voice grammars in the text and Web channel). Furthermore, if auto-numbering (see Options) is active, any settings in the DTMF/text key(s) field and again the corresponding grammars will be ignored. |
|
Result value |
Optional value that is assigned to the Result variable defined in the Options section when the current Menu item is selected. |
|
Exit Menu |
Indicates what to do after the object defined for this Menu item has been processed. The default setting False indicates that the dialog returns back to the menu. When set to True, the processing of the Menu object is terminated and the dialog continues with the next object after the Menu object (if any). The Exit Menu property can dynamically be set at call time by defining it with a Variable, Expression, Layer, or Script object. If it is dynamically set, the value is determined before the object defined for the Menu item is processed. |
In addition, each Menu Item section contains the following two subsections:
In the Menu Item Output section, output can be specified that presents this specific Menu item to the caller.
In the voice and video channel you can either decide to include information on the items in the welcome message or to use the individual Menu item outputs. Choose the first option if the menu and its items do not change dynamically during or between calls. Choose the second option if some Menu items are associated with custom layers, so that they could be hidden for some callers.
In the text and Web channel you must use the Menu item outputs to present the items. The welcome message is here only used to hold the introductory text, e.g. Main menu.|Please choose:.
In all channels, the outputs of all Menu items are presented in the order the items are defined in, the welcome message coming first. In the Web channel, the tuning parameter Presentation – Menu governs how Menu items are to be arranged on the screen. Possible values are horizontal (the default; all items are displayed in one row), vertical (all items are displayed one below the other), 2columns (two items are displayed in one row), 3columns (three items are displayed in one row).

For further details on how to configure an Output object refer to Output in this Object Reference.
For a detailed description of how to use the reprompting mechanism provided on the Event Reprompt section, refer to Chapter 8 – Advanced Event Handling in the Design Guide. Note that reprompting only applies to the voice and video channel.
The Menu Item Grammar defines the voice/text and DTMF input that invokes the processing of this Menu item. In the voice or video channel, the grammar can be left empty, in which case the server automatically generates a voice grammar from the name of the object specified as the Menu item object. For better control over the utterances that activate the Menu item, it is highly recommended to define a proper grammar, though.
In the text channel, the grammar is used to define the access key that activates the Menu item. It will be displayed on the screen, together with the Menu item output. The grammar must be defined in the Voice/Text section of the Grammar object.
A typical display of a Menu object in the text channel could look like this:

In this example, the Menu item grammars define the access keys (1, 2, 3, 4), whereas the Menu item outputs define the option names (Service plans, Customer data, etc.).
In the Web channel, menu items will be displayed as clickable hyperlinks. No access keys will be shown, so the Menu item grammar isn’t conceptually required in this channel. To make the Menu object valid, though, either define ? (question mark) as the Menu item grammar, or enable auto-numbering in the Options section.
For further details on how to specify a Grammar object refer to Grammar in this Object Reference.
i8 Note: In the voice and video channel, a DTMF grammar for an item should not be defined in the DTMF section of the Menu Item Grammar, but in the DTMF/text key(s) field. With the latter approach, DTMF grammars will be rendered into VoiceXML using the "dtmf" attribute on the <choice> element. If you do not define DTMF/text key(s) but a DTMF grammar instead, it will be rendered using a <grammar> element as a child of <choice>, which is not supported on all media platforms.
If no DTMF grammar is defined in the Menu items and Auto-numbering is disabled, an Error – Internal event is activated.
@8 Tip: A Menu object may contain any number of Menu items. However, in the case of voice applications, it is recommended to limit this to a number that is easy to remember for callers, typically not more than 5 items.
The Selection Request defines an optional output to be presented to the caller in the Initial section, as well as modified outputs for event cases in the Event Reprompt section (only processed in the voice and video channel).

In the voice and video channel, the optional selection request in the Initial section may contain a request to choose one of the existing Menu items, e.g. Please make your choice now. This is especially helpful if Menu items are dynamically added or removed using custom layers (see Chapter 7 – How to Use Layers in the Design Guide).
For further information on the usage of the pipe symbol “|” in the text and Web channel, and in general for details on how to configure an Output object, refer to Output in this Object Reference.
For a detailed description of how to use the reprompting mechanism provided in the Event Reprompt section, refer to Chapter 8 – Advanced Event Handling in the Design Guide. Note that reprompting only applies to the voice and video channel.
There are four processing options for the Menu object.

Return to the menu after the subdialog processing of a Menu item defines how to continue in the dialog after the processing of a Menu item is finished. If this check box is selected (the default), the processing of the menu only ends if a Menu item is processed with Exit Menu set to True. Otherwise the processing of the Menu object continues. If this check box is clear, the processing of the Menu object ends after processing any Menu item regardless of the respective setting in the Exit Menu field.
This option is indicated in the Dialog Designer of VoiceObjects Desktop by the
icon next to the Menu object icon.
Auto-numbering is a feature that automatically assigns keys to each consecutive Menu item, starting with 1. These keys can be used to activate a Menu item, using DTMF in the voice and video channel, or typing in the number as a response in the text channel. In the Web channel, auto-numbering is not relevant, as the keys will not be displayed.
If auto-numbering is active, any DTMF keys or DTMF grammars defined in any item will be ignored in the voice and video channel, and any text keys or voice/text grammars in the text channel. If you do not wish to use auto-numbering, leave the setting at None. There are two different types of auto-numbering:
1.) Continuous
Continuous auto-numbering means that first all layers associated with Menu items are evaluated, so that items might get disabled, and then keys are assigned. This will always result in a continuous assignment from 1 to n, where n is the remaining number of items after the layer evaluation.
As an example, consider a Menu object with 5 items, where the second one has a layer that evaluates to false for a given call. This second item is first ruled out, and then all remaining items get their numbers. Thus, the first one can be activated with "1", the second one with "2", the third one with "3" and the fourth one with "4".
2.) Discontinuous
Discontinuous auto-numbering means that first all Menu items will get a key assigned, and then the layer evaluation takes place. This might result in a discontinuous assignment, meaning that there can be items that retain their key but are ruled out due to layer conditions. Discontinuous auto-numbering allows keeping key assignments to Menu items that the caller might be familiar with, while at the same time using layers to rule out certain Menu items.
As an example, consider a Menu object with 5 items, where the second one has a layer that evaluates to false for a given call. First, all items get their numbers, i.e. the first item will get "1", the second "2", etc. Due to the layer of the second item, there are four remaining Menu items; the first can be activated with "1", the second one with "3", the third one with "4" and the fourth one with "5".
Auto-numbering variable can be used to define a reference to a Variable object that receives the DTMF key assigned to each Menu item in auto-numbering, e.g. to read out the key within the respective Menu Item Output. Note that the value is provided within the scope of the respective Menu Item Output, and that it may be undefined outside of this scope.
Sorting enables the dynamic re-sorting of Menu items at call time. It can be set at call time by defining it with a Variable, Expression, or Script object. The value provided needs to be the comma-separated list of Menu item labels. Note that all Menu items need to have labels defined for this to work properly. Any Menu items that do not occur within the sorting string are filtered out.
Sorting is always performed first (if the Sorting property is defined); afterwards filtering and auto-numbering are applied as described above under Auto-numbering.
Result variable defines a reference to a Variable object that receives the result value defined for the selected Menu item. This value can then be used within the subdialog that is initiated by the Menu item selection.
Increased Dialog Timeout specifies a timeout value that is applied for this object in case it is higher than the current dialog timeout in a session. If it is lower, the setting is ignored. It is mainly applicable in the text and Web channel, where the dialog timeout of a service should be set to a relatively low value, e.g. 40 seconds, to keep the number of concurrent sessions low, as they usually run into the server timeout due to technical reasons. Use this setting to increase the timeout temporarily for objects that are likely to require more time to respond to, e.g. when the caller has to type in an address.
Record utterances specifies whether utterances made in this object are to be recorded (True) or not (False), given that utterance recording is switched on for this session. Always indicates that utterances in this object are always recorded when utterance recording is enabled on the service, regardless of statistical filtering. By default the value is Default, indicating that the current value of the corresponding dialog context setting RECORDUTTERANCES is used.
Recording scope defines the scope in which recordings will be made. If set to Recognition, only those utterances will be recorded that were successfully recognized (including the activation of hyperlinks). If set to No Match, only those utterances will be recorded that triggered a No Match event. If set to All, any recording will be stored. If set to Default, the current value of the corresponding dialog context setting RECORDINGSCOPE is used. By default the value is Default.
Due to the nature of recordings, the feature of recording utterances is only available in the voice and video channel. For more information on this refer to Chapter 6 – Recording of Utterances in the Deployment Guide.
The Menu object is represented by the VoiceObjectsXML element <menu>. It has four attributes and nine groups of children.
In addition, the element has the standard attributes described in the XDK Guide.
The <menu> element uses the embedded <menuItem> element.
· return
Defines whether the dialog returns to the Menu object after a Menu item has been activated. Either true or false. If not specified, defaults to true.
· autonumbering
Defines whether automatic numbering for the Menu items should be used. Can be none, continuous, or discontinuous. If not specified, defaults to none.
· autonumberingVariable
Defines a reference to a Variable object that provides the key assigned to each Menu item.
· sorting
Defines a sorting string for the Menu items. Can be a static value or a reference to a Variable, Expression, or Script object.
· resultVariable
Defines a reference to a Variable object that provides the result value for the selected Menu item.
· recordUtterances
Defines whether to use utterance recording. One of true, false, always, default. If not specified, defaults to default.
· recordingScope
Defines the scope for utterance recording. One of all, noMatch, recognition, default. If not specified, defaults to default.
· increasedDialogTimeout
Defines the increased dialog timeout in seconds. If not specified, the setting from the dialog context is applied at call time.
· <expression usage=”precondition”> or
<variable usage=”precondition”> or
<collection usage=”precondition”> or
<script usage=”precondition”>
Defines the precondition for the Menu object.
· <sequence usage=”preprocessing”>
Defines the preprocessing sequence for the Menu object.
· <output type=”initial”>
Defines the “initial” section of the menu welcome message.
· <output type=”reprompt”>
Defines the “event reprompt” section of the menu welcome message.
· +<menuItem>
Defines the list of Menu items.
· <output usage=”final” type=”initial”>
Defines the “initial” section of the menu selection request.
· <output usage=”final” type=”reprompt”>
Defines the “event reprompt” section of the menu selection request.
· <eventHandling>
Defines the event handling for the Menu object.
· <customNavigation>
Defines the navigation settings for the Menu object.
· <tuning>
Defines the tuning settings for the Menu object.
· <sequence usage=”postprocessing”>
Defines the postprocessing sequence for the Menu object.
<menu dtmf=”continuous”>
<output>
<outputItem><text>This is the main menu. Press one to file a new
order. Press two to check on an existing
order.</text></outputItem>
</output>
<menuItem label=“NewOrder“>
<module link=“#File new order“/>
</menuItem>
<menuItem label=“ExistingOrder“>
<module link=“#Check existing order“/>
</menuItem>
<output usage=”final”>
<outputItem><text>Please make your choice now.</text></outputItem>
</output>
</menu>
· label
A text string providing a name for the Menu item.
· layer
Defines the layer for the Menu item. Can either be a reference to a Collection, Expression, Script, or Variable object; or a layer state reference of the form “Layer=State” or “Layer!=State” where “State” is the label of a state for the layer “Layer”.
· channel
Defines the channel(s) for which this Menu item is valid. Can be default, voice, video, text, web, voiceVideo, or textWeb. If not specified, defaults to default.
· exit
Defines whether the dialog exits the Menu object after processing this Menu item. Either true or false. If not specified, defaults to false.
· dtmfKeys
Defines DTMF/text keys to be associated with the corresponding Menu item. Can be one key or key sequence, or a comma-separated list of keys or key sequences.
· resultValue
Defines the result value to be set when this Menu item is selected. Can be a static value or a reference to a Variable, Expression, Layer, or Script object.
· <output usage=”menu” type=”initial”>
Defines the “initial” section of the Menu item output.
· <output usage=”menu” type=”reprompt”>
Defines the “event reprompt” section of the Menu item output.
· <grammar>
Defines the activation grammar for the Menu item. Optional if auto-numbering is enabled in the Menu object. Instead of defining DTMF grammars here, use the dtmfKeys attribute on the <menuItem> element.
· One of the following:
<module>, <input>, <output>, <sequence>, <menu>, <confirmation>, <list>, <osdm>, <plugin>, <connector>, <script>, <log>, <if>, <case>, <goto>, <loop>, <expression>, <recording>, <transfer>, <pause>, <exit>
Defines the object to be processed when the Menu item is selected.
<menuItem label=”1” exit=”true”>
<output usage=”menu”>
<outputItem><text>Item one.</text></outputItem>
</output>
<output>
<outputItem><text>You have selected Menu item one.</text></outputItem>
</output>
</menuItem>
The following table contains all object types that can reference a Menu object:
|
Icon |
Object Name |
Use Case Example |
|
|
A Menu object can be used within the embedded sequence of a Module object. |
|
|
|
Most commonly, a Menu object is used within a Sequence object in a dialog flow. |
|
|
|
Menu |
A Menu object can be used as the destination object within a Menu item. |
|
|
A Menu object can be used as the destination object within a Correction item inside a Confirmation object. |
|
|
|
A Menu object can be either in the THEN or the ELSE item of an If object. |
|
|
|
A Menu object can be used in any WHEN item of a Case object. |
|
|
|
A Menu object can be used within the embedded sequence of a Loop object. |
|
|
|
A Menu object can be referenced via a Goto object. |
|
|
|
A Menu object can be the destination of a Hyperlink object. |
In order to leverage the capabilities of the integrated documentation of VoiceObjects it is important to provide intuitive and self-explanatory object names and descriptions.
The name of a Menu object should identify the type of menu that is presented to the caller. The short description should contain a brief explanation of the choices that are offered. The table below lists three examples:
|
Name |
Description |
|
|
Main menu of the Entertainment Portal, offering the choice between Joke box, Quiz, Blackjack, and Chat. |
|
|
Determines which type of account the caller wants to access: checking, savings, or money market. |
|
|
Offers the caller the available card services: Sign up for a new card, cancel an existing card, get a partner card, or report a lost/stolen card. Gold members additionally have the option of travel booking. |