Skip to main content


The event trigger tag declares an event by which the dialog can enter a state.

This is a local tag: transitions by this tag can be made only from the nearest parent, sibling, or children states.


An event name is specified after the tag. Refer to the Events section to learn more about events supported in JAICP DSL.


ParameterTypeDescriptionDefault value
fromStateStringA path to a state from which a transition to the current state by this event tag can be made.
toStateStringA path to a state to which a transition from the current state by this event tag can be made.
onlyThisStateBoolean• If true and the fromState parameter is present, a transition to the current state can be made strictly from the state specified in fromState, but not from its nested states.
• If true and the toState parameter is present, a transition to the state specified in toState can be made strictly from the current state, but not from its nested states.

How to use

  • Receiving a file:

    state: RequestPhoto
    a: Send me a picture of yourself so I can complete your application form.

    state: GetFile
    event: fileEvent
    a: Thanks!

    state: FileTooBig || noContext = true
    event: fileTooBigEvent
    a: The file size may not exceed 50 MB.
  • Receiving geolocation:

    state: RequestLocation
    a: Please send me your current location.
    event: telegramSendLocation || toState = "GetLocation"

    state: GetLocation
    a: Thanks! The order will be sent to your location.