Skip to main content

Triggers

In the J‑Graph visual editor, the bot business logic is built upon states. Blocks describe how the bot can switch between states and what it should do after switching.

tip
Triggers are user phrases (intents) and events which can initiate a dialog transition to the current state.

How to add a trigger

By default, triggers are not visible in the state editing menu. In most cases, it is more convenient to replace them with user phrases and events, which show the direction of links between states more clearly.

tip
Prefer triggers if you want to mark some state as global. Dialog transitions to this state will be possible from anywhere in the script, no additional links required.

To add a trigger:

  1. Click  → Add trigger in the top right corner of the state editing menu.
  2. Select a trigger type: By intent or By event.
  3. Configure and save the block.
Intent setup
Event setup

Settings

For all triggers, you can configure the following settings:

SettingDescription
Global triggerIf the checkbox is active, the state can be triggered in this way from any other state in the script. Disables the other settings.
Expect trigger from stateIf a state is selected from the drop-down list, transitions to the current state can be made only from the selected state and other states in the same group.
Ignore triggers from nested statesIf the checkbox is active, transitions to the current state can be made strictly from the state selected in Expect trigger from state but not from other states in its group.