new_releases Bản cập nhật: Kiểm tra
ghi chú phát hành để biết thông tin về các tính năng mới và bản cập nhật sản phẩm.
Method: phones.dialogflowMessages.create
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.
Nhắc nhân viên hỗ trợ Dialogflow gửi tin nhắn thông qua một nhân viên hỗ trợ RBM.
Nếu bạn chưa bật tính năng tích hợp Dialogflow cho một nhân viên hỗ trợ RBM, thì phương thức này sẽ trả về 403 PERMISSION_DENIED
.
Khi một nhân viên hỗ trợ RBM được tích hợp với một nhân viên hỗ trợ Dialogflow, phương thức này sẽ kích hoạt một sự kiện trong nhân viên hỗ trợ Dialogflow đó. Nền tảng RBM định tuyến phản hồi từ Dialogflow đến thiết bị của người dùng và chuyển tin nhắn từ người dùng trở lại nhân viên hỗ trợ Dialogflow.
Nếu ý định Dialogflow xác định nhiều phản hồi, Nền tảng RBM sẽ gửi cho người dùng một thông báo cho mỗi phản hồi đã xác định.
Nếu bạn liên hệ với một webhook có phương thức thực hiện bằng Dialogflow, thì yêu cầu thực hiện sẽ bao gồm những thông tin sau trong tải trọng:
Trường | Mô tả |
rbm_user_phone_number
| Số điện thoại của người dùng. |
rbm_share_location_response
| Thông tin vị trí của người dùng, nếu họ nhấn vào hành động đề xuất chia sẻ vị trí. |
Yêu cầu HTTP
POST https://rcsbusinessmessaging.googleapis.com/v1/{parent=phones/*}/dialogflowMessages
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Thông số |
parent |
string
"phones/{E.164}", trong đó {E.164} là số điện thoại của người dùng
|
Tham số truy vấn
Thông số |
messageIdPrefix |
string
Tiền tố duy nhất của mã tin nhắn RBM do sự kiện Dialogflow tạo ra. Dialogflow hỗ trợ nhiều phản hồi cho một sự kiện nhất định. Nếu một sự kiện kích hoạt nhiều phản hồi, RBM sẽ chuyển tiếp từng phản hồi dưới dạng một thông báo riêng. Mỗi mã nhận dạng thông báo có cùng một tiền tố.
|
agentId |
string
Bắt buộc. Giá trị nhận dạng riêng biệt của nhân viên hỗ trợ.
|
Nội dung yêu cầu
Nội dung yêu cầu chứa một bản sao của DialogflowEvent
.
Nội dung phản hồi
Nếu thành công, nội dung phản hồi sẽ chứa một thực thể mới tạo của DialogflowEvent
.
Phạm vi uỷ quyền
Yêu cầu phạm vi OAuth sau:
https://www.googleapis.com/auth/rcsbusinessmessaging
Để biết thêm thông tin, hãy xem OAuth 2.0 Overview.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\u003cp\u003eThis API method allows a Dialogflow agent to send messages through an RBM agent, requiring Dialogflow integration to be enabled for the RBM agent.\u003c/p\u003e\n"],["\u003cp\u003eWhen triggered, this method initiates an event in the integrated Dialogflow agent, routing responses from Dialogflow to the user and messages from the user back to Dialogflow.\u003c/p\u003e\n"],["\u003cp\u003eIf a Dialogflow intent has multiple responses, the RBM platform will send each response as a separate message to the user.\u003c/p\u003e\n"],["\u003cp\u003eWebhook fulfillment requests from Dialogflow will include the user's phone number and, if provided, their shared location in the payload.\u003c/p\u003e\n"],["\u003cp\u003eThe API request requires specific parameters, including the user's phone number in E.164 format and a unique prefix for RBM message IDs, and requires the \u003ccode\u003ehttps://www.googleapis.com/auth/rcsbusinessmessaging\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],[],null,["# Method: phones.dialogflowMessages.create\n\nPrompts a [Dialogflow](https://dialogflow.com) agent to send messages through an RBM agent.\n\nIf Dialogflow integration isn't enabled for an RBM agent, this method returns `403 PERMISSION_DENIED`.\n\nWhen an RBM agent is integrated with a Dialogflow agent, this method triggers an [event](https://dialogflow.com/docs/events) in the Dialogflow agent. The RBM Platform routes responses from Dialogflow to the user's device and routes messages from the user back to the Dialogflow agent.\n\nIf a Dialogflow [intent](https://dialogflow.com/docs/intents) defines multiple responses, the RBM Platform sends users one message per defined response.\n\nIf you contact a webhook with Dialogflow [fulfillment](https://dialogflow.com/docs/fulfillment), the fulfillment request includes the following information in the payload:\n\n\u003cbr /\u003e\n\n| Field | Description |\n|---------------------------------------------|--------------------------------------------------------------------------|\n| \u003cbr /\u003e `rbm_user_phone_number` \u003cbr /\u003e | The user's phone number. |\n| \u003cbr /\u003e `rbm_share_location_response` \u003cbr /\u003e | The user's location, if they tapped the share location suggested action. |\n\n\u003cbr /\u003e\n\n### HTTP request\n\n`POST https://rcsbusinessmessaging.googleapis.com/v1/{parent=phones/*}/dialogflowMessages`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|---------------------------------------------------------------------|\n| `parent` | `string` \"phones/{E.164}\", where {E.164} is the user's phone number |\n\n### Query parameters\n\n| Parameters ||\n|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `messageIdPrefix` | `string` A unique prefix of RBM message IDs that result from the Dialogflow event. Dialogflow supports multiple responses for a given event. If an event triggers multiple responses, RBM forwards each response as a separate message. Each message ID shares the same prefix. |\n| `agentId` | `string` Required. The agent's unique identifier. |\n\n### Request body\n\nThe request body contains an instance of [DialogflowEvent](/business-communications/rcs-business-messaging/reference/rest/v1/phones.dialogflowMessages#DialogflowEvent).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [DialogflowEvent](/business-communications/rcs-business-messaging/reference/rest/v1/phones.dialogflowMessages#DialogflowEvent).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/rcsbusinessmessaging`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]