Dialog script concepts¶
The design of a conversion flow starts with creating a dialog script in Alan AI Studio. In the dialog script, you implement the logic for your assistant: cover all conversational turns that the user should be able to follow and requests that the virtual assistant must handle.
The number of dialog scripts in the virtual assistant project is determined by the project’s size and complexity. A single dialog script may be enough for a simple virtual assistant. If you create a more complex assistant, you may want to split its code into multiple scripts for better organization. Scripts in such projects are executed in the order they appear in the script panel in Alan AI Studio, up to bottom.
Dialog scripts are written in JavaScript. Alan AI supports standard JavaScript and augments it with its own predefined functions and objects. This enables dialog script developers to support any app scenario or workflow and create unique conversational experiences.
You can use the following functionality and tools for dialog script design:
Learn how to match the user’s input to intents and provide responses
Learn how to define request and response phrases
Learn how to pick out important information from the user’s input
Learn how to design a multi-branched conversation flow
Learn how to add a conversational experience on top of existing text content
Learn how to use popular JavaScript libraries in the dialog script
Learn what predefined objects Alan AI exposes
Learn how to use the visual state to pass the information about the current visual context
Learn how to use Alan AI’s project API functionality to pass information and trigger activities
Learn how to gracefully handle errors in the dialog
Learn how to use callbacks as the dialog transitions between states
Learn how to display popups to engage the user to interact with the virtual assistant
Learn how to listen to events driven by the user’s interaction with the virtual assistant
Learn how to get general information about the user
Get reference information about all Alan AI’s functions and objects