Skip to main content

Custom trigger module

To trigger a custom JavaScript event from your dialogue, add Custom Trigger module from the Extension Modules menu.

img/custom-trigger.png

Specify the name that you can use further in JavaScript code.

In your application code, listen to scena-trigger event to catch the event as it happens:

window.scena = window.scena || [];
window.scena.push({ type: "trigger", callback: function(name) {
console.log(name);
}});

e.name will contain value a of the specified scena.ai trigger name.