Events
Avatar events.
Add the following line to your scenario code to use the events:
require(Modules.Avatar);
Constants
Finish
Triggered when an avatar ends a conversation with a customer.
Parameters
avatar:
channelParameters:
OptionalOptional. Avatar text and voice ChannelParameters.
currentState:
string
Current avatar state.
customData:
Object
OptionalOptional. Additional data returned from the avatar. Can be passed via the AvatarResponseParameters.customData parameter.
utterance:
string
OptionalOptional. Utterance to reply to the customer with.
Reply
Triggered when an avatar is ready to reply to a customer.
Parameters
avatar:
channelParameters:
OptionalOptional. Avatar text and voice ChannelParameters.
currentState:
string
Current avatar state.
customData:
Object
OptionalOptional. Additional data returned from an avatar. Can be passed via the AvatarResponseParameters.customData parameter.
interruptableAfter:
number
OptionalOptional. Time after which an avatar is ready to handle customer's interruptions (in case the avatar voices its response).
isFinal:
false
OptionalOptional. Whether an avatar's reply is final. If true, all other parameters except customData are ignored and the avatar does not process any more inputs in the current conversation.
listen:
true
OptionalOptional. Whether an avatar listens to the user after saying its utterance (or during it, if interruptions are enabled).
listenTimeout:
number
OptionalOptional. Number value that specifies how long an avatar listens to the user after saying its utterance (or during it, if interruptions are enabled).
nextState:
string
OptionalOptional. Next avatar state.
utterance:
string
OptionalOptional. Utterance to reply to the customer with.
UtteranceParsed
Triggered when an avatar parses a customer's phrase. The recognized phrase can be used for debugging and logging recognition results if needed.
Parameters
avatar:
confidence:
number
OptionalOptional. Recognized phrase confidence.
currentState:
string
Current avatar state.
entities:
Object
OptionalOptional.Extracted entities (both system and custom) AvatarEntities.
intent:
string
Most suitable intent recognized for the phrase (or 'unknown' if unclear).
intents:
Object[]
OptionalOptional. Extended information of the intent recognition results AvatarUtteranceIntent.
response:
string
Default response to the intent from the UI.
text:
string
Recognized phrase text.
utteranceCounter:
number
Number of user phrases processed in this state.
visitsCounter:
number
Number of the state visits.