Skip to content

Automation Rules Feature

Overview

Automation Rules (/automations) enable businesses to automate workflows based on triggers and conditions. This rule-based automation system triggers actions based on events and conditions, allowing businesses to streamline operations and improve efficiency.


Features

1. Automation Rules

Create Automations: - Build automation rules with: - Rule name - Description - Trigger event - Conditions - Actions - Active/inactive status

Edit Automations: - Update automation rules

Delete Automations: - Remove automation rules

Enable/Disable: - Toggle automation status - Active automations run automatically - Inactive automations are paused

2. Trigger Events

Message Events: - Message received - Message sent - Message failed

Contact Events: - Contact created - Contact updated - Contact tag updated - Contact lifecycle updated - Contact assigned

Deal Events: - Deal created - Deal updated - Deal stage changed - Deal assigned

Conversation Events: - Conversation created - Conversation assigned - Conversation status changed

Task Events: - Task created - Task completed - Task overdue

Broadcast & Social Events: - Broadcast response - Comment added - Facebook comment received

Call & Meeting Events: - Call ended - Zoom recording completed

5. Automation Management

Rule List: - View all automation rules - Table view (desktop) - Card view (mobile) - Status indicators - Trigger icons - Action counts

Rule Details: - View rule configuration - Full rule definition - Execution history - Success/failure rates

Bulk Operations: - Manage multiple rules - Bulk enable/disable - Bulk delete

6. Automation Execution

Real-Time Execution: - Immediate rule execution - Event-driven triggers - Instant action execution

Execution Logging: - Track rule executions - Execution history - Success/failure tracking - Error messages

Error Handling: - Handle execution errors - Error notifications - Retry logic - Fallback actions

7. Pagination

50 Automations Per Page: - Efficient loading - Page navigation


Conditional Logic Details

Condition Fields:

Message Fields: - Message content - Contact ID - Channel type (WHATSAPP_LITE, WHATSAPP_CLOUD, FB_MESSENGER, INSTAGRAM, TELEGRAM, TIKTOK, EMAIL, SMS) - Channel name (specific channel account)

Contact Fields: - First name - Last name - Email addresses - Phone numbers

Deal Fields: - Deal title - Deal stage - Deal value - Old stage (for stage changes) - New stage (for stage changes)

Conversation Fields: - Conversation status - Contact ID - Channel type - Channel name

Time Fields: - Organization time (with timezone) - Time-based conditions (before, after, between) - Days of week selection (Sunday-Saturday)

Operators:

Text Operators: - Equals - Contains - Starts with - Ends with - Not equals

Numeric Operators: - Equals - Greater than - Less than - Not equals

Time Operators: - Between (time range) - Before (specific time) - After (specific time)

Special Operators: - Channel type selection (dropdown) - Channel name selection (dropdown) - Days of week (multi-select checkboxes)

Time Conditions: - Time-based conditions - Days of week selection - Time range filtering

3. Conditions

Field Conditions: - Check field values - Equals, Contains, Starts with, Ends with - Not equals, Greater than, Less than

Time Conditions: - Time-based conditions - Current time (organization timezone) - Between times, Before time, After time - Days of week selection

Channel Conditions: - Channel-specific conditions - Channel type matching - Channel name matching

Multiple Conditions: - Combine conditions - AND logic, OR logic - Complex condition groups

4. Actions

Create Task: - Automatically create tasks - Task title, description - Priority (Low, Medium, High) - Assignee (optional, auto-assign available) - Due date (optional)

Auto Assign Conversation: - Auto-assign conversations - Round-robin assignment - Availability-based assignment

Auto Assign Task: - Auto-assign tasks - Round-robin assignment - Availability-based assignment

Assign Conversation: - Assign to specific user - User selection

Add Tag: - Add tags to contacts - Tag name - Multiple tags

Reply with Message: - Send automated replies - Text message - Quick reply template - Variable substitution

FB: Reply to Comment + Send DM (FB_COMMENT_REPLY_AND_DM): - Available on the "Facebook Comment Received" trigger - Public reply to the comment - Private DM to the commenter - Optional @mention of the commenter

