# Hướng dẫn tích hợp RCS vào AntCRM (Guide to Integrating RCS into AntCRM)

## Trường hợp doanh nghiệp đã có partner Google Business Communication <sup><sub>*(The business already has a Google Business Communication partner)*<sub></sup>

Nếu tổ chức của bạn đã có partner RCS, Doanh nghiệp đã được đăng ký và phê duyệt. vui lòng thực hiện theo các bước sau:

*(If your organization already has an RCS partner and your business has been registered and approved, please follow these steps)*

**Bước 1:** Truy cập bảng điều khiển, chọn agent bạn muốn tích hợp

***(Step 1:** Access the dashboard and select the agent you want to integrate.)*

<figure><img src="https://2303854476-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTpJl0u63dzYBMNgXKfR%2Fuploads%2FuFZXxcHCXtqfQskgbraW%2Funknown.png?alt=media&#x26;token=ddc62ebe-c646-4073-bd49-b3cf0034748f" alt=""><figcaption></figcaption></figure>

**Bước 2:** Lấy BrandID và tải về file JSON

***(Step 2:** Get the **Brand ID** and **download the JSON file)***

* Cách lấy BrandID: Vào tab tổng quan, copy đoạn text BrandID theo hình dưới đây \
  \&#xNAN;*(How to get Brand ID: Go to the **Overview** tab and copy the Brand ID text as shown in the image below.)*

<figure><img src="https://2303854476-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTpJl0u63dzYBMNgXKfR%2Fuploads%2F5SDHXFnaCLScSh599Pi0%2Funknown.png?alt=media&#x26;token=a366374e-ad0d-4c06-ac45-f2495fb423da" alt=""><figcaption></figcaption></figure>

* Cách lấy File JSON: Truy cập vào tab **"Service Account"**, sau đó nhấn **"Create Key",** hệ thống tự động **tạo khóa xác thực** và **tải file JSON về thiết bị của bạn**\
  \&#xNAN;*(How to get the JSON file: Go to the "Service Account" tab, then click "Create Key". The system will automatically generate an authentication key and download the JSON file to your device for RCS integration.)*

<figure><img src="https://2303854476-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTpJl0u63dzYBMNgXKfR%2Fuploads%2FYAgytM5KajvWIPo5tSd7%2Fimage.png?alt=media&#x26;token=12a06555-6e1f-423c-aafa-09db79cd830b" alt=""><figcaption></figcaption></figure>

**Bước 3:** Truy cập vào AntCRM, vào phần thiết lập hội thoại đa kênh, chọn kênh RCS, nhấn vào tích hợp

*(**Step 3:** Go to AntCRM → Omnichannel settings → Select the **RCS channel** → Click **“Integrate.”**)*

<figure><img src="https://2303854476-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTpJl0u63dzYBMNgXKfR%2Fuploads%2FZCb0QptBv9JfJr7FTbWb%2Funknown.png?alt=media&#x26;token=0d1196d6-009f-402b-9277-c86385dc5525" alt=""><figcaption></figcaption></figure>

**Bước 4:** Nhấn vào “thêm trang” và dán đoạn text BrandID và tải lên file JSON đã thựuc hiện ở bước 2&#x20;

*(**Step 4:** Click “Add Page”, then paste the Brand ID text and upload the JSON file obtained in Step 2.)*

<figure><img src="https://2303854476-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTpJl0u63dzYBMNgXKfR%2Fuploads%2FY0tbzujHDdro1hMAc17C%2Funknown.png?alt=media&#x26;token=2eb2f2fa-eb0a-47b9-a4d8-e3eba03cf0d6" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2303854476-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTpJl0u63dzYBMNgXKfR%2Fuploads%2FUv0baV1p5qHcP38n7Ro0%2Fimage.png?alt=media&#x26;token=dea66c77-c049-459e-9862-7a740e8e05c4" alt=""><figcaption></figcaption></figure>

Giao diện sau khi tích hợp, nhấn vào icon cài đặt để kích hoạt trang&#x20;

*(Once integrated, the interface will display your RCS page. Click the settings icon to activate the page.)*

<figure><img src="https://2303854476-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTpJl0u63dzYBMNgXKfR%2Fuploads%2FxsSPasPKuofoB0rFaREg%2Funknown.png?alt=media&#x26;token=39525600-e75a-452b-8f80-bbf70f608373" alt=""><figcaption></figcaption></figure>

