# Kết nối Zalo Cloud

## 1. Khớp tham số trên ZNS và POS <a href="#a.-khop-tham-so-tren-zns-va-pancake-pos" id="a.-khop-tham-so-tren-zns-va-pancake-pos"></a>

### **Bước 1:  Đăng nhập/ đăng ký tài khoản ZNS Cloud**&#x20;

[***https://zalo.cloud/zns***](https://zalo.cloud/zns)

<figure><img src="/files/mtk5WCxDWG8xoFXVOQ30" alt=""><figcaption><p>Đăng nhập hoặc đăng ký tài khoản Zalo Cloud</p></figcaption></figure>

### **Bước 2: Khớp tham số trên ZNS và POS**

#### Truy cập **Dịch vụ ZNS** tại mục **Công cụ**

<figure><img src="/files/pB6Z5gzo9lP1OIBnvjlD" alt=""><figcaption><p>Dịch vụ ZNS</p></figcaption></figure>

<figure><img src="/files/zPpZ6aR8G64nx9CL4S0q" alt=""><figcaption><p>Tạo mẫu ZNS</p></figcaption></figure>

#### Tạo nội dung và thêm Nội dung bảng (Lưu ý tham số phần này lấy từ tham số trên POS)

<figure><img src="/files/Kp8g0fKWLjU6EyThlWId" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Gợi ý: Tham số** của Mẫu ZNS Cloud tạo mới ở phần này lấy từ **Tham số** trên [**POS**](https://pos.pancake.vn/)
{% endhint %}

<figure><img src="/files/RpokseLf7IffL9eMBlTi" alt=""><figcaption><p>Tham số trên POS</p></figcaption></figure>

{% hint style="info" %}
**Lưu ý:**

* Cài đặt tham số Zalo ZNS template tương ứng với từ khóa của Pancake POS để đồng bộ dữ liệu.&#x20;
* Các giá trị **liên quan đến tiền** thì để giá trị **Nhãn tùy chỉnh**&#x20;
  {% endhint %}

<figure><img src="/files/81WjFowL945v3sZXj3uP" alt=""><figcaption><p>Cài đặt kỹ thuật khi tạo mẫu ZNS mới</p></figcaption></figure>

## 2.  Kết nối tài khoản Zalo Cloud trên POS  <a href="#b.-ket-noi-tai-khoan-zalo-cloud-tren-pos" id="b.-ket-noi-tai-khoan-zalo-cloud-tren-pos"></a>

#### **Truy cập vào Pancake POS -> Chọn cấu hình -> Cấu hình ứng dụng -> Kết nối** [**Zalo ZNS&#x20;*****Cloud***](https://zalo.cloud/zns?fbclid=IwAR1RlLuRDI8sUyGxdmgs2k8HLiub_9Q4zSMRlnfiI3G4qQHMluxwTezfD_w)***​***

<figure><img src="/files/XkO7xPhcOZPKOADnXi5J" alt=""><figcaption></figcaption></figure>

#### **Đăng nhập liên kết bằng ID và Khóa bí mật**

<figure><img src="/files/LSNU7Wuaz96t6QOzj3Bn" alt=""><figcaption><p>Đăng nhập Kết nối Zalo ZNS Cloud</p></figcaption></figure>

## 3. Kết nối tài khoản Zalo Cloud  <a href="#d.-ket-noi-tai-khoan-zalo-cloud" id="d.-ket-noi-tai-khoan-zalo-cloud"></a>

### **Bước 1**: Đăng nhập [Zalo for developers](https://developers.zalo.me/)

Nếu chưa có bạn vui lòng đăng ký Zalo Cloud.&#x20;

### **Bước 2:** Truy cập vào ứng dụng để lấy ID Cloud

<figure><img src="/files/6lXP8fftN5sBrzpdofw3" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
**Chú ý**: Nếu chưa có ứng dụng liên kết, chọn **Thêm ứng dụng mới**
{% endhint %}

#### Thêm ứng dụng mới

<figure><img src="/files/oNFllXGmZDF6U3MugVhY" alt=""><figcaption><p>Tạo ứng dụng mới</p></figcaption></figure>

<figure><img src="/files/1x7LVa9RxTuspZ9DWPn4" alt=""><figcaption><p>Kích hoạt ứng dụng vừa tạo</p></figcaption></figure>

### **Bước 3:** **Xác thực domain**&#x20;

Chọn **Xác thực Domain**-> Điền **<https://pos.pages.fm/>**

<figure><img src="/files/QVSt8UnmF82rx8Re4Ezf" alt=""><figcaption></figcaption></figure>

### **Bước 4: Điền call back URL**

Chọn **Official Account** -> chọn **Thiết lập chung** -> Điền call back URL&#x20;

**<https://pos.pages.fm/api/v1/zalov4/callback>**

<figure><img src="/files/7AdaPThWYtJdOeeGX3wH" alt=""><figcaption><p>Điền call bank URL</p></figcaption></figure>

### **Bước 5:** Cấu hình Official Account API

Chọn Đăng ký **API Official Account** => chọn [**Official Account API**](https://developers.zalo.me/app/3563284482047234730/permissions?type=2), cài đặt theo nhu cầu sử dụng của bạn.&#x20;

<figure><img src="/files/JndR6xbfPQHD6zVGPzM3" alt=""><figcaption></figcaption></figure>

### **Bước 6:** Liên kết với POS

Lấy **Mã ID và Mã bảo mật** ở mục **Cài đặt** -> Copy hai mã này để nhập vào **POS**

<figure><img src="/files/GkGp8QrXs5VQ0hCNEMJy" alt=""><figcaption><p>Copy ID ứng dụng và Khoá bí mật</p></figcaption></figure>

<figure><img src="/files/F3gLqQgORS7nKDkFi5Ys" alt=""><figcaption><p>Liên kết tại POS</p></figcaption></figure>

### **Bước 7:** Kết nối thành công

Trạng thái của ứng dụng phải là **Đã xác thực.**

Nếu đã xác thực tài khoản Zalo OA trước đó rồi thì trạng thái sẽ auto chuyển thành đã xác thực khi điền xong **ID ứng dụng** và **khóa bí mật**

<figure><img src="/files/Pmjw9i58pwDwQjSZwhBR" alt=""><figcaption></figcaption></figure>

Để kết nối Zalo Cloud, bạn cần được xác thực **Zalo OA** (Tài khoản Official Account) phải được xác thực mới có thể sử dụng tính năng này. [**Xem hướng dẫn tại đây**](https://oa.zalo.me/home/resources/guides/lam-the-nao-de-xac-thuc-tai-khoan-oa-thanh-cong_74).

<figure><img src="/files/rUm0SXwB68OEqjTtDinn" alt=""><figcaption><p>Hướng dẫn xác thực tài khoản OA</p></figcaption></figure>

## **4. Cấu hình thông báo Zalo ZNS** <a href="#e.-cau-hinh-thong-bao-zalo-zns" id="e.-cau-hinh-thong-bao-zalo-zns"></a>

Tại mục **Cấu hình** trên POS -> chọn **Cấu hình thông báo** -> chọn **Zalo ZNS/ SMS**

Sau khi liên kết tích hợp ứng dụng **Zalo ZNS Cloud***,* ta cấu hình mẫu tin nhắn ở cấu hình tin nhắn. Truy cập [Cấu hình tin nhắn Pancake](https://docs.pos.pages.fm/pos/ung-dung-mo-rong/pages/5HLZbLDpUOcGnpcCJI61#id-1.2-cau-hinh-thong-bao) để tham khảo cách cấu hình mẫu tin nhắn gửi qua Zalo OA.


---

# Agent Instructions: 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://docs.pos.pages.fm/pos/ung-dung-mo-rong/ket-noi-zalo-cloud.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.