HTTP Request: - Call external APIs - GET, POST, PUT, PATCH, DELETE - URL configuration - Headers configuration - Body configuration - Response handling

4. Task Creation Action

Task Configuration: - Task title (required) - Task description - Priority (LOW, MEDIUM, HIGH) - Assignee selection - Due date setting

5. Message Reply Action

Reply Options: - Text Message - Send plain text message - Quick Reply Template - Use pre-configured quick reply template - Variable substitution support - Template selection from available templates

Reply Configuration: - Choose message type (text or template) - Select quick reply template (if using template) - Enter message text (if using text) - Message sent automatically when trigger fires

6. HTTP Request Action

HTTP Configuration: - URL (required) - Method (GET, POST, PUT, PATCH, DELETE) - Headers (key-value pairs) - Body (key-value pairs)

7. Automation Management

Management Features: - Create automation rules - Edit existing rules (via edit dialog) - Delete rules - Enable/disable rules (toggle switch) - View automation list - Pagination support (50 items per page) - Mobile-responsive table/card views - Search and filter capabilities

Automation List Views: - Desktop View - Table format with all details - Mobile View - Card format optimized for mobile - Status badges (Active/Paused) - Trigger icons for visual identification - Quick actions (Edit, Delete, Toggle)

8. Rule Status

Status Types: - Active - Rule enabled and running - Inactive - Rule disabled


Use Cases

Use Case 1: Auto-Assign New Conversations

Scenario: Business wants to automatically assign new conversations to available agents.

Steps: 1. Go to Automations 2. Click "Create Automation" 3. Set trigger: "conversation.created" 4. Add action: "AUTO_ASSIGN_CONVERSATION" 5. Activate automation 6. Test by creating conversation 7. Verify conversation assigned

Expected Outcome: New conversations automatically assigned to available agents.

Use Case 2: Create Task on Deal Stage Change

Scenario: Sales team wants task created when deal moves to "Negotiation" stage.

Steps: 1. Create automation 2. Set trigger: "deal.stage.changed" 3. Add condition: new_stage equals "Negotiation" 4. Add action: CREATE_TASK 5. Configure task: - Title: "Follow up on negotiation" - Priority: HIGH - Assignee: Sales Manager 6. Activate automation 7. Test by changing deal stage

Expected Outcome: Task created automatically when deal reaches negotiation stage.

Use Case 3: Auto-Reply to Messages

Scenario: Business wants to send automatic reply to messages received outside business hours.

Steps: 1. Create automation 2. Set trigger: "message.received" 3. Add condition: org_time between 18:00 and 09:00 4. Add condition: days_of_week (Monday-Friday) - select checkboxes 5. Add action: REPLY_MESSAGE 6. Choose message type: Text Message 7. Configure message: "Thank you for your message. We'll respond during business hours." 8. Activate automation 9. Test by sending message outside hours

Expected Outcome: Automatic reply sent to messages received outside business hours.

Use Case 6: Reply with Quick Reply Template

Scenario: Business wants to send automated reply using a quick reply template.

Steps: 1. Create automation 2. Set trigger: "message.received" 3. Add condition: content contains "hello" 4. Add action: REPLY_MESSAGE 5. Choose message type: Quick Reply Template 6. Select template from dropdown 7. Activate automation 8. Test by sending "hello" message

Expected Outcome: Quick reply template sent automatically when "hello" detected.

Use Case 7: Filter by Channel Type

Scenario: Business wants different automations for different channels.

Steps: 1. Create automation for WhatsApp 2. Set trigger: "message.received" 3. Add condition: channel_type equals "WHATSAPP_LITE" 4. Add action: CREATE_TASK 5. Configure task for WhatsApp messages 6. Create separate automation for Messenger 7. Set condition: channel_type equals "FB_MESSENGER" 8. Configure different actions for Messenger

Expected Outcome: Channel-specific automations working correctly.

Use Case 4: Tag Contacts Based on Message Content

