MaestroThe UI design product. | Form Builder | All versions This feature is related to all versions.
A Maestro business rule is JavaScript code that is invoked by different events occurring in a Maestro form. Business rules have access to some form data and can obtain more information from Journey Manager. Maestro allows you to create and configure business rules to use in your Maestro forms. Business rules can originate from any of the following sources:
When a rule is invoked, its JavaScript code receives parameter objects:
getData
and setData
methods to get and set the form field's data.In addition to the parameters, there is a local 'value' variable that is set to the specific field instance value in the form data object. The 'value' variable is repeat-aware, so it represents either the sole data value, or the indexed data value in a repeat. Changing 'value' does not change the form data object, so it can be considered read-only.
The rule execution context also exposes several other objects which contain API methods you can call. These objects include:
The Maestro Rule Editor provides a quick access to the full method API documentation. Click API Methods as shown below.
To learn how to create a rule, see Creating Rules.
If you experience issues with your created business rules, see debugging business rules.
Maestro comes with several pre-configured business rules types: