NotifyAction - addGather()

Present an interactive phone menu to the user.

Table 1. Parameters
Name Type Description
Table 2. Returns
Type Description
GatherAction The action added to the NotifyAction object. Use the GatherAction object to define the menu settings and options to present to the user.

// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();

// present the user with a menu
var gather = notifyAction.addGather();
gather.setNumberOfDigits(1);    // the user can type 1 digit
gather.setFinishKey('#');       // # or *, usefull for > 1 digits
gather.setTimeout(10);          // time to enter answer, in seconds

// add first menu item
var usSay = gather.addSay();
usSay.setText('Press 1 for english');

// add second menu item
var nlSay = gather.addSay();
nlSay.setText('Kies 2 voor Nederlands');

// add third menu item
var frSay = gather.addSay();
frSay.setText('Choisissez 3 pour le fran├žais.');

// and finish off with an applause
var play = gather.addPlay();