> For the complete documentation index, see [llms.txt](https://help.pangocdp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.pangocdp.com/user-guide/module-dma/automation/workflows/tao-workflow.md).

# Tạo Workflow

Tài liệu hướng dẫn bạn tạo một WorkFlow cơ bản bằng DMA trên PangoCDP.

## Giới thiệu

Workflow (hay còn gọi là quy trình làm việc) là một chuỗi các bước được thiết kế để tự động hóa hoặc hướng dẫn một quy trình nghiệp vụ nhất định. Trong hệ thống DMA trên PangoCDP, Workflow giúp người vận hành xác định và thực hiện các hành động cụ thể dựa trên điều kiện, sự kiện hoặc hành vi của người dùng, ví dụ như gửi tin nhắn, cập nhật dữ liệu, hoặc chuyển hướng người dùng đến các bước tiếp theo.

## Các bước thực hiện

### Bước 1: Tạo Flow

* Vào [Module DMA](https://dma.mydatalakes.com/flows)
* &#x20;Chọn Automation / Workflows
* Chọn <img src="https://3611282794-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMnAYUMyvVmco94ZeJ3T3%2Fuploads%2F9cRVb6cXVgy4kR26Oiwy%2Fimage.png?alt=media&amp;token=009da721-35a0-443e-a09b-0c58ec7dae1e" alt="" data-size="line"> để tạo flow mới

<figure><img src="https://3611282794-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMnAYUMyvVmco94ZeJ3T3%2Fuploads%2FWhZwVF8Y08fwmXrSAk7h%2Fimage.png?alt=media&amp;token=df60eec5-f41c-4a86-a97f-ba3fbc6e5f1f" alt=""><figcaption></figcaption></figure>

* Sau khi hoàn thành điền thông tin, chọn “Add & Close” để tạo workflow hoặc “Cancel” để huỷ bỏ.

<table><thead><tr><th width="222">Trường thông tin</th><th>Ý nghĩa</th></tr></thead><tbody><tr><td>Name</td><td>Tên của workflow được tạo</td></tr><tr><td>Description</td><td>Mô tả dành cho workflow</td></tr><tr><td>Valid to time</td><td>Sau khi chọn thời gian thì workflow sẽ được thực thi từ lúc tạo đến khoảng thời gian được chọn</td></tr><tr><td>Tag</td><td>Gắn tag cho workflow dễ dàng cho việc tìm kiếm</td></tr><tr><td>Workflow key</td><td>Hệ thống sẽ tự tạo workflow key sau khi tạo workflow (không điền thông tin vào ô này)</td></tr></tbody></table>

<figure><img src="https://3611282794-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMnAYUMyvVmco94ZeJ3T3%2Fuploads%2F9N1v0wmmG2fTmivch3ek%2Fimage.png?alt=media&amp;token=5ac9728b-c391-448a-af40-96272b687422" alt=""><figcaption></figcaption></figure>

### Bước 2: Khởi tạo Start Flow

Ở đây dùng Start Flow với element là "Start With Data Model" , sau đó chọn các trường thông tin liên quan như đã được hướng dẫn trong tài liệu sau:

{% embed url="<https://help.pangocdp.com/user-guide/module-dma/automation/elements/start-with>" %}

<figure><img src="https://3611282794-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMnAYUMyvVmco94ZeJ3T3%2Fuploads%2FFgmCZ98OND4CsqUtsqws%2Fimage.png?alt=media&amp;token=79bd1360-059b-4fc4-8253-5db56f5a0261" alt=""><figcaption></figcaption></figure>

### Bước 3: Khởi tạo Action Flow

Ở đây dùng Action - Send Message là " Send Zalo UUId", sau khi chọn các thông tin và mẫu tin như đã được hướng dẫn trong tài liệu bên dưới:

{% embed url="<https://help.pangocdp.com/user-guide/module-dma/automation/elements/send-message>" %}

<figure><img src="https://3611282794-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMnAYUMyvVmco94ZeJ3T3%2Fuploads%2FH3oMJUIboApjq62EtqDz%2Fimage.png?alt=media&amp;token=e7fb62f2-3805-45c5-9d77-e8dc09daa4f4" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3611282794-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMnAYUMyvVmco94ZeJ3T3%2Fuploads%2F8YMBobuRFgdwjnZ6uSdH%2Fimage.png?alt=media&amp;token=666d78a2-aba6-4d17-8ff7-cdb566063662" alt=""><figcaption></figcaption></figure>

### Bước 4: Kích hoạt và Run

Nhấn "Save" / "Publish" / "Active" để hoàn thành

<figure><img src="https://3611282794-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMnAYUMyvVmco94ZeJ3T3%2Fuploads%2FdobKHodI8lpHWq1JdOuF%2Fimage.png?alt=media&amp;token=4edcfa25-d6ae-4097-a3fb-fe50ded567f7" alt=""><figcaption></figcaption></figure>
