The Menu from Stack module can be used to play prompts to the user based on rows from the Stack, and/or allow the user to select one of the rows from the Stack by one of the fieldnames in this row. This module will iterate through all the rows within the Stack until the user enters a specific input either by voice or DTMF to select the row. Either voice or DTMF input can be used, and with separate fieldnames. The row choices can also be autonumbered for DTMF input.
The result variable for this module is the number of the row selected; you can then use the Get Row from Stack module (particularly its Get a specific row # menu option) to fetch variables only from fields in that row into variables in your application.
Error handling - Selecting this checkbox will enable additional nodes to handle error conditions. The “Silence” node will be used when there is no input from the user and the “Invalid entry” node will be used when the input from the user does not match any of the allowed responses.
Spell out digits - Selecting this checkbox will say your variable as digits (i.e. “123” would be said as “one, two, three” instead of “one-hundred twenty-three”)
Spell out letters - Selecting this checkbox will say your variable as letters (i.e. “cat” would be said as “c-a-t” instead of “cat”)
Numbers are currency - Selecting this checkbox will say your variable back as a currency (i.e. “5.23” would be said as “five dollars and twenty-three cents” instead of “five point two three”)
Allow user to barge in - Selecting this checkbox will allow the user to barge in by voice or DTMF before the prompts have finished playing. This is enabled by default.
This module can be used when you are fetching multiple rows from a stack and listing them to the user. When autonumber is chosen, the module automatically numbers each of the rows from your stack (starting from 1) and corresponds them to a DTMF input that the user can enter. When field value is chosen, you can enter a field value to determine how the user will select the rows from your stack.
Once a user has selected a choice from the stack, you can act on the variable, rowChoice, by using a Get Row from Stack module and setting rowChoice as the specific row (see example below to see its use case).
From this example, the user is prompted to enter a choice for either accounting or sales. Once the user has made a choice, the Query Database module queries the 'employees' database for the department equal to the user's choice. If the user chose accounting, the Menu from Stack module plays the following messages (based off of our 'employees' database):
“To select: Gerald Hamm, say Gerald Hamm. To say: Tom Forte, say Tom Forte.”
If the user chose sales, the Menu from Stack module plays the names associated with the sales department.
From here, the Get Row from Stack module is used to fetch the row that had been selected and a variable, phonenum, is set to the phonenum of the row that had been selected. Finally, a Transfer module is used to transfer the user to the phone number of the person that was selected.