Overlapping rules for processing emails
If an email sent to a Planfix email address meets the trigger conditions for multiple rules for processing emails, the following algorithm for processing will be applied:
- infoblocks from all the rules are created and populated with data;
- the object specified in the main operation of the last rule is created;
- additional operations from all the rules are performed on the object, if possible.
What are overlapping rules used for?
Originally, overlapping rules were used fairly often, because rules used to have a very simple structure. Rules look quite different now than they used to, so we don't typically recommend using overlapping rules anymore. Maintaining a set of rules to be applied to an email is much more difficult than having one all-inclusive rule to manage. Here's an example of a situation where overlapping rules could make sense:
- Let's say that emails are sent to Planfix, each of which may contain different sets of parameters. These could be emails that are manually forwarded to Planfix with labels added to the subject line to allocate tasks to different assignees, projects, etc.
- Here's an example of a subject line of a forwarded email: Fw: Subscription request #Smith $Client requests, where #Smith is an instruction to add the employee with the last name Smith as the assignee, and $Client requests is an instruction to put the task in the "Client requests" project.
- To implement this processing, two separate rules are added to the list of rules for the receiving email address, each of which implements one instruction: the first rule gets the assignee according to the # label, and the second gets the project according to the $ label.
- The trigger conditions of these rules are deliberately built in such a way that emails sent to this email address meet each of them.
- When emails are processed, they are run through all the rules sequentially, and the system accumulates a set of parameters that should be applied to the task created by the email.
- This approach allows you to add separate, relatively simple rules/instructions, view them in a list, edit them, and/or add more as needed.
The algorithm for overlapping rules works for these cases. Attempting to use overlapping rules in other situations, including combining rules for one email (creating tasks, adding comments, and creating contacts) is considered incorrect usage of the system. These attempts are not guaranteed to yield the desired effects.
Settings that affect rule overlapping
- In the lower part of the window for creating rules for processing emails, there's a checkbox for Use only this rule without overlapping others:
If this checkbox is checked, overlapping rules will not be used, and only this rule will be applied to the email. If the email meets the conditions of multiple rules with checkmarks, the first rule will be applied.
- When "Create task using template" is selected in the main operation of the rule, there is an option called Do not use this template with overlapping rules:
If this checkbox is checked, the template from another rule will be used to create the task if there are overlapping rules.