Hướng dẫn thiết lập RCS trên CRM, [nhấn vào đây](https://docs.antbuddy.com/tai-lieu-antbuddy-huong-dan-su-dung-antbuddy-docs-user-guide/quan-tri-khach-hang-antcrm-antcrm-customer-management/tin-nhan-da-kenh-conversation/rcs-business-messaging/thiet-lap-rcs-tren-crm) để tiếp tục thiết lập trang.

*(Guide to Setting Up RCS on CRM:* [*Click here*](https://docs.antbuddy.com/tai-lieu-antbuddy-huong-dan-su-dung-antbuddy-docs-user-guide/quan-tri-khach-hang-antcrm-antcrm-customer-management/tin-nhan-da-kenh-conversation/rcs-business-messaging/thiet-lap-rcs-tren-crm) *to continue configuring your page)*

## Trường hợp doanh nghiệp chưa có partner Google Business Communication <sup><sub>*(The business does not have a Google Business Communication partner)*<sub></sup>

### 1. Tạo tài khoản Partner trong RBM Console <sup><sub>*(Create a Partner Account in the RBM Console)*<sub></sup>

**Bước 1:** Truy cập link: <https://business-communications.cloud.google.com/console/partner-console> \
\&#xNAN;*(**Step 1:** Visit* [*https://business-communications.cloud.google.com/console/partner-console*](https://business-communications.cloud.google.com/console/partner-console)*)*

Trang này là cổng quản trị chính thức của Google Business Communications, nơi doanh nghiệp hoặc đối tác tạo và quản lý các tác nhân RCS (RBM Agent)\
\&#xNAN;*(This is the official **Google Business Communications Management Portal**, where businesses or partners create and manage their RCS agents (RBM Agents))*

<figure><img src="https://2303854476-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTpJl0u63dzYBMNgXKfR%2Fuploads%2FT5IWAFFIqvCGuvCn9NDv%2Funknown.png?alt=media&#x26;token=4109175b-8474-4f9c-8ecb-c3ff587aff8c" alt=""><figcaption></figcaption></figure>

**Bước 2:** Đăng nhập bằng tài khoản Google

*(**Step 2**: Sign in with your Google account.)*

**Bước 3:** Chọn “Tạo tài khoản đối tác”, → điều hướng đến trang hướng dẫn theo link sau: <https://developers.google.com/business-communications/rcs-business-messaging/guides/get-started/register-partner?hl=vi>

*(**Step 3:** Select **“Create Partner Account”** → You will be redirected to the official guide:*\
[*https://developers.google.com/business-communications/rcs-business-messaging/guides/get-started/register-partner*](https://developers.google.com/business-communications/rcs-business-messaging/guides/get-started/register-partner)*)*

**Bước 4:** Chọn “Đăng ký làm đối tác” và điền form theo [hướng dẫn](https://developers.google.com/business-communications/rcs-business-messaging/guides/get-started/register-partner) của GG business. Sau khi điền đầy đủ thông tin, nhấn Submit.&#x20;

***(Step 4:** Click “Register as a Partner”, fill out the form as guided by Google Business Communications, and then click Submit.)*

<figure><img src="https://2303854476-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTpJl0u63dzYBMNgXKfR%2Fuploads%2FXadFQjvqzsJTTheqzQ0G%2Funknown.png?alt=media&#x26;token=2d8950d1-4c0f-4d2f-8dff-849501fe07c0" alt=""><figcaption></figcaption></figure>

Sau khi đăng ký đối tác được phê duyệt, truy cập vào [Business Communications Developer Console](https://business-communications.cloud.google.com/?utm_source=%2Fbusiness-communications%2Fbusiness-messages%2Fguides%2Fhow-to%2Fagents&%3Butm_medium=devsite&%3Butm_campaign=business-messages\&hl=vi) bằng Tài khoản Google đã đăng ký. Sau đó, thiết lập tài khoản và tạo nhân viên hỗ trợ.

*(After your Partner registration is approved, log in to the Business Communications Developer Console with your registered Google account. Then, set up your partner account and create support agents)*

### 2. Sau khi Partner được duyệt <sup><sub>*(After Partner approval)*<sub></sup>

Sau khi được phê duyệt, bạn **đã trở thành Partner**. Có thể bắt đầu tạo Brand → sau đó tạo Agent → cấu hình Webhook

*(Once approved, you officially **become a Partner** and can start creating Brands, Agents, Webhook)*

#### 2.1. Tạo Brand <sup><sub>*(Create a Brand)*<sub></sup>

Sau khi bạn đã đăng ký tài khoản Partner, Truy cập vào link: [https://business-communications.cloud.google.com/console/partner-console/partner/settings](https://business-communications.cloud.google.com/console/partner-console/partner/settings?partnerId=antbuddy-omnichannel-retail-gkbq0kjr)

*(After registering your Partner account, visit:*\
[*https://business-communications.cloud.google.com/console/partner-console/partner/settings*](https://business-communications.cloud.google.com/console/partner-console/partner/settings)*)*

Điền đầy đủ thông tin theo [hướng dẫn](https://developers.google.com/business-communications/rcs-business-messaging/guides/get-started/partner-account), nhấn Submit. &#x20;

*(Fill in all required information and click **Submit)***

#### 2.2. Tạo agent trên RCS <sup><sub>*(Create an RCS Agent)*<sub></sup>

**Bước 1:** Nhấn vào tạo nhân viên hỗ trợ, điền thông tin theo [hướng dẫn](https://developers.google.com/business-communications/rcs-business-messaging/guides/build/agents?hl=vi)

*(**Step 1:** Click “Create Support Agent” and fill in the required details as instructed)*

<figure><img src="https://2303854476-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTpJl0u63dzYBMNgXKfR%2Fuploads%2FPcAv8nMBhoN4pFOLu6pj%2Funknown.png?alt=media&#x26;token=9aa4445c-ba29-45a4-b6d1-84dd9cb67e60" alt=""><figcaption></figcaption></figure>

Giao diện sau khi tạo agent

*(The interface will show your newly created agent)*

<figure><img src="https://2303854476-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTpJl0u63dzYBMNgXKfR%2Fuploads%2FqQJ8SnZRKvLQT7nK73xx%2Funknown.png?alt=media&#x26;token=d2089a78-880d-4eba-9f2e-1d795afbc067" alt=""><figcaption></figcaption></figure>

**Bước 2:** Chọn Agent bạn mong muốn, vào setup thông tin agent và submit theo [hướng dẫn](https://developers.google.com/business-communications/rcs-business-messaging/guides/build/agents?hl=vi)

*(**Step 2:** Select the agent you want, go to Agent Setup, complete the configuration, and submit as guided)*

<figure><img src="https://2303854476-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTpJl0u63dzYBMNgXKfR%2Fuploads%2FZBvIcvEXlz92prAchaz5%2Funknown.png?alt=media&#x26;token=a404a9ba-1e89-471b-9167-9c0def94527c" alt=""><figcaption></figcaption></figure>

Sau khi hoàn thành setup partner Google Business Communication, thực hiện tương tự [Trường hợp doanh nghiệp đã có partner Google Business Communication](#truong-hop-doanh-nghiep-da-co-partner-google-business-communication)

*(After completing Partner setup Once the Google Business Communication Partner setup is complete, you can follow the same steps as in* [*Case 1*](#truong-hop-doanh-nghiep-da-co-partner-google-business-communication-the-business-already-has-a-googl)*)*

#### 2.3. Tạo agent Webhook

Webhook của agent dùng để **nhận và xử lý các sự kiện từ RCS** như: \
\&#xNAN;*(An agent's webhook is used to receive and handle events from RCS such as)*

* Tin nhắn khách hàng gửi đến\
  *(Incoming messages from customers)*
* Trạng thái tin nhắn \
  \&#xNAN;*(Message status updates)*&#x20;
* Các tương tác với nút bấm, quick reply, carousel, template\
  \&#xNAN;*(Interactions with buttons, quick replies, carousels, and templates)*

**Bước 1:** Tại màn hình **Partner Settings**, vào tab **Settings**, cuộn xuống và tìm mục **Webhook Configuration**, sau đó nhấn **Configure** để thiết lập.

*(**Step 1:** On the Partner Settings screen, go to the Settings tab, scroll down to Webhook Configuration, and click Configure to set it up)*

<figure><img src="https://2303854476-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTpJl0u63dzYBMNgXKfR%2Fuploads%2FxVftHXJyzC1hp3TJicSO%2Fimage.png?alt=media&#x26;token=643cd91b-d1c7-42fc-9e27-f2af8abdcb73" alt=""><figcaption></figcaption></figure>

**Bước 2:** Dán liên kết "<https://beeiq.co/rcs/webhook>" vào trường **Webhook**, nhấn vào icon **refresh** để lấy token, sau đó nhấn **Verify**&#x20;

***(Step 2:** Paste this* [*link* ](https://beeiq.co/rcs/webhook)*into the **Webhook** field, click the **fresh icon** to retrieve the token, and then click **Verify)***

<figure><img src="https://2303854476-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTpJl0u63dzYBMNgXKfR%2Fuploads%2F67SsOoQJulpn8BQUCiqY%2Fimage.png?alt=media&#x26;token=77e5e3ad-5e1b-40e1-ba58-c742e351f284" alt=""><figcaption></figcaption></figure>
