v2.7 (latest)
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 ​
- Open the Ruleset you want to use as a Library.
- Click Version settings in the left menu.
- Enable Library.
↳ The Ruleset is now available as a Library for other rulesets to install.
Install a Library in a ruleset ​
- Open the Ruleset in which you want to use the Library.
- Click Libraries in the left menu.
↳ The Libraries page opens with a Browse tab showing all available Library rulesets. - Click the library ruleset you want to install.
- In the Version list, select the version you want to use.
- 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.
Click the Referenced tab on the Libraries page.
In the Alias field next to the Library, enter a name.
↳ You can now use the alias as a prefix in rules and functions:javascriptAlias.MyFunction(param) Alias.MY_CONSTANT
Uninstall a library ​
- Click the Referenced tab on the Libraries page.
- Click Uninstall next to the library you want to remove.