Powered by Algolia

Script concepts

Alan script description

The Alan Voice AI Platform provides a framework for the fast and easy development and deployment of voice experiences on any application. To do so, you’ll write voice scripts using JavaScript within Alan Studio.

The Alan Platform augments standard JavaScript with lots of predefined functions and other functionality needed to create visual voice experiences:

Multiple scripts in the project

User can add as many scripts to the project as he needs. If there are several scripts they are loaded in order of their placement in the script panel. Upper scripts are loaded first. We introduced special global object project which has project scope and accessible from any script of the project. It makes any variable defined in the object project to be available in other scripts that are below. This can be helpful if you want to split complex script in parts and separate config and data structure from util functions and project logic. It lets you make project more clean and easy to support.

If we have two scripts, for example, script1 followed by script2 and in script1 we define project.config = {initValue: 1} then you can use project.config in script2 as already existing and defined variable.

project.config = {initValue: 1}