User phrases and events
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.
User phrases (intents)
An intent is a set of phrases which are similar in meaning and express some user intention. For example, phrases like Hello, Good day, and their synonyms an all be recognized with the Greeting system intent.
To add an intent to a state, go to the state editing menu, find User phrases and events, and select User phrase. Alternatively, you can select Add phrase at the bottom of the state on the canvas.
On the User phrase tab, you can:
- Create an intent:
-
Select among existing custom and system intents. System intents are marked with the special icon.
tipThe button will take you to the Intent selection window. Here you can view all project intents (except for those from knowledge base) and edit them. -
Fill the intent with training phrases. To do this, choose the desired intent in the state editing menu and select Add alternative examples.
-
Choose where the bot should go when the intent is triggered:
- To a new state — a new state and a link leading to it from the current intent will appear on the canvas.
- To an existing state — a link leading from the current intent to an existing state will be created on the canvas.
Events
An event is an action happening in the account, the bot script, or a channel connected to the project, which the bot can react to. JAICP supports a lot of built-in events, for example:
noMatch
— the user request was not recognized.fileEvent
— the user sent the bot a file in the messenger.hangup
— the customer finished the call (this event is specific to the phone channel).
To add an event to a state:
- Go to the state editing menu, find User phrases and events and select Event.
- Select one of the built-in events, or a custom event and enter its name manually.
- Enter the name of a new or existing state where the bot should transition to by this event.
Settings
You can configure the following settings for user phrases and events:
Setting | Description |
---|---|
Go to state The bot should go… | The state where transitions can be made from the current state and other states in the same group. |
Ignore transitions from nested states | If the checkbox is active, transitions to the selected state can be made strictly from the current state but not from others in its group. |