Rules can help you manage and automate frequent activities by triggering a response or action when a Conversation meets 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:
- Trigger
- Condition(s)
- Action(s)
Rules are executed When a defined Trigger is detected, And Condition(s) are met, Then Actions are taken, which complete a Rule.
1. Trigger #
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:
Trigger | Qualifiers | Description |
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. • Only applies to Conversations currently assigned to an Agent. |
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. • Does not apply to Conversations without a due date (e.g., Waiting or Closed status) |
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. • Use with Topics Condition. |
Answer used | n/a | When a message is sent using an Answer. • Does not apply to Notes. |
2. Condition(s) #
Condition(s) narrows down the set of Triggered events on which the Rule will act. A Rule can have no Conditions, 1 Condition, or several. Some Conditions are only relevant for specific Triggers so that the options list may vary.
The following Conditions are available to use in Rules:
Condition | Qualifiers | Qualifiers |
First Message | n/a | • Appears as “Message initiates a conversation.” • Refers to whether an inbound message is the first in a Conversation. • This Condition does not apply to the first message sent when a Conversation is reopened. |
New Contact | n/a | Chat, Email, Facebook Messenger, Instagram Messaging, Phone Call, SMS, Voicemail, WhatsApp |
Channel | Refers to the Channel of the most recent Customer communication. | Chat, Email, Facebook Messenger, Instagram Messaging, Phone Call, SMS, Voicemail, WhatsApp, Custom Channel. |
Message From | 1. Contains, Does Not Contain 2. Any, Only, ReEx, Words | • Refers to the address that sent the Message. For emails, this does not include CC’ed or BCC’ed recipients. • This Condition does not apply to Chat. |
Message To | 1. Contains, Does Not Contain 2. Any, Only, RegEx, Words | Any, Only, RegEx •Refers to the address that received the Message. For emails, this does not include CC’ed or BCC’ed recipients. • This Condition does not apply to Chat. |
Message Subject | 1. Contains, Does Not Contain 2. Any, Only, RegEx, Words | • Refers to the subject line of an Email. • This Condition does not apply to other Channels or Tasks. |
Message Body | 1. Contains, Does Not Contain 2. Any, Only, RegEx, Words | • Refers to the message’s main content, or in the case of Tasks, the Task’s main content. • Applies to the last/most recent email message received in a threaded email. Excludes quoted email content from earlier responses in the email thread. • 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, None Of | Refers to the Topics assigned to the Conversation. • The “All of” Condition is met if all selected Topics are present, while the “Any of” Condition is met if at least one selected Topic is present. Topics need to be already applied to the Conversation. • For the “Topics added” Trigger, this Condition refers to the Topic added at that time, not those added before the triggering event. Use the “Topics” Condition when you use the “Topics added” Trigger unless you want to Trigger the behavior for every added Topic. • The “None Of” Condition is met if at least one selected Topic is present. Topic needs to be already applied to the Conversation. This can occur when an Agent (or another Rule) applies a Topic to a Conversation. |
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 | 1. Contains, Does Not Contain 2. Any, Only, RegEx, Words | Refers to the URL where chat was initiated through Glad App. |
Proactive Chat | Displays a list of Proactive Chat Campaigns | Refers to a specific Proactive Chat Campaign. |
Business Hours | Business Hours Name | Refers to the Business Hours when Customers can expect a response. |
Custom Attributes Number | 1. Is, Is not 2. Between, Equal to, Greater than, Greater or equal, Less than, Less or equal | 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 | 1. Is, Is not 2. Between, Equal to, Greater than, Greater or equal, Less than, Less or equal | Tailored to the custom attributes you have set for Customers. If available, these Conditions appear at the bottom of the list of standard Conditions. • Supported currency Conditions use ISO 4217 codes. |
Custom Attributes String | 1. Contains, Does Not Contain 2. Any, Only, RegEx, Words | Tailored to the custom attributes you have set for Customers. If available, these Conditions appear at the bottom of the list of standard Conditions. |
Multiple Conditions #
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 additional qualifiers, 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”).
Text Matching #
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 |
Any | • The text you’re searching for can appear anywhere in the content being searched and does not have to be the only text. For example, the phrase “Happy Birthday” appears in the content “Happy Birthday to you!” and would be matched using Any. • Use quotation marks for longer text to bound a word or sentence. 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) instead to create exact matches of distinctive words you wish to add. |
Only | • The text you’re searching for must match exactly with the content. Except for leading and trailing spaces, the content must be precisely the same, with nothing more or less. This matching type is most useful for matching email addresses, custom attribute values, and predictable text like automated email subject lines. For example, the phrase “Happy Birthday” would not match the content “Happy Birthday to you!” using Only because the text strings don’t precisely match. • Multiple phrases cant be matched using Only. For example: “hello, re:hello” will search for “hello, re: hello” and not “hello” or “re: hello.” |
RegEx | Short for Regular Expression, a form of light coding that lets you match patterns in the text without specifying the entire string. This is particularly useful for distinguishing words that can be part of other words, like “log” and “catalog,” or for matching 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!”. • Another example, to ensure the word “exchange” is not associated with the word “change,” a RegEx would look like: ◦For multiple words, you’ll need to incorporate parentheses and a pipe separator. It would be as follows: \bchange\b|\bhell\b|\god\b .• To match exact text, or a group, you’d use great,?\s* thanks|[Ss]ure thing , which would match both “great, thanks” (with or without the comma) and “Sure thing” (capital or lower-case “s”). Ultimately, the point is just that you can add more than one regex pattern into a rule with the pipe | but not end a syntax with a pipe.•Check out examples of how to use Regex and how to work with RegEx •RegEx matching follows Google’s re2 library •To check your regular expression, you can use a service like Rubular |
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. • Single Word – For example, the words “all,” “ask,” and “bask” are contained within the word “basketball,” but if you’re only looking for the word “ask” and don’t want the Rule to trigger when “basketball” comes up, then choose Words rather than Any. You can also use RegEx to detect whole words, but sometimes the RegEx encoding can be tricky, so Words allows for a simpler, more predictable setup. • Multi-Word Phrase – Configure multiple words like “attendee list” and “software payment notification” separated by commas. The Rule is only triggered if the entire phrase matches. |
Tip – Text Matching
- 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. Using 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.
Note – Attributes support
Number and Currency attributes currently support only US formatting for use of commas and periods for Rules evaluation. Commas are considered for the delineation of thousands, millions, etc. Periods are considered for the delineation of decimals.
Numbers not formatted in this way can still be displayed in the Customer Profile.
Comparison Operator | Description |
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 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 chosen currency type, 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”, and “USD 500”. However, formats with the code or symbol appearing after the number will not succeed: “500 USD” or “500 $”.
ISO Code | Currency Name | Symbols Supported |
AUD | Australian dollar | AUD, A$ |
BRL | Brazilian real | BRL, R$ |
CAD | Canadian dollar | CAD, CA$ |
CHF | Swiss franc | CHF |
CNY | Chinese yuan | CNY, CN¥ |
DKK | Danish krone | DKK |
EUR | Euro | EUR, € |
GBP | Pound sterling | GBP, £ |
HKD | Hong Kong dollar | HKD, HK$ |
IDR | Indonesian rupiah | IDR |
INR | Indian rupee | INR, ₹ |
JPY | Japanese yen | JPY, ¥ |
KRW | South Korean won | KRW, ₩ |
MXN | Mexican peso | MXN, MX$ |
NOK | Norwegian krone | NOK |
NZD | New Zealand dollar | NZD, NZ$ |
PLN | Polish złoty | PLN |
RUB | Russian ruble | RUB |
SAR | Saudi riyal | SAR |
SEK | Swedish krona/kronor | SEK |
TRY | Turkish lira | TRY |
TWD | New Taiwan dollar | TWD, NT$ |
USD | United States dollar | USD, $ |
ZAR | South African rand | ZAR |
3. Action(s) #
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:
Actions | Description |
Assign to Agent | Assigns the Conversation to the designated Agent. • Only the first Rule assigning an Agent will apply. Any other Rules containing Agent assignment as an Action will be ignored. |
Assign to Inbox | Assigns the Conversation to the selected Inbox. • Only the first Rule assigning an Inbox will apply. Any other Rules containing assign to Inbox as an Action will be ignored. |
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. • Other Rules that assign Topics can apply to a single Conversation. Topics will continue to be added to each Conversation as directed by each Rule. |
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. • Use for Communication is received, or Topics added Triggers only. |
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. • Applies to Messaging Channels and Email in response to an inbound message only. • Only use with the Communication is Received Trigger. • If an Email Answer with an attachment is used as an auto-reply, the attachment is ignored. • Applies to the same Channel (Messaging or Email) where the message was received. • Only the first Rule sending an auto-reply will apply. Any other Rules containing a send auto-reply Action will be ignored. |