Email Rule Configuration
Estimated reading: 2 minutes
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
FIELD | SIGNIFIED |
Name | Rule name. Descriptive field with which the rules will be displayed in the system. |
Priority | Priority assigned to the rule. The higher its value the sooner it is evaluated in the applicable rule queue. |
Mailbox | Mailbox for which the rule must be applied. |
Apply On | Select which allows you to specify when a rule is to be applied: Always, On Create, On Update. |
Status | The status (enabled/disabled). If “Disabled” the rule will not be active. |
Email Message Filter | In 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 values | In 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 Alias | This 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 values | In 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. |