You are reading the documentation for an outdated Corteza release. 2024.9 is the latest stable Corteza release.

Client Scripts

Client scripts are automation scripts executed in the client’s browser (user agent; UA). Client scripts should be used when:

  • interaction with the user is required,

  • response latency should be minimal,

  • execution reliability is not important,

  • we are not working with sensitive information such as authentication tokens or api credentials,

  • automation script produces a light load on system resources.

Example use cases

  • prompt user to confirm form submission,

  • validate or modify form’s data before submission,

  • redirect the user to another page; either in Corteza Low Code or other,

  • open an external resource inside a popup window.

Trigger types

Client scripts support two types of triggers; explicit and implicit.

Explicit

Explicit triggers execute on a specific user invocation, such as a button press. These include:

Manual

Manual automation triggers are defined as buttons inside the user interface. They most commonly appear inside Low Code automation page blocks or inside Low Code record list toolbars. They are invoked and executed inside the web application.

Manual automation triggers don’t need to be defined as client scripts. When defined as a server script it will be invoked from the UA and executed from inside Corredor.

Implicit

Implicit triggers execute as a collateral to another system event such as form submission. These triggers include before/after events. For a full list of available events refer to [ext-resevt].