GetText

Purpose

Use GetText to retrieve information that is provided by a caller as a series of letters.


A screen capture of the Action GetText window

Description

Use GetText to retrieve information that is provided by a caller as a series of letters. The Key Signals system parameter group maps letters to the keys on the telephone keypad.

To enter a letter, the caller presses two keys. The first key is the key on which the letter appears. The second key indicates which of the letters mapped to that key is the one the caller wants. The first position in the map is 0, the second position is 1, and so on.

For example, if the keys are mapped as printed on telephone keypads in the United States, the map for key 2 can be set to 2ABC. The caller presses 20 to enter the number 2 (as text); 21 to enter the letter A; 22 to enter the letter B; and 23 to enter the letter C. To enter S, the caller presses 73.

Note: To accommodate Q and Z, you can map the Key 1 parameter to 1QZ. After you restart Blueworx Voice Response, Q is available by pressing 11, and Z by pressing 12.

The key identified by the Stop Key system parameter in the Application Server Interface group clears the input to allow the caller to start over. By default, this is the * key. The last key pressed must be the key identified by the Enter Key system parameter in the Application Server Interface group. By default, this is the # key.

GetText causes an automatic fade out of any background music. You can override this by using the System : Music : Automatic fade before actions system variable (SV226).

Parameters

The parameters for GetText identify the variable to which the returned information is assigned and the length of the information. The parameters also define two timeouts.

Possible results

GetText can have one of the following results:

Succeeded
The text provided by the caller has been assigned to the variable.
Input Too Short
The caller did not enter as many letters as are required by the value of Minimum.
Input Too Long
The caller entered more letters than are allowed by the value of Maximum.
Input Incomplete
The caller did not press the pound key.
Input Invalid
The caller entered a two-key sequence in which the second key does not correspond to the first key map. For example, if the keys are mapped with three letters each, starting with ABC on key 2, and the caller presses 2 and then 4, GetText will result in Input Invalid.
Timeout
The time defined by Timeout has elapsed and the caller has not entered the information.
Last Timeout
The application has repeated this GetText action for the number of times defined by the value of Timeouts Allowed.
Caller Hung Up
The caller has hung up.

ASCII syntax

When using an ASCII editor, code this action with these parameters in the following order:

  1. Key Buffer input, local or system variable
  2. Minimum
  3. Maximum
  4. Timeout
  5. Timeouts allowed

For example:

getinput: "Check Edges"
	GetText(loc3_s, 12, 25, 10, 5)
	  edge EDGE_GETT_LEN_OK:			 len_ok
	  edge EDGE_GETT_TOO_SHORT:		 too_short
	  edge EDGE_GETT_TOO_LONG: 		 too_long
	  edge EDGE_GETT_INCOMPLETE:		  incomplete
	  edge EDGE_GETT_INVALID_ENTRY:	 invalid_entry
	  edge EDGE_TIMEOUT: 			   timeout
	  edge EDGE_LAST_TIMEOUT: 		  last_timeout
	  edge EDGE_HUP: 				   hup
	;

The parameters and edges are described above under "Parameters" and "Possible results". For more information, see Testing a state table using the debugger.