> ## Documentation Index
> Fetch the complete documentation index at: https://huongdan.luklak.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cơ bản: Mô hình Trigger-Condition-Action

> Nền tảng logic tự động hóa — Trigger, Condition, Action và các luồng thực thi If/Else, Multi-Path, Branching.

## Logic của Tự động hóa

Mọi quy tắc tự động hóa đều dựa trên 3 phần: **Trigger**, **Condition**, **Action**.

1. **Khi nào** chạy? → Trigger
2. **Nếu** điều kiện đúng... → Condition
3. **Thì** thực hiện... → Action

## Phân tích T-C-A

<Tabs>
  <Tab title="Trigger: 'Khi nào'">
    Sự kiện cụ thể khởi phát quy tắc. Engine liên tục lắng nghe sự kiện này.

    **VD:** "Khi `🧊 Deal` được tạo," "Khi `Trạng thái` của `🧊 Task` chuyển sang `HOÀN THÀNH`," hoặc "Mỗi thứ Hai lúc 9h."

    <Info>
      Xem chi tiết tại [Các loại Trigger](/02-platform/platform-overview/universal-automation/loai-trigger).
    </Info>
  </Tab>

  <Tab title="Condition: 'Nếu'">
    Bộ lọc logic chạy *sau* khi trigger kích hoạt. Đúng điều kiện → Action thực thi. Sai → dừng.

    **VD:** "...NẾU `Giá trị Deal` > 200 triệu VÀ `Nguồn Lead` = 'Website'."

    <Info>
      Condition dùng UQL. Xem [Xây dựng Condition](/02-platform/platform-overview/universal-automation/dieu-kien).
    </Info>
  </Tab>

  <Tab title="Action: 'Thì'">
    Công việc được thực thi khi condition thỏa mãn. Một quy tắc có thể có nhiều action tuần tự.

    **VD:** "...THÌ tạo Sub-Object 'Duyệt Deal VIP', gán cho Sales Manager, gửi tin nhắn vào kênh #sales."

    <Info>
      Xem [Các loại Action](/02-platform/platform-overview/universal-automation/loai-action).
    </Info>
  </Tab>
</Tabs>

## Luồng thực thi nâng cao

<CardGroup cols={3}>
  <Card title="If/Else" icon="arrows-split-up-and-left" iconType="duotone">
    Logic nhị phân. **NẾU** đúng → Action A. **KHÔNG THÌ** → Action B.
  </Card>

  <Card title="Multi-Path" icon="sitemap" iconType="duotone">
    Nhiều nhánh song song. VD: `Ưu tiên = CAO` → thông báo quản lý. `Loại = BUG` → tạo ticket Jira.
  </Card>

  <Card title="Branching" icon="diagram-next" iconType="duotone">
    Khi quy tắc tìm thấy **nhiều** `🧊 Đầu việc`, lặp qua từng cái và áp dụng action riêng.
  </Card>
</CardGroup>

***

## Đọc tiếp

* [Các loại Trigger](/02-platform/platform-overview/universal-automation/loai-trigger)
* [Xây dựng Condition bằng UQL](/02-platform/platform-overview/universal-automation/dieu-kien)
* [Các loại Action](/02-platform/platform-overview/universal-automation/loai-action)
