This is a CRMScript you can add under the menu System design in the screen System Script.
Here you can add CRMScript code that will be run for all mailboxes before the mail is taken by any mail filter, and also before it is saved.
There are several variables available in this context.
- To get a variable:
getVariable("xxx")
- To set a variable:
setVariable("xxx", <value>), where <value> is a valid value for the field you are trying to set.
Here follows a list of all available variables that are possible to modify.
Read-only variables
If you load a ticket object with the given ticket ID, it is not recommended to change the values of this ticket. Later the ticket will be saved, and the values you have saved on the ticket might be overwritten. Thereby you should only modify the variables listed above.
Example
This script will generate a new request if the incoming email is originally supposed to be connected to an existing request. The script will tell the email engine to generate a new request only if the original request is closed.