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.
|
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.
|
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 |
|
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 |
|
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.
|
Message Subject | 1. Contains, Does Not Contain 2. Any, Only, RegEx, Words |
|
Message Body | 1. Contains, Does Not Contain 2. Any, Only, RegEx, Words |
|
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.
|
Estimated Remaining Wait Time | Between, Greater Than, Greater or Equal, Less Than, Less or Equal | Estimated Remaining Wait Time is calculated using the same method as Estimated Wait Time. However, the predicted queue position reflects the Customer’s specific position in the queue. As Agents resolve other Conversations, the Customer’s predicted position will move up (closer to being helped), unless higher-priority Conversations are added to the queue.
|
Topics | Any Of, All Of, None Of | Refers to the Topics assigned to the 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 Chat. |
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 |
|
Custom Attributes String | 1. Contains, Does Not Contain 2. Any, Only, RegEx, Words |
|
App Platform Data Attributes Currency |
|
|
Retrieve custom attributes before routing a Customer
The Lookup before Rules routing behavior is activated by default, allowing the Lookup Adaptor to retrieve custom attributes (e.g., lifetime value spend) from an external system before Rules run. This allows you to utilize custom attributes in Rules to route Customers to certain Inboxes or Agents. You can deactivate Lookup before Routing.
Rules are executed in parallel with custom attribute lookup through the Lookup Adaptor. However, due to lookup latencies outside Gladly's control, there is no guarantee that the Rule will have the latest custom attribute value before the Customer is routed. This logic also applied to App Platform data attributes.
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 |
|
Only |
|
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, “
|
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.
|
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.
Attributes support
Number and custom attribute Currencies 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 | Descriptions |
|---|---|
Assign to Agent |
|
Assign to Inbox |
|
Unassign from Agent | Removes the currently assigned Agent, which reassigns the Conversation to the Inbox it is in. |
Add Topics |
|
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 |
|
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.
|
App Platform Currency for Rules
This section is specific to how you might use App Platform currencies within Rules. For information on using custom attributes within Rules, refer to earlier sections.
What is an App Platform data currency attribute?
An App Platform data currency attribute allows you to extract currency values from your App Platform external app data for use within a Rule. For example, use a data currency attribute to route a Customer to a priority Inbox based on lifetime value.
An App Platform currency attribute is defined in two parts:
1. The currency value, representing the numerical value of the currency. In your GraphQL schema, this would be the fields marked with type Currency.
2. The currency code, representing the code of the numerical value, such as USD, JPY, and so on. It is expected that in your GraphQL schema, the field containing the code is of type String.
Both the currency value and the currency code are required in order to use the attribute in Rules. When a Rule using an App Platform currency attribute is created, you must select the currency code in the Rule as well. The Rule will only evaluate if the currency code in the Rule and the currency code extracted from the external app data match, at which point a numerical comparison will be applied to the value.
Identify the currency code in external app data
Due to the variety of possible payloads returned from external systems, the currency code for a currency value may be located in one of several places. It could be either directly paired with the currency value, defined at a higher level, in the example where one code applies to multiple orders in external data, listed elsewhere, or omitted entirely.
It is important to determine where this code is defined in the external data, as it is required for the Rule to evaluate properly.
In the event that the external data does not have a currency code included, but you are certain about what value it represents, e.g., all order prices are guaranteed to be in USD, it is recommended that you add an additional field for currency code in your response_transformation.gtpl to manually include this expected currency code. Please note that currencies will be treated as the expected code in this case, so be certain that all values in the external data are going to be the expected currency code, to prevent running the Rule on currency values with different monetary values.
