VoxML 1.0 Element Reference

INPUT Element : Type MONEY

INPUT Element : Type MONEY

The MONEY input is used to collect monetary amounts from the user.

Syntax

<INPUT TYPE="MONEY" NAME="value" NEXT="value" [NEXTMETHOD="value"] [TIMEOUT="value"] />

Attributes

Attribute Name

Allowed Values

 

 

NAME

identifier

 

 

NEXT

next step URL

 

 

NEXTMETHOD

GET *

 

POST

 

 

TIMEOUT

milliseconds (integer)

Examples

1 <STEP NAME="init">

2<PROMPT> How much would you like to deposit?

3</PROMPT>

4<INPUT TYPE="money" NAME="dep" NEXT="#deposit"/>

5</STEP>

The above example code illustrates the use of the MONEY input type to collect the amount of money that the user would like to deposit in his account, store that amount in a VoxML variable named “dep”, and then go to the STEP named “deposit”.

Data Format

The MONEY input makes use of an input grammar to interpret the user’s response and store that response in a standard format. The input grammar is able to interpret several ways to express monetary amounts.

The data is stored in integer format, in terms of cents.

“five cents” is stored as “5”, “five dollars” is stored as “500”, and “a thousand” is stored as “100000”. Note that no punctuation is added to the digits. Also note that in the case where the units are ambiguous, the grammar assumes dollars, as in the example above in which “a thousand” was stored as if the user had said “a thousand dollars”.

October 1998

VoxML 1.0 Language Reference 25

Page 29
Image 29
Motorola 1 manual Input Element Type Money, Data Format