> For the complete documentation index, see [llms.txt](https://limechatai.gitbook.io/limechat-product-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://limechatai.gitbook.io/limechat-product-guide/helpdesk/settings/automation-rules-basics-and-setup.md).

# Automation Rules: Basics & Setup

Automation Rules help you automate repetitive support workflows across your LimeChat inboxes.

You can use Automation Rules to assign conversations, send messages, trigger follow-ups, escalate SLA breaches, create CRM tickets, call external APIs, and control how workflows run across customer conversations.

This helps support, CX, and operations teams reduce manual effort, improve response times, and create more consistent customer experiences.

***

## 1. What Are Automation Rules?

Automation Rules are configurable workflows that run automatically when a specific event happens.

Each rule is made up of three parts:

| Component  | Meaning                                            |
| ---------- | -------------------------------------------------- |
| Event      | The activity that triggers the rule                |
| Conditions | The criteria that must be true for the rule to run |
| Actions    | The task LimeChat performs when the rule runs      |

Example:

```
Event: Conversation Created
Condition: Inbox is WhatsApp Support
Action: Assign conversation to Support Team
```

This means whenever a new conversation is created in the WhatsApp Support inbox, LimeChat automatically assigns it to the Support Team.

***

## 2. Where to Find Automation Rules

To create or manage automation rules:

1. Go to **Settings**.
2. Open **Automation Rules**.
3. Click **Create Rule**.
4. Select the event.
5. Add conditions.
6. Configure actions.
7. Test the rule, if required.
8. Enable the rule.

***

## 3. Events

An event is the trigger that starts an automation rule.

Common events include:

* Conversation Created
* Conversation Opened
* Conversation Resolved
* Message Created
* Assignee Changed
* Team Changed
* SLA FRT Breached
* SLA NRT Breached
* SLA RT Breached
* Contact Reply Time Breached

Example:

```
Event: Message Created
Condition: Message contains refund
Action: Assign label: Refund
```

This rule runs whenever a new message is created and the message includes the word “refund”.

***

## 4. Conditions

Conditions decide whether the rule should run after the event is triggered.

Common conditions include:

* Inbox
* Conversation status
* Assignee
* Team
* Email subject
* Email address
* Customer details
* Tags or labels
* Custom fields
* Message content

Some conditions may only be available for specific events.

Example:

```
Event: Conversation Created
Condition: Customer email contains @enterprise.com
Action: Assign team: Enterprise Support
```

This helps route enterprise customers to the right team automatically.

***

## 5. Actions

Actions define what LimeChat should do when the event and conditions match.

Common actions include:

* Assign a team
* Assign an agent
* Assign a label
* Send a message
* Send an email to the team
* Mute conversation
* Resolve conversation
* Create a CRM ticket
* Update a CRM ticket
* Call External API
* Assign using email (using the variable from API node)
* Remove a label
* Add contact label
* Assign a label
* Send an email

You can also configure multiple actions under one rule.

Example:

```
Event: Conversation Created
Condition: Message contains damaged
Actions:
1. Assign label: Product Issue
2. Assign team: Support
3. Send message: We’ve received your issue and our team will help you shortly.
```

***

## 6. Time-Based Automation Rules

Automation Rules also support time-based triggers. These help teams manage follow-ups, SLA breaches, and delayed communication.

***

### 6.1 Customer Reply Time-Based Rules

You can trigger a rule when a customer does not reply within a configured time after the last agent message.

Example use case:

A support agent replies to a customer, but the customer does not respond for 2 hours. LimeChat can automatically send a follow-up message or apply a follow-up label.

How to set it up:

1. Go to **Inbox Settings**.
2. Enable **Conversation Tracking**.
3. Set the **Tracking Reminder Time**.
4. Go to **Automation Rules**.
5. Create a rule using the event **Contact Reply Time Breached**.
6. Add the required conditions and actions.

Example:

<figure><img src="/files/2CZkzKEARwth0vNDDJFU" alt=""><figcaption></figcaption></figure>

```
Event: Contact Reply Time Breached
Condition: Inbox is WhatsApp Support
Action: Send message: Hi {{customer_name}}, just checking if you still need help with this.
```

***

### 6.2 SLA-Based Rules

You can trigger automation rules when agent or admin response timelines are breached.

Supported SLA events:

* **SLA FRT Breached**: First Response Time breached
* **SLA NRT Breached**: Next Response Time breached
* **SLA RT Breached**: Resolution Time breached

Example use case:

A customer has not received a first response within the SLA window. LimeChat can automatically escalate the conversation to a supervisor or assign it to a priority team.

Smart example:

```
Event: SLA FRT Breached
Condition: Team is Support
Actions:
1. Assign label: SLA Breached
2. Send email to Team
3. Assign team: Priority Support
```

***

### 6.3 Delayed Message Sending

You can add a delay before sending an automated message.

This is useful when you want to pace follow-ups instead of sending messages immediately.

Example use case:

You want to send a feedback message 30 minutes after a conversation is resolved.

Smart example:

```
Event: Conversation Resolved
Condition: Inbox is WhatsApp Support
Action: Send feedback message after 30 minutes
```

Note: Delayed message sending is currently supported for WhatsApp and Chat messages. It is not supported for Email.

***

## 7. Dynamic Variables in Messages

Automation messages can include dynamic variables to personalize communication.

Example variables:

```
{{customer_name}}
{{ticket_id}}
```

***

## 8. Working Hours and Out-of-Office Handling

Automation messages can respect your configured business working hours.

At the time of execution, LimeChat checks whether the message is being sent during working hours.

Based on your configuration, LimeChat can:

* Send the normal message during working hours
* Skip the message outside working hours
* Send an alternate out-of-office message outside working hours

Smart example:

```
Event: Conversation Created
Condition: Outside working hours
Action: Send message: Hi {{customer_name}}, our team is currently offline. We’ll get back to you during our working hours.
```

This is useful for:

* Weekend support handling
* Holiday responses
* Non-working-hour conversations
* Setting the right expectations when agents are unavailable

If no out-of-office configuration is present, the rule follows the default execution behaviour.

***

## 9. Automation Rule Ordering

You can define the order in which automation rules should run.

This helps when multiple rules are triggered at the same time and one rule depends on another.

Example:

```
Rule 1: Apply VIP label
Rule 2: Assign VIP conversations to Senior Support Team
Rule 3: Notify supervisor
```

With rule ordering, the VIP label is applied before assignment and notification rules run.

Use rule ordering when:

* Assignment should happen before notification
* Tagging should happen before escalation
* CRM ticket creation should happen before external sync
* Multiple rules may otherwise conflict
* You want predictable automation behaviour

***

## 10. Test Mode

Test Mode allows you to test an automation rule before making it live.

Important: Test Mode is visible only for rules that have already been created. It is not visible for unsaved rules.

How to use Test Mode:

1. Create and save the automation rule.
2. Open the rule in edit mode.
3. Enable **Test Mode**.
4. Add the test number.
5. Trigger the rule using the test contact.
6. Verify whether the rule behaves as expected.
7. Disable Test Mode when you are ready to make the rule live.

For non-WhatsApp inboxes, make sure the customer’s contact details are updated and consolidated correctly in LimeChat. The system uses the phone number as the primary identifier for testing.

***

## 11. Best Practices

1. Use clear rule names so admins can understand the purpose of each rule.
2. Use rule ordering when multiple rules depend on each other.
3. Add execution limits for message-based or recurring workflows.
4. Enable echo filtering for message-created automations.
5. Test rules before enabling them for live customers.
6. Use dynamic variables to avoid creating multiple static message templates.
7. Use out-of-office handling for customer-facing auto-replies.
8. Validate API responses before using them for assignment.
9. Review automation logs regularly to identify failed actions.
10. Avoid overlapping rules unless the execution order is clearly defined.

***

## 12. FAQ

### Can I add multiple actions to one automation rule?

Yes. You can configure multiple actions under a single rule.

Example:

```
Event: Conversation Created
Condition: Message contains refund
Actions:
1. Assign label: Refund
2. Assign team: Billing
3. Send acknowledgement message
```

***

### Can automation rules be tested before going live?

Yes. You can use Test Mode after creating the rule. Test Mode is available only for saved rules.

***

### Can I delay automated messages?

Yes. You can add a delay before sending messages through automation rules.

Note: Delayed message sending is currently supported for WhatsApp and Chat messages. It is not supported for Email.

***

### Can automation messages include customer or ticket details?

Yes. You can use dynamic variables such as:

```
{{customer_name}}
{{ticket_id}}
```

***

### Can I prevent automations from running repeatedly?

Yes. You can use execution count limits and echo message filtering to reduce duplicate executions and prevent loops.

***

### Can Automation Rules respect working hours?

Yes. Automation messages can be configured to follow working-hours or out-of-office behaviour.