Scenario: Business wants to tag contacts mentioning "complaint" as "Needs Attention".

Steps: 1. Create automation 2. Set trigger: "message.received" 3. Add condition: content contains "complaint" 4. Add action: ADD_TAG 5. Configure tag: "Needs Attention" 6. Activate automation

Expected Outcome: Contacts automatically tagged when complaint mentioned.

Use Case 5: Webhook Integration

Scenario: Business wants to notify external system when high-value deal created.

Steps: 1. Create automation 2. Set trigger: "deal.created" 3. Add condition: value greater than 10000 4. Add action: HTTP_REQUEST 5. Configure: - URL: https://api.example.com/webhook - Method: POST - Headers: Authorization: Bearer token - Body: deal_id, value, contact_name 6. Activate automation

Expected Outcome: External system notified when high-value deal created.


Test Cases

Test Case 1: Create Automation

Test: Verify automation creation

Steps: 1. Go to Automations 2. Click "Create Automation" 3. Enter rule name 4. Select trigger 5. Add action 6. Configure action 7. Activate automation 8. Save automation 9. Verify automation appears in list

Expected Result: Automation created successfully

Test Case 2: Conditional Logic

Test: Verify condition matching

Steps: 1. Create automation with condition 2. Set condition: message content contains "help" 3. Add action: CREATE_TASK 4. Activate automation 5. Send message with "help" 6. Verify task created 7. Send message without "help" 8. Verify task not created

Expected Result: Conditions match correctly

Test Case 3: Multiple Actions

Test: Verify multiple actions execution

Steps: 1. Create automation 2. Add multiple actions: - CREATE_TASK - ADD_TAG - REPLY_MESSAGE 3. Activate automation 4. Trigger automation 5. Verify all actions executed

Expected Result: All actions executed in sequence

Test Case 4: Time-Based Conditions

Test: Verify time condition matching

Steps: 1. Create automation 2. Set trigger: message.received 3. Add condition: org_time between 18:00 and 09:00 4. Add condition: days_of_week (Monday-Friday) 5. Add action: REPLY_MESSAGE 6. Activate automation 7. Test during specified time 8. Test outside specified time 9. Verify correct behavior

Expected Result: Time conditions work correctly

Test Case 5: Enable/Disable Automation

Test: Verify automation toggle

Steps: 1. Create active automation 2. Disable automation 3. Verify status changed 4. Trigger event 5. Verify automation not executed 6. Enable automation 7. Trigger event 8. Verify automation executed

Expected Result: Enable/disable toggle works correctly


API Integration

Create Automation

Endpoint: POST /rest/v1/automation_rules

Request:

{
 "organization_id": "org-uuid",
 "name": "Auto Assign Conversations",
 "trigger_type": "conversation.created",
 "conditions": [],
 "actions": [
 {
 "type": "AUTO_ASSIGN_CONVERSATION"
 }
 ],
 "is_active": true
}

Update Automation

Endpoint: PATCH /rest/v1/automation_rules/{id}

Request:

{
 "is_active": false
}


Best Practices

  1. Automation Design
  2. Keep automations focused
  3. Use clear naming
  4. Test before activating
  5. Document automation purpose

  6. Condition Logic

  7. Use specific conditions
  8. Avoid overly broad conditions
  9. Test condition matching
  10. Use time conditions wisely

  11. Action Selection

  12. Choose appropriate actions
  13. Configure actions completely
  14. Test action execution
  15. Monitor automation performance

  16. Performance

  17. Limit automation complexity
  18. Use efficient conditions
  19. Monitor execution time
  20. Review automation logs

  21. Maintenance

  22. Review automations regularly
  23. Update outdated automations
  24. Disable unused automations
  25. Monitor automation success rates

Troubleshooting

Automation Not Triggering

Issue: Automation not executing

Solutions: - Check automation status (must be active) - Verify trigger type matches event - Check condition matching - Review automation logs

Actions Not Executing

Issue: Actions not performing

Solutions: - Verify action configuration - Check action requirements - Review error logs - Test actions individually



Last Updated: January 2025