ConditionalEvent

Registers events that trigger as the result of a true condition.

YAML representation
condition: string
transitionToScene: string
handler: 
  object (EventHandler)
Fields
condition

string

Required. Filter condition for this event to trigger. If condition is evaluated to true then the associated handler will be triggered. The following variable references are supported: $session - To reference data in session storage. $user - To reference data in user storage. The following boolean operators are supported (with examples): && - session.params.counter > 0 && session.params.counter < 100 || - session.params.foo == "John" || session.params.counter == "Adam" ! - !(session.params.counter == 5) The following comparisons are supported: ==, !=, <, >, <=, >= The following list and string operators are supported (with examples): in - "Watermelon" in session.params.fruitList size - size(session.params.fruitList) > 2 substring - session.params.fullName.contains("John")

transitionToScene

string

Optional. Destination scene which the conversation should jump to when the associated condition is evaluated to true. The state of the current scene is destroyed on the transition.

handler

object (EventHandler)

Optional. Event handler which is triggered when the associated condition is evaluated to true. Should execute before transitioning to the destination scene. Useful to generate Prompts in response to events.