# Tích hợp với Wordpress - Contact Form to Any API

> **Bước 2:** Chọn **Tags** cần tìm là **Contact Form to Any API**, chọn **Install Now.** Sau khi đã Install thành công, chọn **Active.** Lúc này, thanh công cụ bên trái sẽ xuất hiện tính năng "**CF7 to Any API**"

<figure><img src="/files/ttMmCFIzJoZ9wH9epQfE" alt=""><figcaption><p>Install và Activate Contact Form to Any API</p></figcaption></figure>

<figure><img src="/files/kEwh1Asv0aSuL1lRZxoY" alt=""><figcaption><p> Thanh công cụ bên trái xuất hiện tính năng "<strong>CF7 to Any API</strong>"</p></figcaption></figure>

> **Bước 3:** Sau đó chọn vào phần tính năng "**CF7 to Any API**" và chọn "**Add New CF7 API**".

<figure><img src="/files/zGMNqSk5yOq85ePKEy6P" alt=""><figcaption><p>Chọn "<strong>Add New CF7 API</strong>"</p></figcaption></figure>

> **Bước 4:** Cấu hình kết nối

<figure><img src="/files/yDD8GwT66UEys8vxyFOT" alt=""><figcaption><p>(1) đến (6) - Cấu hình tên, form, đường dẫn và phương thức kết nối</p></figcaption></figure>

<figure><img src="/files/cyN1ySBpPjfgpOwq0bpD" alt=""><figcaption><p>(7) - Mapping Fields</p></figcaption></figure>

{% hint style="info" %}
**Hướng dẫn:**

<mark style="color:red;">**(1)**</mark> Đặt tên cho kết nối intergration (tuỳ ý)

<mark style="color:red;">**(2)**</mark> Select Contact Form: Chọn Form mong muốn đổ data về EMS

<mark style="color:red;">**(3)**</mark> API Url: Là đường dẫn url api mà bạn sẽ ghi nhận dữ liệu từ Wordpress.&#x20;

-> Điền API Url theo mẫu: *<mark style="color:blue;">**tên miền**</mark>**&#x20;\*\*\*\*+ "/rest/v11\_3/captureLead".***

Ví dụ: Trung tâm ABC English có tên miền sử dụng EMS là **abc.dotb.cloud** thì API Url là: <https://abc.dotb.cloud/rest/v11\\_3/captureLead>

<mark style="color:red;">**(4)**</mark> Header Request -> **application/json**

<mark style="color:red;">**(5)**</mark> Input Type -> **json**

<mark style="color:red;">**(6)**</mark> Method -> **POST**

<mark style="color:red;">**(7)**</mark>**&#x20;Map your Fields**: Điền các trường trên EMS ứng với các field được cấu hình trong Form (in đậm trên hình)

Lưu ý: Bạn có thể tham khảo Bảng đồng bộ các trường thông tin từ Form Wordpress về EMS theo hình bên dưới hoặc truy cập vào <<[Link](https://documenter.getpostman.com/view/16479735/UVsTs3DA)>> để theo dõi thêm.
{% endhint %}

<figure><img src="/files/nFJH2I6xxXPMcbOaq2VZ" alt=""><figcaption><p>Bảng đồng bộ các trường thông tin từ Wordpress về EMS</p></figcaption></figure>

> **Bước 5:** Tiếp đến vào phân hệ Contact, nhấn chọn Contact Forms và chọn form cần cấu hình.

![](/files/-M48TeJxoWD9BRH8iv_o)

<figure><img src="/files/sUZ59JpeOdmqwlO1Omwe" alt=""><figcaption><p>Cấu hình Form</p></figcaption></figure>

{% hint style="info" %}
**Lưu ý thêm:** Trong phần cấu hình Form, bạn có thể cấu hình một số input ẩn mặc định bằng câu lệnh hidden - default:

Ví dụ 1: \[hidden **type** default:"**lead**"]

-> Điều này có nghĩa field Type mặc định có giá trị là "lead" - dữ liệu sẽ được đổ về module Lead trên EMS

Ví dụ 2: \[hidden **channel** default:"**Website**"]

-> Tương tự, field **channel** mặc định có giá trị là "**Website**" - thông tin Channel của Học Viên trên EMS sẽ là "Website"
{% endhint %}

> **Bước 6**: Chọn **Save** để hoàn thành. Tới đây, khi khách hàng điền form thì dữ liệu sẽ được đồng bộ về EMS

<figure><img src="/files/Q8DG9TrzwJlVGPdU6riT" alt=""><figcaption><p>Đồng bộ thành công về EMS</p></figcaption></figure>

> Ngoài ra, bạn có thể theo dõi lịch sử đồng bộ để kiểm tra những lần đăng ký có thành công hay không, những dữ liệu gì được đồng bộ... trong phần **Logs** của mục **CF7 to Any API**

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


---

# 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://ems.help.dotb.vn/nhom-tinh-nang-tiep-thi/tich-hop-landing-page-website/tich-hop-voi-wordpress-contact-form-to-any-api.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.
