Guide to rule triggers, conditions, and actions

Edited

Overview

Front's rules are made up of three components:

  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

This article provides a description of each When trigger, If condition, and Then action offered in Front's rule engine. There are additional specialized rules found in the rule library with pre-set formatting depending on the rule.

For more general information about how rules work, see Understanding rules.


Trigger events

The When section contains triggering events that will cause Front to start evaluating the conditions of your rule and see if they are met.

When - Message

  • Inbound message is received: A new message arrives, either a brand new conversation or within an existing thread.

  • Inbound message is received (new conversation): A new message is received in a brand new conversation.

  • Conversation is moved: A conversation is moved from one shared inbox to another shared inbox within the same workspace.

  • Outbound message is sent (new conversation): The first outgoing message in a new thread is sent (not a reply in an existing conversation).

  • Outbound reply is sent (existing conversation): A reply is sent in an existing thread.

  • Message delivery fails: A message fails to be delivered.

When - Status

  • Conversation is archived: A conversation is archived.

  • Conversation is reopened: A conversation is un-archived.

  • Conversation is deleted: A conversation is deleted. Also applies to conversations marked as spam.

  • Conversation is restored: A conversation is restored from the trash.

  • Conversation is snoozed: A conversation is snoozed.

  • Snooze expires: When a snooze expires and conversation is reopened.

  • Ticket status is changed to: Conversation is set to one of the selected ticket statuses.

When - Teammates

  • New comment is added*: An internal comment is posted in a conversation, excluding internal discussions (updating an existing comment does not count). You can optionally input the comment author and the comment body content.

  • New comment mentions teammate*: When one or more teammates are @mentioned in a comment. Select who the teammates are.

  • Assignee changes*: A conversation is assigned or re-assigned to a teammate.

  • Assignee is removed: A teammate is unassigned from a conversation.

When - Tags

  • Tag is added: A conversation is tagged.

  • Tag is removed: A tag is removed from a conversation.

When - Application object

When - Conversation custom field

When - Conversation stages

⚠️ This is a legacy feature. This rule trigger cannot be added to rules as of Oct 2024. Existing rules using this trigger are not affected.

  • Conversation stage is marked as*: A conversation is marked with the selected conversation stage.


Filter conditions

The If section contains the conditions you've set that must exist in order for the actions to run.

If - Dynamic variables

  • Dynamic variable contains†: Create a condition based on the Smart Rule's dynamic variable. You can test its content or confirm if the variable has a defined value when your rule executes.

If - Status

  • Conversation is currently archived: Conversation is in an archived state.

  • Conversation is currently snoozed: Conversation is in a snoozed state.

  • Conversation is currently open: Conversation is in an open state.

  • Ticket status is: Conversation has the selected ticket status(es).

  • Ticket status is not: Conversation does not have the selected ticket status(es).

If - Inbox

  • Conversation is in specific inboxes: Check off the inboxes the rule should apply to, or choose Any inbox at the top.

  • Conversation comes from specific channels: Check off channels the rule should apply to.

    • This condition works on the whole conversation, so once a specified channel is associated with the conversation at any point, this condition will be true for the conversation moving forward.

If - Recipient

  • From field contains: Specific requirements of the text in the From field, which has sub-filters.

  • To field contains: Specific requirements of the text in the To field, which has sub-filters.

  • Cc field contains: Specific requirements of the text in the Cc field, which has sub-filters.

  • Bcc field contains: Specific requirements of the text in the Bcc field, which has sub-filters. Should be used with outbound messages.

  • To or Cc field contains: Specific requirements for either the To or the Cc field, which has sub-filters.

  • Any recipient field contains: Specific requirements of the text in any of the From, To, Cc, Bcc fields, which has sub-filters.

If - Contact

  • Contact is in list: Choose the contact list that the contact is in.

  • Contact is not in list: Choose the contact list that the contact is not in.

  • Contact custom field contains*: Define criteria based on any custom contact fields.

