When building a lead assignment rule with more than one filter, you might add filters with both AND and OR between them. In those situations, you'll need to use the Filter Logic field to make sure your rule matches the right leads.
Let's look at an example of how to use filter logic:
We have two salespeople on our sales team, Ray Tomlinson and Alex Bell, who deal with leads from the states of Massachusetts and Rhode Island. Ray handles leads via email, and Alex reaches out to leads by phone. When leads have both a phone number and an email address, they are to be distributed to Ray and Alex in a turn-based, round-robin fashion.
As we build our lead assignment rule, we'd use these filters:
1. Phone is not empty
2. Email is not empty
3. State/Province = RI
4. State/Province = MA
The problem here is that the last OR will capture all the leads from Massachusetts, whether they have email addresses and phone numbers or not, which is not what we want. With filter logic, we can get different results by grouping (or "nesting") the filters.
Applying filter logic in your assignment rule
- We add filters to our criteria as we set up a new rule. Notice that the filters are numbered on the left. We'll use these numbers in the Filter Logic formula bar.
- Click the Add Filter Logic link. This will display the formula bar.
- Edit the logic by adding parentheses or changing the operators. In this case, we'll add parentheses around the first two arguments, changing "1 OR 2 AND 3 AND 4" to "(1 OR 2) AND 3 AND 4" to find the right matches.
- Click the Save Criteria button to save your changes.
- We can now continue with setting up this set of criteria and assigning it to both Alex and Ray.
Now, when we receive leads from either state (MA OR RI) that include both a phone number and an email address (AND Email AND Phone), the first will be assigned to Alex, the second to Ray, the third to Alex, and so on.
As you add more filters to your criteria, your formulas can become even more complex. Rule criteria with five filters can have many different combinations, depending on where you add parentheses:
(1 AND 2) OR (3 AND 4) OR 5
1 AND ((2 AND 3) OR 4 OR 5)
((1 AND 2) OR (3 OR 4)) AND 5
Placing parentheses within parentheses is called nesting. The important thing to remember with nesting is that Insightly will process the arguments in the innermost parentheses first and work outward.
As you enter more complex filter logic, examine the formula one step at a time, verifying each argument within a set of parentheses.