Skip to main content

J‑Graph compatibility with JAICP DSL

Basic J‑Graph concepts such as states, themes, and blocks, all correspond to constructs of JAICP DSL — the language used for JAICP bot script development.

tip
J‑Graph is fully compatible with the source code editor. All changes made in J‑Graph are saved automatically as code, and vice versa: all changes to the code are immediately shown on the canvas.

J‑Graph and JAICP DSL compatibility allows for efficient collaboration between different team members involved in developing conversational AI solutions:

  • Conversational UI designers can design a script prototype in the visual editor before passing it on to the development team.
  • Developers tasked with this project won’t be starting from scratch: J‑Graph has already generated a large portion of the code for them.

States

In JAICP DSL, states correspond to the state tag. State groups correspond to nested states. For example, the following script fragment opened in J‑Graph corresponds to the following code structure:

State group

theme: /

state: Symptoms

state: Positive
# ...

state: Negative
# ...

state: Unrecognized
# ...

Themes

Themes in J‑Graph correspond to the theme tag. Root theme corresponds to the / theme.

If you create a new theme in J‑Graph, a .sc file with the theme name will be added to the src/themes directory. The theme will be declared in this file. The file will be automatically connected to the main file of the script using require.

When you delete a theme in J‑Graph:

  • The theme and its states will be deleted from all project files.
  • If a file contains only this theme, the file will be deleted.

Blocks

All blocks in J‑Graph correspond to JAICP DSL tags, and their settings correspond to tag parameters. Refer to the documentation on the relevant tag to better understand how any given block works.

User phrases and events

J‑GraphJAICP DSL
User phrase (intent) blockintent tag
Event blockevent tag
Pattern blockq tag
Go to state field (for events and patterns)
The bot should go… field (for intents)
toState parameter
Ignore transitions from nested states checkboxonlyThisState parameter

Triggers

J‑GraphJAICP DSL
User phrase (intent) blockintent or intent! tag
Event blockevent or event! tag
Pattern blockq or q! tag
Global trigger checkboxIf enabled, the global tag is used
Expect trigger from state fieldfromState parameter
Ignore triggers from nested states checkboxonlyThisState parameter

Reactions

J‑Graph blockJAICP DSL tag
Texta
Imageimage
Audioaudio
Conditionif
elseif
else
Random answerrandom
Button groupbuttons
inlineButtons (if the button press reaction is Go to link)
Transitiongo (if the transition is deferred)
go! (if the transition is immediate)
Codescript

Actions

J‑Graph blockJAICP DSL tag
Actions with Google SheetsGoogleSheets
End sessionEndSession
HTTP requestHttpRequest
Request confirmationConfirmation
Request fileInputFile
Request numberInputNumber
Request phone numberInputPhoneNumber
Request textInputText
Send emailEmail
Send SMSSms
Telegram paymentTelegramPayment
Transfer call to agentTransferCallToOperator
Transfer chat to agentTransferToOperator