If - Tags

  • Conversation has specific tag(s): Conversation already has the chosen tag(s).

  • Conversation doesn't have specific tag(s): Conversation does not have the chosen tag(s).

  • Conversation has no tags: Conversation has no tags at all.

If - Content

  • Conversation subject contains: Specific requirements of the text in the conversation subject line, which has sub-filters. Only applies to conversation subjects that are not automatically generated by Front.

  • Email headers contain: Specific requirements for certain text or elements that the headers contain, which has sub-filters.

  • Message body contains: Specific requirements of the text in the conversation body, which has sub-filters. You can also click the dropdown arrow on the top right to optionally choose whether you want the rule to Include past email history, which refers to whether you want the rule to scan the past email history of the thread when there is a new inbound and/or outbound message.

  • Message HTML body contains*: Specific requirements of the HTML text in the conversation body, which has sub-filters. For inbound direction messages, the condition works for the message body and signature. For outbound direction messages, it applies only for the message body and not the signature.

  • Message language is: Language of the conversation body. If the text is too short or contains multiple languages, Front's language detector will not detect the language. There is a threshold of 25% detection for the condition to be considered true. See here for a list of supported languages.

  • Message has attachments: Conversation has attachments.

  • Message has no attachments: Conversation does not have attachments.

  • Attachment file name contains: Specific requirements of the text in the attachment file name, which has sub-filters.

  • Message attachment extension is: Choose the extension type(s) for attachments in the conversation. e.g. PDF, CSV, etc. Custom extensions are supported.

  • Front Chat visitor URL contains*: Visitor URL associated with each message the visitor sends through the Front Chat widget.

  • Conversation custom field contains*: Define criteria based on any custom conversation fields.

If - Message

  • Message type is*: Filter the type of message, options being Email, Tweet, Retweet, Direct Message, SMS, Facebook, Front Chat, Intercom, Yalo/WhatsApp.

  • Message direction is*: Choose whether conversation is inbound or outbound direction.

If - Time

  • Oldest message is unreplied after*: Set the amount of time that the message (inbound or outbound) is unreplied, options being hours or minutes.

  • Conversation is unassigned and open after*: Set the amount of time that the message (inbound or outbound) is unassigned, options being hours or minutes.

  • Time passed since trigger is*: Set amount of time to pass after the trigger, before the action will run, options being hours or minutes. This condition will work with any trigger.

  • Time is within business hours*: Compares time to the workspace's business hours as defined in Analytics, or shared inbox business hours as defined in inbox settings.

  • Time is outside business hours*: Compares time to the workspace's business hours as defined in Analytics, or shared inbox business hours as defined in inbox settings.

  • Time is between: Define the time frame and choose the time zone.

  • Date is: Choose the specific calendar date(s) you want the rule to apply to and choose the time zone.

  • Day of the week is: Choose the day(s) of the week you want the rule to apply to and choose the time zone.

If - Teammates

  • Assignee is*: Conversation is assigned to one of the people listed.

  • Assignee is not*: Conversation is currently assigned, but the assignee is not one of the teammates listed.

  • Conversation is unassigned: Conversation is in an unassigned state.

If - Account


Resulting actions

The Then section contains the list of actions that will result when all conditions are met.

Then - Teammates

  • Assign to teammates: Assign conversation to a specific teammate or assign to a group of teammates. If you select more than one teammate, a new sub-menu will show to choose the assignment- round-robin*, or load balancing*.

    • There is a gray dropdown arrow to the right to optionally select two settings: 1. Assign even if teammate does not have access to the conversation - the rule will assign the conversation to the listed teammates even if the teammates do not have access to the inbox. If you check this box, then rules set up for your personal inbox will automatically archive your copy after it assigns the personal conversation to a teammate. 2. Replace current assignee (if any) - if the conversation is currently assigned to someone, the rule will re-assign to the teammate in the rule.

    • Conversations will not be assigned to a teammate who currently has their status set to Busy or Out of office, or teammates who do not already have access to that conversation.

  • Unassign: Unassign the conversation.

  • Notify teammates: This will show the conversation in their Shared with me section. You have the option here whether to notify the teammates if they are out of office. Notifying teammates who didn't have access to the conversation will grant them access. 

  • Notify assignee (if any): This will notify the teammate assigned to the conversation, and bump the conversation up in their Assigned to me folder.

  • Archive for specific teammates: Archive the conversation in the individual inboxes of the selected teammates. Doesn't apply if the selected teammate is the assignee.

