Skip to content
v2.7 (latest)
Mark a Ruleset as a Library and install it in other rulesets to share functions, constants, and entities.

Use a Ruleset as a Library ​

This guide explains how to mark a ruleset as a Library and how to install it in other rulesets. A Library makes all its components - functions, constants, and entities - available to any ruleset that installs it.

Mark a ruleset as a Library ​

  1. Open the Ruleset you want to use as a Library.
  2. Click Version settings in the left menu.
  3. Enable Library.
    ↳ The Ruleset is now available as a Library for other rulesets to install.

Install a Library in a ruleset ​

  1. Open the Ruleset in which you want to use the Library.
  2. Click Libraries in the left menu.
    ↳ The Libraries page opens with a Browse tab showing all available Library rulesets.
  3. Click the library ruleset you want to install.
  4. In the Version list, select the version you want to use.
  5. Click Install.
    ↳ The library appears in the Referenced tab. All functions, constants, and entities from the library are now available in this ruleset.

Set an Alias ​

After installing a Library, you can give it an Alias. The Alias is a prefix you use to call library components in rules and functions. Using an alias makes it explicit which ruleset a component comes from - especially useful when multiple libraries are installed.

  1. Click the Referenced tab on the Libraries page.

  2. In the Alias field next to the Library, enter a name.
    ↳ You can now use the alias as a prefix in rules and functions:

    javascript
    Alias.MyFunction(param)
    Alias.MY_CONSTANT

Uninstall a library ​

  1. Click the Referenced tab on the Libraries page.
  2. Click Uninstall next to the library you want to remove.

Additional resources ​