AND/OR rule conditions in rules


Front's rule engine allows you to create rules using AND/OR statements. With this capability, you're able to create complex workflows within a single rule, making it easier to manage moving forward.

How it works

There are three main components when creating a rule:

  1. Triggers (When): events that cause a rule to start scanning for the conditions

  2. Conditions (If): criteria that needs to exist in order for the rule to run the actions

  3. Actions (Then): resulting actions that occur from the rule once conditions are met

See this article to learn more. AND/OR statements are a feature of the filter conditions (if) component.

A trick to understanding how the filter component works is by thinking about it as building blocks. When you add a filter condition, you can either add that condition to an existing block or create a new block. Conditions within the same block are treated with 'OR' logic. We then use 'AND' logic between filter blocks.

Looking at the example below, you can see that in order for this rule to be executed the conversation needs to be in inbox Support AND have either tag After hours OR tag Top 100.

Delayed-rule method to use AND/OR conditions

Many customers want to send an "offline hours" message template during specific hours throughout the week. With AND/OR conditions, you can do this!

Look at the rule below- you'll see that this rule will trigger IF the conversation appears in the Support inbox AND the day is Monday-Friday AND the time is between 5:00 PM - 11:59 PM (after hours of operation) OR 12:00 AM - 8:00 AM (before hours of operation). Both the inbox and day of the week requirement must be met for the rule to trigger, along with one of the specified time periods.

Exclusionary rule conditions

There is a specific structure for setting up a rule to trigger when certain elements are not in the messages. For example, you want to assign all inbound messages to a specific teammate, except for messages containing specific subjects. In this case, you’ll want to use Doesn't contain rule conditions. For a full list of rule conditions, including exclusionary conditions, see this guide.

In order to use exclusionary rule conditions:

  • Use the AND condition.

  • If you have multiple items you want to exclude using the same condition, use semicolons to separate phrases within the same AND condition. See the examples below.

Let’s say you wanted your teammate Anthony to get assigned all messages except for those with Bluth’s Frozen Banana or Stair Car in the subject line.

You would create a rule that looks like the following:

Now, let’s say you want to get more specific and add an additional condition: Anthony should not be assigned messages that have either the subject Bluth’s Frozen Banana or Stair Car, and the word Illusions in the body of the email. In this case, you would need to add a separate AND condition:

Note: Using the OR condition in tandem with Doesn't contain will cause the universe to implode (not really, but your rule won’t work. Trust us on this one).


Rules are available on all plans. See this article to review triggers, conditions, and actions included in each plan.