Email Rule Configuration

To configure an Email Rule go the Rule Email->Tools->System section.

Click on a rule already defined (in grid) or the ‘+Add Rule‘ button.

At this point the configuration form will be displayed.

The form fields have the following meaning

FIELDSIGNIFIED
NameRule name. Descriptive field with which the rules will be displayed in the system.
PriorityPriority assigned to the rule. The higher its value the sooner it is evaluated in the applicable rule queue.
MailboxMailbox for which the rule must be applied.
Apply OnSelect which allows you to specify when a rule is to be applied: Always, On Create, On Update.
StatusThe status (enabled/disabled). If “Disabled” the rule will not be active.
Email Message FilterIn this field, through the query builder or by entering PHP code in the scripting area, you can specify the conditions that the incoming message must meet. If the conditions are met the rule is executed.
Set main model valuesIn this field, through the query builder or by inserting PHP code in the scripting area, it is possible to specify how the fields of the main template (defined in the mailbox configuration) should be valued when the rule is executed.
Related Model AliasThis field, if filled, defines the model of the “weak” entities to put in relationship with the main model. A typical case of use is in the ‘On Update’ events, when a new message doesn’t have to create an operation but a comment related to the existing one.
Set related model valuesIn this field, through the query builder or by inserting PHP code in the scripting area, you can specify how the fields of the related model should be valued.