Rate this page:

AvatarState

Avatar state object that describes a state and implements the logic of transitions and reactions.

Props

beforeExit

Copy URL
beforeExit: 

(event: AvatarStateChangeEvent) => void,Promise<void>

|

undefined

Callback function when the dialogue leaves the state

name

Copy URL
name: 

string

State name

onEnter

Copy URL
onEnter: 

(event: AvatarStateChangeEvent) => AvatarResponse,Promise<AvatarResponse>

|

undefined

Callback function when the dialogue enters the state

onTimeout

Copy URL
onTimeout: 

(event: AvatarTimeoutEvent) => AvatarResponse,Promise<AvatarResponse>

onUtterance

Copy URL
onUtterance: 

(event: AvatarUtteranceEvent) => AvatarResponse,Promise<AvatarResponse>

Triggered when the dialogue is in this state and a customer says a phrase

utteranceCounter

Copy URL
utteranceCounter: 

number

Number of user phrases processed in this state. This counter resets when changing the state to any other (or the same) one

visitsCounter

Copy URL
visitsCounter: 

number

Number of the state visits