Execute Cloud Script Action

Use this action to execute standard Javascript code on our cloud side. The Javascript code can contain any construct and will have available all of the conversation objects.

Settings

The action uses the following settings:

Remarks

Xenioo cloud scripting action uses Javascript as a server side scripting language to extend even further your chatbot functions.

The conversation object, injected in every execution, exposes multiple methods that can be used to interact and alter the current conversation results and variables as well as manage database connections.

The Javascript source is evaluated as a single block. You are free to use functions and standard object methods. ECMAScript 3 and ECMAScript 5 functionality, including ES5 strict mode are supported by the current runtime.

A fixed 3 seconds timeout is applied to every script execution. If your script exceeds this time, it will be forcefully terminated. The script has also a 4096 statements execution limit, meaning that a single script execution cannot exceed 4096 statements, loops included.

Legacy Engine mode is offered as a legacy support for the basic Xenioo scripting engine and should not be used unless specifically required. The V2 Native option is pre-selected and should be the go to choice.

Execution Optimization

When using the legacy engine, script execution flow can be automatically optimized by Xenioo by adjusting statements execution. Since the actual flow of your code might be altered by Xenioo (while maintaining the expected results of course) Execution Optimization is optional and can be enabled by the toggle displayed when selecting Legacy Engine mode.

Flow optimization happens automatically with simpler scripts. Scripts containing functions or complex for/while flows must activate the optimization flag.

Execution Optimization flag is not available for V2 Native engine since it has these optimizations built-in and it is going to be faster by default than any optimized legacy script.

Trigger

This action does not trigger any event.

Variables

This action produces the following variables:

After execution, script_result may hold one of the following values:

Availability

Channel specific availability follows the table below:

This action can be used only inside interactions and not as child of other actions. This action requires a Premium Account to be used on a live chatbot.

Last updated