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