Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Cho đến khi bạn chạy tác nhân, tác nhân này chỉ có thể giao tiếp với các thiết bị kiểm thử đã chỉ định. Điều này cho phép bạn kiểm thử tác nhân của mình trong nội bộ, đồng thời ngăn chặn việc người dùng cuối vô tình truy cập sớm.
Để giao tiếp với một nhân viên hỗ trợ RBM, thiết bị thử nghiệm cần bật tính năng RCS. Lưu ý rằng một số thiết bị Android không bật RCS theo mặc định. Bạn có thể kiểm tra trạng thái RCS của thiết bị và nếu cần, hãy bật RCS bằng cách định cấu hình thiết bị bằng các phiên bản thử nghiệm của ứng dụng Tin nhắn và Carrier Services.
Khi thiết bị của bạn bật RCS, bạn có thể gửi yêu cầu người kiểm thử để mời thiết bị đó kiểm thử nhân viên hỗ trợ. Sau khi thiết bị chấp nhận yêu cầu, thiết bị có thể nhận và phản hồi tin nhắn từ tác nhân chưa khởi chạy.
Một tác nhân có thể gửi 20 yêu cầu kiểm thử mỗi ngày với tổng số tối đa 200 yêu cầu kiểm thử. Nếu bạn thêm người kiểm thử thông qua API RBM và gửi hơn 200 yêu cầu, thì nền tảng RBM sẽ trả về một phản hồi 429 RESOURCE_EXHAUSTED.
Kiểm tra trạng thái RCS của thiết bị
Trong ứng dụng Tin nhắn, hãy chuyển đến phần Cài đặt tin nhắn.
Nhấn vào mục Cuộc trò chuyện RCS. Nếu bạn không tìm thấy mục "Nhắn tin qua RCS (Dịch vụ giao tiếp đa dạng)", hãy nhấn vào Các tính năng trò chuyện.
Tìm giá trị Trạng thái.
Nếu Trạng thái là Đã kết nối, thì RCS đang hoạt động trên thiết bị của bạn.
Các bước tiếp theo
Nếu RCS đang hoạt động trên thiết bị của bạn, bạn đã sẵn sàng gửi yêu cầu cho người kiểm thử. Nếu RCS không hoạt động trên thiết bị, bạn cần bật RCS trên thiết bị trước khi có thể bắt đầu thử nghiệm tác nhân RBM.
Để mời một thiết bị hỗ trợ RCS trở thành người thử nghiệm, bạn cần gửi yêu cầu người thử nghiệm.
Nếu thiết bị chấp nhận yêu cầu, thì tác nhân của bạn có thể gửi tin nhắn, sự kiện và yêu cầu đến thiết bị.
Nếu thiết bị không bật RCS, chưa phản hồi yêu cầu của người kiểm thử hoặc từ chối yêu cầu, thì tác nhân của bạn sẽ nhận được lỗi 403 PERMISSION_DENIED khi cố gắng giao tiếp với thiết bị.
Cách 1: Gửi yêu cầu người kiểm thử bằng Bảng điều khiển dành cho nhà phát triển của Business Communications
Mở Business Communications Developer Console (Bảng điều khiển dành cho nhà phát triển thông tin liên lạc của doanh nghiệp), đăng nhập bằng Tài khoản Google RBM của bạn rồi nhấp vào nhân viên hỗ trợ.
Trong bảng điều hướng bên trái, hãy nhấp vào Thiết bị.
Đối với phần Thêm thiết bị thử nghiệm, hãy nhập số điện thoại của thiết bị rồi nhấp vào Thêm.
Danh sách thiết bị thử nghiệm trình bày chi tiết trạng thái yêu cầu của người kiểm thử đối với từng thiết bị mà bạn mời để kiểm thử trợ lý.
Cách 2: Gửi yêu cầu người kiểm thử bằng API RBM
Mã sau đây sẽ gửi một yêu cầu kiểm thử. Để biết các tuỳ chọn định dạng và giá trị, hãy xem phones.testers.
// Reference to RBM API helper
const rbmApiHelper = require('@google/rcsbusinessmessaging');
// Send the tester invite to the device
rbmApiHelper.sendTesterInvite('+12223334444', function(response) {
console.log(response);
});
import com.google.rbm.RbmApiHelper;
…
try {
// Create an instance of the RBM API helper
RbmApiHelper rbmApiHelper = new RbmApiHelper();
// Register the device as a tester
rbmApiHelper.registerTester("+12223334444");
} catch(Exception e) {
e.printStackTrace();
}
# Reference to RBM Python client helper
from rcs_business_messaging import rbm_service
# Send the tester invite to a device
rbm_service.invite_tester('+12223334444')
using RCSBusinessMessaging;
…
// Create an instance of the RBM API helper
RbmApiHelper rbmApiHelper = new RbmApiHelper(credentialsFileLocation,
projectId);
// Register the device as a tester
rbmApiHelper.RegisterTester("+12223334444");
Sau khi thiết bị chấp nhận yêu cầu của người kiểm thử, thiết bị đó sẽ trở thành thiết bị kiểm thử được chỉ định cho nhân viên hỗ trợ của bạn. Bạn có thể gửi
tin nhắn,
sự kiện và
quy trình kiểm tra chức năng
cho thiết bị của mình để kiểm thử chức năng và quy trình làm việc của trợ lý.
Xoá thiết bị thử nghiệm
Khi bạn xoá một thiết bị thử nghiệm, thiết bị đó không thể nhận tin nhắn từ nhân viên hỗ trợ mà bạn chưa ra mắt nữa. Nền tảng RBM không xoá các tin nhắn do tác nhân của bạn gửi đang trong quá trình truyền đến hoặc được lưu trữ trên thiết bị thử nghiệm.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2024-11-06 UTC."],[[["\u003cp\u003eBefore launching your agent, it can only communicate with designated test devices to allow for internal testing and prevent accidental access by end-users.\u003c/p\u003e\n"],["\u003cp\u003eTo interact with an RBM agent, a test device must have RCS enabled, which can be verified and activated through the device's Messages app settings.\u003c/p\u003e\n"],["\u003cp\u003eAn agent can invite a device to be a tester by sending a tester request, and once accepted, the device can receive and respond to messages from the agent, but there is a limit of 20 tester requests per day, and a total of 200 requests.\u003c/p\u003e\n"],["\u003cp\u003eTester requests can be sent through the Business Communications Developer Console or via the RBM API, with examples provided for cURL, Node.js, Java, Python, and C#.\u003c/p\u003e\n"],["\u003cp\u003eAfter a test device is no longer needed for testing, it can be removed through the Business Communications Developer Console, preventing it from receiving messages from the agent, although messages in transit or stored will not be removed.\u003c/p\u003e\n"]]],[],null,["Until you\n[launch](/business-communications/rcs-business-messaging/guides/launch) your\nagent, it can only communicate with designated test devices. This allows you to\ntest your agent internally while preventing accidental early access to\nend-users.\n\nTo communicate with an RBM agent, a test device needs to be RCS-enabled. Note\nthat some Android devices don't have RCS enabled by default. You can\ncheck the [RCS status](#check-rcs) of your device and, if necessary, [enable\nRCS](#enable-rcs) by configuring your device with pre-release versions of the\nMessages and Carrier Services apps.\n\nWhen your device is RCS-enabled, you can send a [tester\nrequest](#tester-request) to invite the device to test your agent. Once the\ndevice accepts the request, it can receive and respond to messages from your\nunlauched agent.\n\nAn agent can send 20 tester requests each day with a maximum total of 200\ntester requests. If you add testers through the RBM API and you send more\nthan 200 requests, the RBM platform returns a `429 RESOURCE_EXHAUSTED` response.\n| **Note:** After you launch your agent, it can communicate to any RCS-enabled device, not just test devices.\n\nCheck the RCS status of your device\n\n1. In the Messages app, navigate to **Messages settings**.\n2. Tap **RCS chats** . If you can't find \"RCS chats\", tap **Chat features**.\n3. Find the **Status** value.\n\n If **Status** is **Connected**, RCS is active on your device.\n\nNext steps\n\nIf RCS is active on your device, you're ready to send a [tester\nrequest](#tester-request). If RCS is inactive on your device, you need to\n[enable RCS](#enable-rcs) on your device before you can begin testing your RBM\nagent with it.\n\nEnable RCS on your device\n\nTo enable RCS on an Android device, [turn on RCS chats in the Messages app](https://support.google.com/messages/answer/7189714?&ref_topic=9459217&sjid=4666643179640476654-AP).\n\nNext steps\n\nOnce RCS is active on your device, you're ready to send a [tester\nrequest](#tester-request).\n\nSend a tester request\n\nTo invite an RCS-enabled device to become a tester, you send a tester request.\nIf the device accepts the request, your agent can send messages, events, and\nrequests to the device.\n\nIf the device isn't RCS-enabled, hasn't responded to the tester request, or\ndeclines the request, your agent receives a `403 PERMISSION_DENIED`\nerror when it attempts to communicate with the device.\n\nOption 1: Send a tester request with the Business Communications Developer Console\n\n1. Open the [Business Communications Developer\n Console](https://business-communications.cloud.google.com?utm_source=/business-communications/rcs-business-messaging/guides/build/test&utm_medium=devsite&utm_campaign=rcs-business-messaging), sign in with your RBM Google account, and click your agent.\n2. In the left navigation, click **Devices**.\n3. For **Add test devices** , enter your device's phone number and click **Add**.\n\n**Test devices list** details the tester request status for each device that you\ninvite to test your agent.\n\nOption 2: Send a tester request with the RBM API\n\nThe following code sends a tester request. For formatting and value options, see\n[`phones.testers`](/business-communications/rcs-business-messaging/reference/rest/v1/phones.testers). \n\ncURL \n\n```console\ncurl -X POST \"https://\u003cvar fieldvalues=\"asia,europe,us\" translate=\"no\"\u003eREGION\u003c/var\u003e-rcsbusinessmessaging.googleapis.com/v1/phones/\u003cvar translate=\"no\"\u003ePHONE_NUMBER\u003c/var\u003e/testers?agentId=AGENT_ID\" \\\n-H \"Content-Type: application/json\" \\\n-H \"User-Agent: curl/rcs-business-messaging\" \\\n-H \"`oauth2l header --json \u003cvar translate=\"no\"\u003ePATH_TO_SERVICE_ACCOUNT_KEY\u003c/var\u003e rcsbusinessmessaging`\"\n```\n\nNode.js \n\n```javascript\n// Reference to RBM API helper\nconst rbmApiHelper = require('@google/rcsbusinessmessaging');\n\n// Send the tester invite to the device\nrbmApiHelper.sendTesterInvite('\u003cvar fieldlabel=\"Phone number\" translate=\"no\"\u003e+12223334444\u003c/var\u003e', function(response) {\n console.log(response);\n});\n```\nThis code is an excerpt from an [RBM sample agent](/business-communications/rcs-business-messaging/samples).\n\nJava \n\n```java\nimport com.google.rbm.RbmApiHelper;\n...\n\ntry {\n // Create an instance of the RBM API helper\n RbmApiHelper rbmApiHelper = new RbmApiHelper();\n\n // Register the device as a tester\n rbmApiHelper.registerTester(\"\u003cvar fieldlabel=\"Phone number\" translate=\"no\"\u003e+12223334444\u003c/var\u003e\");\n} catch(Exception e) {\n e.printStackTrace();\n}\n```\nThis code is an excerpt from an [RBM sample agent](/business-communications/rcs-business-messaging/samples).\n\nPython \n\n```python\n# Reference to RBM Python client helper\nfrom rcs_business_messaging import rbm_service\n\n# Send the tester invite to a device\nrbm_service.invite_tester('\u003cvar fieldlabel=\"Phone number\" translate=\"no\"\u003e+12223334444\u003c/var\u003e')\n```\nThis code is an excerpt from an [RBM sample agent](/business-communications/rcs-business-messaging/samples).\n\nC# \n\n```c#\nusing RCSBusinessMessaging;\n...\n\n// Create an instance of the RBM API helper\nRbmApiHelper rbmApiHelper = new RbmApiHelper(credentialsFileLocation,\n projectId);\n\n// Register the device as a tester\nrbmApiHelper.RegisterTester(\"\u003cvar fieldlabel=\"Phone number\" translate=\"no\"\u003e+12223334444\u003c/var\u003e\");\n```\nThis code is an excerpt from an [RBM sample agent](/business-communications/rcs-business-messaging/samples).\n\nNext steps\n\nAfter the device accepts the tester request, it's a designated test device for\nyour agent. You can send\n[messages](/business-communications/rcs-business-messaging/guides/build/messages/send),\n[events](/business-communications/rcs-business-messaging/guides/build/events), and\n[capability checks](/business-communications/rcs-business-messaging/guides/build/capabilities)\nto your device to test your agent's functionality and workflows.\n\nRemove a test device\n\nWhen you remove a test device, the device can no longer receive messages from\nyour unlaunched agent. The RBM platform doesn't delete messages sent by your\nagent that are in transit to or stored on the test device.\n\n1. Open the [Business Communications Developer\n Console](https://business-communications.cloud.google.com?utm_source=/business-communications/rcs-business-messaging/guides/build/test&utm_medium=devsite&utm_campaign=rcs-business-messaging), sign in with your RBM Google account, and click your agent.\n2. In the left navigation, click **Devices**.\n3. Locate the device in **Test device list** and click the more_vert menu for that list item.\n4. Click **Remove device**."]]