پیامهای کسب و کار Google را در 31 ژوئیه 2024 متوقف میکنیم. اطلاعات بیشتر را
اینجا بخوانید.
UserMessage
پیامی که از یک کاربر به یک نماینده ارسال می شود.
UserMessage
در قسمت data
شیء message
که نمایندگان دریافت می کنند ظاهر می شود. فیلد data
یک رشته کدگذاری شده با base64 است که عوامل باید آن را به بایت تبدیل کرده و با بافر پروتکل UserMessage
تجزیه کنند.
نمایندگی JSON |
---|
{
"requestId": string,
"conversationId": string,
"customAgentId": string,
"agent": string,
"context": {
object (Context )
},
"sendTime": string,
"dialogflowResponse": {
object (DialogflowResponse )
},
// Union field payload can be only one of the following:
"message": {
object (Message )
},
"receipts": {
object (Receipts )
},
"userStatus": {
object (UserStatus )
},
"surveyResponse": {
object (SurveyResponse )
},
"suggestionResponse": {
object (SuggestionResponse )
},
"authenticationResponse": {
object (AuthenticationResponse )
}
// End of list of possible types for union field payload .
} |
فیلدها |
---|
requestId | string شناسه منحصر به فرد پیام کاربر. از این فیلد برای حذف مجدد پیام های دریافتی استفاده کنید. |
conversationId | string شناسه منحصر به فرد مکالمه. |
customAgentId | string یک شناسه سفارشی برای عامل. تعریف شده توسط شریک در هنگام ثبت نام نماینده. |
agent | string شناسه عامل تنظیم در هنگام ایجاد عامل. |
context | object ( Context ) داده های متنی مرتبط با پیام. |
sendTime | string ( Timestamp format) زمان ارسال پیام یک مهر زمانی در قالب RFC3339 UTC "Zulu"، با وضوح نانوثانیه و حداکثر نه رقم کسری. مثالها: "2014-10-02T15:01:23Z" و "2014-10-02T15:01:23.045123456Z" . |
dialogflowResponse | object ( DialogflowResponse ) پاسخ Dialogflow. |
payload میدان اتحادیه بار پیام کاربر. payload می تواند تنها یکی از موارد زیر باشد: |
message | object ( Message ) محتوای پیام. |
receipts | object ( Receipts ) محتوای رسیدها. |
userStatus | object ( UserStatus ) محتوای وضعیت کاربر. |
surveyResponse | object ( SurveyResponse ) پاسخ نظرسنجی |
suggestionResponse | object ( SuggestionResponse ) پاسخ پیشنهاد. |
authenticationResponse | object ( AuthenticationResponse ) پاسخ احراز هویت |
وضعیت کاربر
نمایندگی JSON |
---|
{
"createTime": string,
// Union field status can be only one of the following:
"isTyping": boolean,
"requestedLiveAgent": boolean
// End of list of possible types for union field status .
} |
فیلدها |
---|
createTime | string ( Timestamp format) زمانی که وضعیت کاربر تغییر کرد. یک مهر زمانی در قالب RFC3339 UTC "Zulu"، با وضوح نانوثانیه و حداکثر نه رقم کسری. مثالها: "2014-10-02T15:01:23Z" و "2014-10-02T15:01:23.045123456Z" . |
status میدان اتحادیه status فقط می تواند یکی از موارد زیر باشد: |
isTyping | boolean این که آیا کاربر در حال تایپ است. |
requestedLiveAgent | boolean اینکه آیا کاربر یک نماینده زنده درخواست کرده است یا خیر. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-01-18 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-01-18 بهوقت ساعت هماهنگ جهانی."],[[["Agents receive user messages within the `data` field of a `message` object, encoded as base64 strings."],["Agents need to decode the `data` field and parse it using the `UserMessage` protocol buffer to access the message content."],["The `UserMessage` object contains various fields like `requestId`, `conversationId`, `agent`, `context`, and more to provide context about the message."],["The `payload` field within `UserMessage` can contain different types of user interactions, such as a regular message, receipts, user status (like typing or requesting a live agent), survey responses, suggestion responses, and authentication responses."],["`UserStatus` provides information about the user's current state, including whether they are typing or have requested a live agent."]]],[]]