Then - Status

  • Archive conversation: Archive the conversation.

  • Reopen conversation: Unarchive the conversation.

  • Delete conversation: Move the conversation to Trash. Note: you cannot set a rule to permanently delete messages automatically.

  • Update custom field value*: Update an existing custom field value to the value specified in the rule.

  • Update conversation subject*: Update an existing conversation subject to the value specified in the rule.

  • Update ticket status to: Add the selected ticket status to the conversation. Only one status can be selected.

Then - Organization

  • Add tags: Add specific tag(s).

  • Remove tag: Remove specific tag(s).

  • Move to inbox: Move conversation to a specific inbox.

    • Includes option to choose to Trigger automated rules if moved to another workspace. Note that moving a conversation to a different inbox breaks the sync between Front and Google/Office 365 for that conversation.

    • Restrict participants means that after the conversation is moved, only the assignees and followers with access to the destination inbox will be kept as participants. Keep participants means that all assignees and followers will be kept after the move, even if they do not have access to the destination inbox.

  • Add app objects*: Add application objects to conversations using the selected applications.

  • Add links*: Attach links to the conversation, which will be visible at the top of the conversation where tags are. Requires a valid URL type or URL list.

Then - Message

  • Reply using message template: Reply with a specific message template, either Once or Always. If the conversation already has an outbound message, an outbound reply, or more than one inbound message in it, reply Once will not send anything.

  • Create draft*: Create a shared draft with a specific message template, unless a shared draft already exists. Teammates can modify the draft before sending a reply.

  • Forward: Forward the email to other addresses. Only for email conversations. Will not send to the recipient if they were one of the original receivers of the email.

  • Move message to a new conversation*: Move the newest message in a conversation into a brand new conversation. See this article to learn more.

Then - Comment

  • Add comment*: Post an internal comment on the conversation. The comment body can also contain @mentions. To automatically pin the comments posted by this rule, click the down arrow above the Body field, and select Pin comment.

  • Add comment to debug dynamic variables†: Log value of dynamic variables at the moment your rule was executed, useful for debugging your rules.

Then - Contacts

  • Add contact to list: Add the contact to specific contact lists.

  • Assign based on contact custom field*: Choose from one of the contact fields for this contact.

  • Remove contact from list: Remove the contact from specific contact lists.

Then - Account

  • Assign based on account custom field*: Assign conversations based on a Teammate custom field on the account.

  • Notify based on account custom field*: Notify a teammate based on a Teammate custom field on the account.

Then - Third party

  • Send app request†: Trigger application requests to retrieve data, send data, and take action in third-party systems.

  • Log message in HubSpot*: Log the message to the contact in HubSpot if the contact exists.

  • Trigger in PagerDuty: Trigger an alert in PagerDuty.

  • Create activity in Pipedrive*: Add content of the message as a new activity for the contact, if the contact exists.

  • Create lead in Salesforce*: Create lead in Salesforce if it does not exist already. Only works in channels that use email or phone contacts. No owner is assigned to the lead.

  • Send Task to Salesforce*: Create task in Salesforce. If no contact or lead can be found in Salesforce, no activity will be logged.

  • Send Email to Salesforce*: Log message as an activity in Salesforce.

    • If the message was sent by a Front teammate that is a Salesforce user, they will become the owner of the activity.

    • In a case where Front cannot attribute an outbound message to a teammate with a Salesforce account, Front will default to the admin who enabled the Salesforce integration.

    • If no contact or lead can be found in Salesforce, no activity will be logged.

  • Send to Slack: Send the message to a specific Slack channel or user.

  • Send to a webhook*: Send the message to your webhook URL.

  • Send to Zapier*: Send the information to Zapier.

Stop processing other rules

