PreviousNextIndex
Working with Event Types > About Events > Custom Events
 
Custom Events

Custom events are events that you define and create handlers for within your Dialog Designer speech applications. These events can be assigned any name, for example, "myevent.thishappened". The W3C VoiceXML 2.0 Specification defines various event and error events.

For example, suppose an event handler is created to handle a situation in which the account balance for a caller is below a certain amount. In this case, there might be a node of the call flow in which the account balance is retrieved from a database, and the balance is assigned to a variable. A Data node can be used to compare the balance with a set amount, and if the balance is less than that amount, the node operation can then throw a custom event called BalanceLow.

A Catch event can then be used in the AppRoot to handle this event when it is thrown from anywhere in the application (several nodes might throw this particular event). The Catch event can then be set up to transfer the caller to a live agent to talk about the account balance and offer overdraft protection services, for instance.

Note:

When catching errors, only catch individual specific errors and do not use a "catch all" such as "error.*" or ".". Catching an error and taking inappropriate actions can lead to unpredictable results.

Use the Event Types Editor to create custom event types. See Using the Event Type Editor.

Once the event type is created, then you can use it in your applications by throwing the event when the situation or condition is met and then catching it elsewhere in the application. For more information about this practice, see Events in Applications.


PreviousNextIndex

©2009, Avaya Inc. All rights reserved.