Email rules are the rules that are applied to incoming emails as they are received. Rules are based on conditions and actions. If an email meets the pre-determined conditions, apply the pre-determined actions.
You can add as many email rules as you want to, and control the order in which they are applied to incoming emails. Once a rule has been run and its conditions met, you can choose to stop processing any additional rules. This allows rules to be effectively chained.
We suggest that you create a rule for each email account that you have to ensure emails arrive in the correct folder.
For example, you may have the first rule to simply determine the card file to be related to the email, then apply additional rules to apply email tags, then even more rules to create a job, etc.
Typically, you would set up the first two rules, as follows:
Rule 1: Determine CardFile from Email
This rule will apply to all incoming emails, and attempts to match the sender's email address to a card file in Jim2. Once this rule has been processed, the second rule will be executed.
Rule 2: Auto-Add Existing Email Tags
This rule will check if the email is related to an existing Jim2 object (job, quote, etc.) and will apply the tags from any existing emails related to that object. The email is related to the Jim2 object because it has an email token in the subject.
Example Rule: Create Job from Email
This example rule will do the following:
Check that the email was sent to, or via training@, and that it is not related to an existing Jim2 object.
If the above conditions are met, then tag the email as Training. You'll notice that there is one more action to this rule: Create Job, but it is flagged as <Manual>. This means that this action applies to this email but with the intention of not automatically performing this action.
When viewing the email from an email list, it is flagged that there is an outstanding action ( ). The email can then be qualified, eg. this is a support email, then the action manually run, at which point a job is created.
Rule: Process as Order
This function is only available if you are licensed to use eBusiness products.
Email rules includes a Process as Order email action. The purpose of this action is to simplify the processing of incoming CSV or XML orders by making use of the Jim2 incoming email functionality.
The Process as Order email action provides much better control and visibility of email order processing within Jim2.
All existing email conditions and actions apply when using the Process as Order action.
In basic terms, an email with an attached CSV/XML order comes in via email and is processed via email rules. If the email rules conditions are met, the Process as Order email action places the email attachment (eg. CSV/XML order) in the incoming eBusiness queue for processing. Once the CSV/XML order is placed in the incoming B2B queue, the normal Jes CSV/XML order processing then occurs.
Processing of incoming orders in CSV format supports multiple orders in one file. If there is an issue within the file, all contained orders will not be processed.
The mapping name must match the name of a mapping configuration file in the Jes OrderMapFiles directory. Should you require more specific mapping, please contact email@example.com to assist in developing the mapping. CSV date format is only required if the date format in the CSV cannot be parsed by the system default settings.
Rule: Decoded Text
This option allows email actions to be applied to an email’s decoded text within the Email Actions screen. Decoded text is a text version of an email with all HTML markup, etc. stripped out. This greatly simplifies the process of extracting information from an incoming email – looking for a serial number, for example, which typically requires the use of a complex Regular Expression.
By default, Email Rules will always be applied to the decoded text. To use the raw email content, tick Use raw content when entering your Regular Expression.
Existing email rules are not affected by this option, and will continue to use the raw email content unless changed.
The decoded text that the email action will be applied to is available directly from an email within Jim2 by opening the email, selecting Properties, and selecting the Email Body – Text tab.
The Process as Order email action requires Jim2 eBusiness Link for orders to be processed. Should you require this, please email firstname.lastname@example.org
You can have the same source using any number of different templates. Jim2 will then randomly pick a template when sending this type of email.
Email rules Project support (only applies if you are licensed to use Projects):