Extensions

JavaScript Extensions

Agillic’s JavaScript Extensions are a way to program certain custom operations into your Agillic instance. There are different Extension Types providing varying functionality in several areas of Agillic.

With JavaScript Extensions, you can for example:

  • Read, modify, and write Person Data and One-to-many Table rows for segments of your recipients in a flow Extension Step.
  • Filter recipients based on their data using code, by building a custom Condition Extension.
  • Utilize a growing list of helpers, to easily make http calls to external systems, do date operations, and much more.
  • Send data to an Agillic’s Extension API in any format, and define how to write it into your Agillic Database in an HTTP Extension. This can simplify many operations that may otherwise take several API calls to achieve.
  • Raise alarms or notify stakeholders, if there is irregular data flow, communication send outs, etc., by parsing activity logs in a Monitor Extension.

This documentation provides you with the information needed to write and run your first tests (see Local Environment), and eventually deploy to an Agillic instance.

We are using the javax.scripting library in Java to provide the bridge between the JavaScript file and Agillic. This means that the JavaScript file is executed inside our Java application. Note that features available in ES6 or later are not supported.

When not to use an extension

Remember that most extensions are recipient-centric (Monitor Extensions are the exception, as they are instance-centric). So if you need to do something once per day (like re-calculating a Global Data), it’s a bad idea to use an extension.

Extensions should always be a last resort to achieve a use case, as standard Agillic features might already support the operation you are attempting. So make sure to first search in our Knowledge Base, or contact Agillic Support.