- 01 Feb 2023
- 12 Minutes To Read
What are Rules and Its Components?
- Updated On 01 Feb 2023
- 12 Minutes To Read
Rules can help you manage and automate frequent activities by triggering a response or action when a Conversation meets just the right conditions.
With Rules, you can:
- Send an auto-reply to Customers whenever an email comes in.
- Add Topic(s) to a Conversation.
- Route a message with the word "Returns" to a specific Inbox.
- Reassign a Conversation or Task that has become overdue
- + more!
Rules allow you to automate manual processes for your team and help your team be extra efficient. With the time you save, you can focus more on making your Customers happy.
Components of a Rule
There are three main components to a Rule:
Rules are executed When a defined Trigger is detected, And Condition(s) are met, Then Actions are taken, which complete a Rule.
Trigger is an event that sets the wheels in motion for a Rule. Each Trigger may have additional qualifiers that need to be selected.
The following Triggers and qualifiers are available to use in Rules:
|Agent status changes to||Away, Offline||When the Agent who is currently assigned the Conversation goes Away or logs out, including when this happens because the Agent has been idle.|
|Assigned Task due date is||Due in X minutes, Overdue, Overdue by X minutes||When a Task assigned to an Agent passes a certain threshold relative to the due date, Administrators can set that threshold to be before or after the due date, depending on your goals. This Trigger is re-evaluated every minute.|
|Conversation due date is||Due in X minutes, Overdue, Overdue by X minutes||When a Conversation passes a certain threshold relative to the due date—Administrators can set that threshold to be before or after the due date, depending on your goals. This Trigger is re-evaluated every minute. The due date is determined by the SLA.|
|Communication is received||n/a||Whenever a call or message is received from a Customer or 3rd party, regardless of Channel.|
|Topics added||n/a||When a Topic or set of Topics is added to the Conversation.|
|Answer used||n/a||When a message is sent using an Answer.|
Condition narrows down the set of Triggered events that the Rule will act on. A Rule can have no Conditions, 1 Condition, or several. Some Conditions are only relevant for specific Triggers, and so the list of options may vary.
The following Conditions are available to use in Rules:
|New Contact||n/a||Refers to whether an inbound message is the first in a Contact.|
|Channel||Chat, Email, Facebook Messenger, Instagram Messaging, Phone Call, SMS, Twitter, Voicemail, WhatsApp||Refers to the Channel of the most recent Customer communication.|
|Channel Type||n/a||Refers to a group of Channels rather than specifying individual Channels. "Messaging" includes Chat, SMS, Facebook Messenger, Twitter, WhatsApp. "Mail" includes Email, and Voicemail.|
|Message From||Contains, Does Not Contain - Any, Only, ReEx||Refers to the person who sent the message. For example, this could be an email address, phone number, or Twitter handle.|
|Message To||Contains, Does Not Contain - Any, Only, RegEx||Refers to the address that received the Message. For emails, this does not include CC'ed or BCC'ed recipients.|
|Message Subject||Contains, Does Not Contain - Any, Only, RegEx||Refers to the subject line of an Email. This Condition does not apply to other channels or Tasks.|
|Message Body||Contains, Does Not Contain - Any, Only, RegEx||Refers to the main content of the message, or in the case of Tasks, the Task's main content. This Condition does not apply to Phone Calls, or Voicemails.|
|Assignment Status||Agent, Inbox||Refers to whether a Conversation is currently assigned to an Inbox (also referred to as "unassigned") or to an Agent.|
|Dedicated Hero||Assigned, Not Assigned||Refers to whether the Customer has a Dedicated Hero assigned or not.|
|Inbox||Includes, Excludes||Refers to the Inbox the Conversation is currently in.|
|Agent Status||Away, Offline||Refers to the status (Away or Logged out) of the Agent who's assigned to the Conversation.|
|Due date||Due In, Overdue, Overdue By||Refers to whether the due date is at or beyond a certain threshold. This applies to both Conversation due dates and Task due dates.|
|Topics||Any Of, All Of|
|Answer||Answer name, Language, Channel||Refers to the Answer used in a message that was sent. At least one qualifier should be selected. For example, you can choose an Answer name without specifying the Language, or vice versa.|
|URL||Contains, Does Not Contain||Refers to the URL where chat was initiated through Sidekick.|
|Proactive Chat||Campaign Selection||Refers to a specific Proactive Chat Campaign.|
|Business Hours||Business Hours Name||Refers to the Business Hours on hours Customers can expect a response.|
|Custom Attributes Number||Tailored to the custom attributes you have set for Customers. If available, these Conditions appear at the bottom of the list of standard Conditions.|
|Custom Attributes Currency||Tailored to the custom attributes you have set for Customers. If available, these Conditions appear at the bottom of the list of standard Conditions.|
|Custom Attributes String|
You can achieve even more granularity in your Rules by adding multiple "And" Conditions. Each Condition you add is a logical "And" statement. For example, if you create a Rule with "Message Subject" and "Channel," the Rule will only execute if both "Message Subject" and "Channel" Conditions are met.
Inclusions and Exclusions
Certain Conditions use "Includes" and "Excludes" as an additional qualifier where "Includes" means the selected items must be met for the Condition to apply. "Excludes" means that the Condition can be fulfilled by excluding any selected items.
"All of" and "Any of"
"All of" means every item specified must be there to qualify (logical "AND"). "Any of" means only one of the items specified needs to be there to qualify (logical "OR").
Some of the Conditions above look for matching text to determine whether the Condition is met. These "text matching" Conditions follow very similar patterns that are helpful to understand.
Whether the content contains or does not contain the provided text allows you to target based on your requirements.
The type of text matching — Any, Only, RegEx, or Words — is an important distinction.
|Match Text Condition||Description|
Note – Watch out for potential implications of using this Condition. For example, if a Rule is configured to move messages that contain "exchange" to a particular Inbox, the word "change" could also trigger the Rule to execute. Think about using Words (more below) to create exact matches of distinctive words you wish to add.
|RegEx||Short for Regular Expression, a form of light coding which lets you match patterns in the text without specifying the entire string. This is particularly useful to distinguish words that can be part of other words, like "log" and "catalog," or to match phrases that may have variable text. For example, by using RegEx, "Happy .* to you!" would be matched to "Happy Birthday to you!", "Happy New Year to you!" and "Happy to send the receipt to you!". |
|Words||Words allow you to create text-matching Rules that look for whole words (or multi-word phrases) that might sometimes be a part of another word. You can provide a comma-separated list of words or multi-word phrases when setting up a Condition. Whatever is placed between the commas (except leading and trailing spaces) will be searched for, but only found if it’s a complete word, and not if it appears within another word.|
- Use commas can separate search terms. This allows you to put multiple search terms in the same Condition. Only 1 match is needed for the Condition to be met because these are treated as logical "OR" statements.
- Search terms can be case-sensitive or not, depending on your selection.
Number Comparison Operators
Some attributes may introduce numerical values as an identifier. And with the use of comparison operators (Between, Equal to, Greater than, Greater or equal, Less than, Less or equal), these numerical values can be used for automation. For example, let's say you have a custom attribute called "Loyalty Points" which is used to track the accumulated lifetime loyalty points of a Customer, and you want to route Customers with 1,000,000 points or more to your VIP Inbox, then the Condition could look like: If Loyalty Points is Greater than or equal to 1,000,000.
Numbers not formatted in this way can still be displayed in the Customer Profile.
|Between||The value received from the attribute is greater than or equal to the first value entered, and less than or equal to the second value entered.|
Enter the lower of the two values in the first entry field, and the higher value in the second field.
|Equal to||The value received from the attribute is equal to the value entered.|
|Greater than||The value received from the attribute is greater than the value entered.|
|Greater or equal||The value received from the attribute is at least equal to or greater than the value entered.|
|Less than||The value received from the attribute is less than the value entered.|
|Less or equal||The value received from the attribute is at least equal or less than the value entered.|
Number and Currency attributes provide the same operators; however, with Currency attributes, you will need to select the currency type expected. Using the currency type selected, Rules will extract either currency symbols or 3-letter ISO codes that appear before the number, which is then evaluated like a number.
For example, if you have a rule that says If Total Spent is greater than 400 USD, these formats of the total spent will succeed: "$500", "USD 500". However, formats with the code or symbol appearing after the number will not succeed: "500 USD", "500 $".
|ISO Code||Currency Name||Symbols Supported|
|AUD||Australian dollar||AUD, A$|
|BRL||Brazilian real||BRL, R$|
|CAD||Canadian dollar||CAD, CA$|
|CNY||Chinese yuan||CNY, CN¥|
|GBP||Pound sterling||GBP, £|
|HKD||Hong Kong dollar||HKD, HK$|
|INR||Indian rupee||INR, ₹|
|JPY||Japanese yen||JPY, ¥|
|KRW||South Korean won||KRW, ₩|
|MXN||Mexican peso||MXN, MX$|
|NZD||New Zealand dollar||NZD, NZ$|
|TWD||New Taiwan dollar||TWD, NT$|
|USD||United States dollar||USD, $|
|ZAR||South African rand||ZAR|
Action determines what will happen if the Conditions are met for a given Trigger. Each Rule must have at least 1 Action, and you can add multiple Actions.
The following Actions are available to use in Rules:
|Assign to Agent||Assigns the Conversation to the designated Agent.|
|Assign to Inbox||Assigns the Conversation to the selected Inbox.|
|Unassign from Agent||Removes the currently assigned Agent, which reassigns the Conversation to the Inbox it is in.|
|Add Topics||Adds the selected Topic(s). This action does not apply to Tasks.|
|Mark No Reply Needed||Marks the Contact as "No Reply Needed," which fulfills the SLA (where applicable) and moves the Conversation to the "Waiting" state but does not close it.|
|Create a Task||Creates a Task with a configurable due date that can be assigned to an Inbox or Agent.|
|Close Conversation||Closes the Conversation, which fulfills the SLA (where applicable).|
|Send Auto-Reply||Sends a message to the Customer on the specified Channel using the selected Answer.|