> 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/automation-rules-actions-and-smart-use-cases.md).

# Automation Rules: Actions & Smart Use Cases

Automation Rule actions define what LimeChat should do when a rule is triggered.

You can use actions to assign conversations, send messages, escalate issues, create CRM tickets, trigger external APIs, and automate operational workflows across support teams.

This guide explains each action and the types of use cases it can support.

***

## 1. Assign a Team

Use this action to route conversations to the right team automatically.

This helps ensure that customer queries reach the team best equipped to handle them.

### Common Use Cases

| Use Case                  | Example                                                          |
| ------------------------- | ---------------------------------------------------------------- |
| Route technical queries   | Assign messages containing “bug” or “error” to Technical Support |
| Route billing queries     | Assign refund or invoice conversations to Billing Team           |
| Route VIP customers       | Assign premium customers to Priority Support                     |
| Route by inbox            | Assign WhatsApp conversations to WhatsApp Support Team           |
| Route by customer segment | Assign enterprise customers to Enterprise Support Team           |

### Example

```
Event: Conversation Created
Condition: Message contains refund
Action: Assign team: Billing Support
```

Outcome:

Refund-related conversations are automatically routed to the Billing Support team.

***

## 2. Assign an Agent

Use this action to assign conversations directly to a specific agent.

This is useful when certain customer segments, issue types, or accounts should always be handled by specific agents.

### Common Use Cases

| Use Case                       | Example                                                |
| ------------------------------ | ------------------------------------------------------ |
| Assign VIP customers           | Assign high-value customers to a senior agent          |
| Assign account-owned customers | Assign conversations to the customer’s account manager |
| Assign specialist queries      | Assign technical issues to a product specialist        |
| Assign regional customers      | Assign customers from a region to a regional agent     |

### Example

```
Event: Conversation Created
Condition: Customer email contains @enterprise.com
Action: Assign agent: Senior Support Agent
```

Outcome:

Enterprise customers are automatically assigned to the right support owner.

***

## 3. Assign Using API Response

Use this action when the assignment decision should come from an external system.

LimeChat can call an external API and assign the ticket based on the response.

Expected response format:

```json
{
  "assignee_email": "agent@company.com"
}
```

Admins can define which response variable should be used for assignment.

### Common Use Cases

| Use Case               | Example                                                          |
| ---------------------- | ---------------------------------------------------------------- |
| Centralized routing    | Your internal CRM decides which agent should receive the ticket  |
| VIP assignment         | VIP customers are assigned to dedicated agents                   |
| Region-based routing   | Customers from different regions are assigned to regional agents |
| Skill-based routing    | External system assigns based on skill, workload, or language    |
| Workload-based routing | Assignment engine returns the agent with available capacity      |

### Example

```
Event: Conversation Created
Condition: Customer type is VIP
Action: Call assignment API and assign ticket using assignee_email
```

Outcome:

The ticket is assigned dynamically based on routing logic maintained in your external system.

### Failure Handling

If the API response is invalid or the assignee email does not match an available agent, assignment can be skipped or handled through fallback logic.

Assignment failures are visible in automation logs.

***

## 4. Assign a Label

Use this action to automatically tag conversations.

Labels help teams categorize, prioritize, report, and route conversations more efficiently.

### Common Use Cases

| Use Case               | Example                                                    |
| ---------------------- | ---------------------------------------------------------- |
| Tag product issues     | Apply label “Product Issue” when message contains “defect” |
| Tag refund requests    | Apply label “Refund” when message contains “refund”        |
| Tag priority customers | Apply label “Priority” for premium customers               |
| Tag SLA breaches       | Apply label “SLA Breached” when SLA is missed              |
| Tag source or campaign | Apply label based on inbox, keyword, or custom field       |

### Smart Example

```
Event: Message Created
Condition: Message contains damaged
Action: Assign label: Product Issue
```

Outcome:

Damaged-product queries are automatically categorized for reporting and routing.

***

## 5. Send a Message

Use this action to send an automated message to the customer.

Messages can be sent immediately or after a delay. They can also include dynamic variables.

### Common Use Cases

| Use Case                     | Example                                                        |
| ---------------------------- | -------------------------------------------------------------- |
| Send auto-acknowledgement    | “We’ve received your query and our team will respond shortly.” |
| Send follow-up reminder      | “Just checking if you still need help with this.”              |
| Share ticket ID              | “Your ticket ID is {{ticket\_id}}.”                            |
| Personalize agent assignment | “{{agent\_name}} will be assisting you today.”                 |
| Send feedback request        | Ask for feedback after the conversation is resolved            |