The rule engine runs sequentially by default, meaning that the rule actions in one rule can trigger subsequent rules to run more actions. You have the option to check off Stop processing other rules if you don't want this to happen.


FAQ

What are sub-filters in the If - Recipient filters?

The If - Recipient filters has these sub-filters: 

You can use a semicolon (;) as an or separator to list several items. For example: Isn't in domain "domain.com; anotherdomain.com" - this will be true if at least one recipient is not from domain.com or anotherdomain.com. For any Domain filters, do not add the @ symbol before the domain, as the Domain filter includes the symbol by default.

What are sub-filters in the If - Content filters?

The If - Content filters has these sub-filters: 

The filters below have some specific behaviors:

  • Contains: Includes partial matches, such as using Contains: order will match on the word reorder. If you only want to match order, use the Contains specific keywords selection. It also includes all punctuation you enter into the rule text.

  • Contains specific keywords: Matches full words or phrases. Partial words will not match. It ignores punctuation of these specific characters:

  • Contains and Contains specific keywords: Not case-sensitive and reads consecutive multiple spaces as a single space.

  • Starts with and Ends with: Behaves exactly like Contains, except they only match for the beginning or end of the text.

  • The text that you enter in any of the If - Content filters should not be in quotes. 

Subject, Header, and Body conditions only: Clicking the down-facing arrow will reveal the Case-sensitive checkbox. Check this box for your rule to trigger when the case sensitivity in the message's content matches how it is entered in this rule condition.

Below is a chart of examples for the Contains vs. Contains specific keywords filters:

How do the And/Or filters work?

You are able to create conditions using And and Or types. Using And will require all the listed conditions to be true in order for the rule to take action. Using Or will require only one of those conditions to be true. You can also use a combination of these two types. More on how to use And/Or statements can be found in this article.

How do I list multiple keywords within an If filter?

Some conditions allow you to type in your own text for the condition (such as Subject, Body, To, From), and you can actually list multiple keywords within one condition if these options are all Or type. You would simply separate the words with a semicolon (;).

For example, if you wanted your condition to be for the Subject to contain the keywords Urgent or SOS; then instead of creating 2 separate Or conditions, you would just create one condition and list the two keywords as:

Should I be using the inbox filter?

A best practice is to always specify an inbox using the Conversation is in specific inboxes filter, unless the rule truly needs to apply to all inboxes (both individual and shared inboxes). The difference between this filter and the Conversation is in specific channels filter is that the channels filter can apply on any inbox containing messages from the channel, which can happen if conversations are moved away from the channel's default inbox. Specifying an inbox filter ensures the rule only affects that specific inbox.

Is there a difference between conversations vs. messages?

Some rule triggers and conditions apply to the whole conversation, and some apply to a specific message within the conversation. For example, the From condition applies to a specific message, and not the thread as a whole where the sender may change from message to message. Likewise, a tag can only apply to the whole conversation, and not an individual message.

Here are some specific cases:

Rule #1

  • When: Tag is added

  • If: To contains @company.com

  • Then: Assign to Andersen

This rule will check the To recipient of the last message in the tagged conversation.

Rule #2

  • When: Snoozed expired

  • If: Body contains example

  • Then: Move the conversation

This rule will check the body of the last message for the word example.

Rule #3

  • When: Inbound message is received

  • If: Subject contains Urgent

  • Then: Add tag Urgent

This rule will add the tag to the whole conversation, as tags cannot be added to individual messages.

Which languages are supported in the Message language is condition?

The Message language is condition supports the following languages:

  • Arabic

  • Danish

  • Dutch

  • English

  • Finnish

  • French

  • German

  • Hungarian

  • Italian

  • Norwegian

  • Polish

  • Portuguese

  • Russian

  • Spanish

  • Swedish

  • Ukrainian


Pricing

Rules are available on all plans. See additional details about pricing of certain rule features below:

* Asterisks denote features available on the Growth plan or above.

† Dagger symbols denote features available on the Scale plan or above.

If you are on a legacy plan and don't have access to specific features, you can update to one of our latest plans in your Billing settings or contact your account manager.