### Example

```
Event: Conversation Created
Condition: Inbox is WhatsApp Support
Action: Send message: Hi {{customer_name}}, we’ve received your message. Your ticket ID is {{ticket_id}}.
```

Outcome:

Customers receive a personalized acknowledgement with their ticket reference.

***

## 6. Send a Delayed Message

Use this when you want to send a message after a defined delay instead of immediately.

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

### Common Use Cases

| Use Case                 | Example                                           |
| ------------------------ | ------------------------------------------------- |
| Customer follow-up       | Send a reminder 2 hours after no customer reply   |
| Feedback collection      | Send feedback form 30 minutes after resolution    |
| Pacing messages          | Avoid sending multiple automated messages at once |
| Post-resolution check-in | Ask if the customer needs more help later         |

### Example

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

Outcome:

Feedback collection happens automatically without requiring agents to remember it manually.

***

## 7. Send an Out-of-Office Message

Use this action to send a different message when customers reach out outside business hours.

### Common Use Cases

| Use Case                    | Example                                          |
| --------------------------- | ------------------------------------------------ |
| After-hours acknowledgement | Tell customers the team is currently offline     |
| Weekend support handling    | Send a weekend-specific response                 |
| Holiday support handling    | Send a holiday-specific message                  |
| SLA expectation setting     | Inform customers when they can expect a response |

### 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.
```

Outcome:

Customers get clear expectations instead of waiting without context.

***

## 8. Send an Email to the Team

Use this action to notify internal teams or supervisors.

This is useful for escalations, SLA breaches, VIP customer alerts, or high-risk issues.

### Common Use Cases

| Use Case                    | Example                                                           |
| --------------------------- | ----------------------------------------------------------------- |
| Escalate urgent issues      | Email supervisor when message contains “urgent”                   |
| Notify SLA breach           | Email team lead when FRT is breached                              |
| Alert on VIP customer       | Notify account manager when VIP customer creates a ticket         |
| Notify L2 team              | Email technical team for product issues                           |
| Alert on high-risk keywords | Notify team when customer mentions legal, refund, or cancellation |

### Smart Example

```
Event: SLA FRT Breached
Condition: Team is Support
Action: Send email to Team Lead
```

Outcome:

Supervisors are notified immediately when response SLAs are missed.

***

## 9. Mute Conversation

Use this action when you want to suppress notifications for certain conversations.

This is useful for low-priority, repeated, or informational conversations.

### Common Use Cases

| Use Case                       | Example                                              |
| ------------------------------ | ---------------------------------------------------- |
| Repeated sale queries          | Mute common promotional inquiries during sale events |
| Low-priority automated replies | Mute system-generated conversations                  |
| Duplicate inquiries            | Mute conversations already handled elsewhere         |
| Informational messages         | Mute conversations that do not require agent action  |

### Example

```
Event: Conversation Created
Condition: Message contains sale details
Actions:
1. Send message with sale FAQ link
2. Mute conversation
```

Outcome:

Customers receive the required information while agents avoid unnecessary notification load.

***

## 10. Resolve Conversation

Use this action to automatically resolve conversations that meet defined criteria.

This is useful for workflows where no agent action is required after automation has completed the required step.

### Common Use Cases

| Use Case                                 | Example                                            |
| ---------------------------------------- | -------------------------------------------------- |
| Close completed workflows                | Resolve conversation after feedback is collected   |
| Auto-close inactive conversations        | Resolve conversations after no customer response   |
| Close bot-handled queries                | Resolve conversations answered fully by automation |
| Close duplicate or informational tickets | Resolve tickets that do not require agent action   |

### Example

```
Event: Contact Reply Time Breached
Condition: Customer has not replied within configured time
Action: Resolve conversation
```

Outcome:

Inactive conversations can be closed automatically after the defined follow-up window.

Use this carefully for customer-facing workflows where manual review may still be required.

***

## 11. Create a CRM Ticket

Use this action to create a CRM ticket from an automation rule.

This is useful when conversations need to be converted into structured support tickets for tracking, escalation, or downstream workflows.

### Common Use Cases

| Use Case                     | Example                                                     |
| ---------------------------- | ----------------------------------------------------------- |
| Escalate L2 issues           | Create a CRM ticket when message contains “technical issue” |
| Track refund requests        | Create a ticket for billing or refund workflows             |
| Create tickets for VIP cases | Create a ticket for priority customers                      |
| Track post-sales issues      | Create a ticket for delivery, return, or warranty queries   |
| Sync support cases           | Create tickets in external ticketing systems                |

### Example

```
Event: Conversation Created
Condition: Message contains warranty
Action: Create CRM Ticket
```

Outcome:

Warranty-related conversations are converted into trackable support tickets.

***

## 12. Create an external support ticket Ticket

Zendesk/Freshdesk/Kapture is supported under:

```
Actions → Create CRM Ticket
```

Use this action to automatically create Zendesk tickets from LimeChat conversations.

### Common Use Cases

| Use Case                      | Example                                                   |
| ----------------------------- | --------------------------------------------------------- |
| Create ticket for escalations | L2 support cases are pushed to Zendesk                    |
| Sync customer issues          | Conversations with specific labels create Zendesk tickets |
| Track external ticket IDs     | Zendesk ticket ID is stored for reference                 |
| Route complex issues          | Product or technical issues are moved to Zendesk          |
| Maintain support continuity   | Customer context is passed from LimeChat to Zendesk       |

### Example

```
Event: Message Created
Condition: Message contains bug
Action: Create CRM Ticket → Zendesk
```

Outcome:

Technical issues are automatically pushed to Zendesk for L2 or engineering follow-up.

### Failure Handling

If Zendesk authentication fails or ticket creation does not complete, the failure is logged and retried based on the configured retry behaviour.

***

## 13. Trigger an API Call

Use this action to call an external API from an automation rule.

This allows LimeChat workflows to connect with CRMs, ERPs, logistics systems, escalation tools, fraud platforms, internal workflow engines, and other external systems.

### Supported HTTP Methods

* GET
* POST
* PUT
* PATCH
* DELETE

### Configurable Fields

* URL
* HTTP method
* Headers
* Request body
* Authentication
* Timeout

### Common Use Cases

| Use Case                  | Example                                                   |
| ------------------------- | --------------------------------------------------------- |
| Sync customer data        | Send customer details to an external CRM                  |
| Trigger shipment workflow | Call logistics API when customer requests a return        |
| Notify escalation system  | Send high-priority tickets to an internal escalation tool |
| Trigger fraud check       | Send customer/order data to a fraud detection system      |
| Start internal workflow   | Trigger an internal workflow engine from LimeChat         |
| Send conversation event   | Push conversation events to webhook-based systems         |

### Example

```
Event: Conversation Created
Condition: Label is High Priority
Action: Trigger API Call
```

Example payload:

```json
{
  "ticket_id": "{{ticket_id}}",
  "customer_name": "{{customer_name}}",
  "customer_email": "{{customer_email}}",
  "priority": "high"
}
```

Outcome:

External systems receive customer and ticket context automatically.

API execution logs help admins debug failed calls, timeout issues, and invalid responses.

***

## 14. Use Email “Contains” Filtering

Automation Rules support partial matching on email fields.

This allows you to create workflows based on email domains or partial email values.

### Common Use Cases

| Use Case                      | Example                                               |
| ----------------------------- | ----------------------------------------------------- |
| Detect consumer email domains | Email contains `@gmail.com`                           |
| Detect enterprise customers   | Email contains `@enterprise.com`                      |
| Detect internal employees     | Email contains your company domain                    |
| Detect partner customers      | Email contains partner domain                         |
| Route B2B customers           | Assign customers from business domains to B2B support |

### Example

```
Event: Conversation Created
Condition: Email contains @company.com
Action: Assign team: Enterprise Support
```

Outcome:

Customers from selected domains can be routed, tagged, or prioritized automatically.

***

## 15. Apply Execution Count Limit

Use execution limits to control how many times a rule should run.

This is especially useful for message-based workflows, reminders, and loop prevention.

### Common Use Cases

| Use Case                    | Example                                       |
| --------------------------- | --------------------------------------------- |
| Limit reminders             | Send only 2 follow-up reminders               |
| Prevent loops               | Stop a rule from repeatedly triggering itself |
| Avoid duplicate escalations | Escalate only once per conversation           |
| Reduce noise                | Prevent repeated internal notifications       |

### Example

```
Event: Contact Reply Time Breached
Condition: Customer has not replied
Action: Send reminder message
Execution Limit: 2
```

Outcome:

The customer receives a controlled number of reminders instead of repeated automated messages.

***

## 16. Apply Echo Message Filtering

Use echo filtering to ensure automations do not run on system-generated or self-generated messages.

### Common Use Cases

| Use Case              | Example                                                               |
| --------------------- | --------------------------------------------------------------------- |
| Ignore bot messages   | Bot replies should not trigger another automation                     |
| Ignore agent messages | Outbound agent messages should not trigger customer-message workflows |
| Ignore sync messages  | Messages synced from external tools should not start workflows        |
| Prevent loops         | Avoid recursive automation chains                                     |

### Example

```
Event: Message Created
Condition: Echo message is false
Action: Send message
Execution Limit: 1
```

Outcome:

The automation runs only on customer-originated messages and does not repeatedly trigger itself.

***

## Smart Workflow Examples

### 1. Follow Up When Customer Does Not Reply

```
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.
Execution Limit: 2
```

Outcome:

Customers receive timely follow-ups without agents manually tracking every conversation.

***

### 2. Escalate SLA Breach

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

Outcome:

SLA breaches are acted on immediately and supervisors are notified.

***

### 3. Route VIP Customers

```
Event: Conversation Created
Condition: Email contains @premiumclient.com
Actions:
1. Assign label: VIP
2. Assign agent: Senior Support Agent
```

Outcome:

Important customers are routed to the right agents automatically.

***

### 4. Trigger External Escalation Workflow

```
Event: Conversation Created
Condition: Label is High Priority
Action: Trigger API Call
```

Outcome:

External escalation systems receive customer and ticket context automatically.

***

### 5. Create Zendesk Ticket for Technical Issues

```
Event: Message Created
Condition: Message contains bug
Action: Create CRM Ticket → Zendesk
```

Outcome:

Technical issues are pushed to Zendesk for L2 or engineering follow-up.

***

### 6. Prevent Automation Loops

```
Event: Message Created
Condition: Echo message is false
Action: Send message
Execution Limit: 1
```

Outcome:

Automations run only on customer-originated messages and do not repeatedly trigger themselves.

***

### 7. Send Out-of-Office Response

```
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 working hours.
```

Outcome:

Customers receive clear communication when agents are unavailable.

***

### 8. Sync Customer Data With External CRM

```
Event: Conversation Created
Condition: Inbox is WhatsApp Support
Action: Trigger API Call
```

Example payload:

```json
{
  "customer_name": "{{customer_name}}",
  "ticket_id": "{{ticket_id}}",
  "source": "LimeChat"
}
```

Outcome:

Customer and ticket data is synced with your external CRM automatically.

***

### 9. Assign Tickets Using External Routing Logic

```
Event: Conversation Created
Condition: Customer type is Enterprise
Action: Call assignment API and assign using assignee_email
```

Expected API response:

```json
{
  "assignee_email": "enterprise.agent@company.com"
}
```

Outcome:

Assignment logic remains centralized in your internal routing system while LimeChat handles execution.

***

## Common Edge Cases and Expected Behaviour

| Scenario                            | Expected Behaviour                                   |
| ----------------------------------- | ---------------------------------------------------- |
| API timeout                         | Execution is retried or logged as failed             |
| Invalid assignee email from API     | Assignment is skipped or fallback logic is applied   |
| Rule execution loop                 | Rule stops based on execution count limit            |
| Variable value unavailable          | Blank or default fallback value is used              |
| Out-of-office configuration missing | Default rule execution behaviour is followed         |
| Zendesk authentication failure      | Failure is logged and retried based on configuration |
| Multiple rules trigger together     | Rules follow the defined execution order             |
| Echo message received               | Message is skipped if echo filtering is enabled      |

***

## Recommended Setup Approach

For every automation workflow, define the following before creating the rule:

1. What event should trigger the automation?
2. What conditions should be checked?
3. What action should LimeChat perform?
4. Should the rule respect working hours?
5. Should the rule have an execution limit?
6. Should echo messages be ignored?
7. Should the rule run before or after another rule?
8. Does the rule need to be tested before going live?

This helps you build automation rules that are predictable, scalable, and easy to maintain.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://limechatai.gitbook.io/limechat-product-guide/helpdesk/settings/automation-rules-basics-and-setup/automation-rules-actions-and-smart-use-cases.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
