new_releases التعديلات: يمكنك الاطّلاع على
ملاحظات الإصدار للتعرّف على الميزات الجديدة وتحديثات المنتجات.
UserEvent
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
حدث وقع على جهاز المستخدم الذي يستخدم خدمات الاتصالات التفاعلية (RCS) وكان مرتبطًا بمحادثة مع الوكيل
على سبيل المثال، يمكن أن يشير الحدث إلى أنّ المستخدم يكتب أو أنّه قرأ رسالة سابقة من الموظف.
يظهر UserEvent في حقل "البيانات" الخاص بعنصر "الرسالة" الذي يتلقّاه الوكيل من اشتراكه في Google Pub/Sub. الحقل "data" هو سلسلة مرمّزة بترميز base64 يجب أن يفكّ الوكيل ترميزها لتتطابق مع بنية UserEvent.
تمثيل JSON |
{
"senderPhoneNumber": string,
"eventType": enum (UserEvent.EventType ),
"eventId": string,
"messageId": string,
"sendTime": string,
"agentId": string
} |
الحقول |
senderPhoneNumber |
string
رقم هاتف المستخدم المعنيّ بالحدث (بتنسيق E.164)
|
eventType |
enum (UserEvent.EventType )
نوع الحدث.
|
eventId |
string
معرّف حدث فريد، يتم تعيينه من خلال تطبيق RCS الخاص بالمستخدم المُرسِل.
|
messageId |
string
معرّف الرسالة المرتبطة بالحدث. على سبيل المثال، رسالة تم تسليمها إلى برنامج RCS الخاص بالمستخدم أو قرأها المستخدم. يتم ملء هذا الحقل لحدثَي DELIVERED وREAD.
|
sendTime |
string (Timestamp format)
الوقت الذي يرسل فيه برنامج RCS الحدث يستخدم هذا النوع RFC 3339، حيث سيكون الناتج الذي يتم إنشاؤه دائمًا عاديًا وموحّدًا حسب المنطقة الزمنية Z، وسيستخدم 0 أو 3 أو 6 أو 9 أرقام كسرية. يتم أيضًا قبول الإزاحات غير "Z". أمثلة: "2014-10-02T15:01:23Z" أو "2014-10-02T15:01:23.045123456Z" أو "2014-10-02T15:01:23+05:30"
|
agentId |
string
المعرّف الفريد للوكيل. يتم ضبطها من خلال ميزة "الرسائل من الشركات من RCS".
|
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-08-22 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-22 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eUserEvents indicate user actions within an RCS conversation with an agent, such as typing or reading a message.\u003c/p\u003e\n"],["\u003cp\u003eThese events are transmitted to the agent within the base64-encoded "data" field of the "message" object from Google Pub/Sub.\u003c/p\u003e\n"],["\u003cp\u003eThe UserEvent structure includes details like \u003ccode\u003esenderPhoneNumber\u003c/code\u003e, \u003ccode\u003eeventType\u003c/code\u003e, \u003ccode\u003eeventId\u003c/code\u003e, \u003ccode\u003emessageId\u003c/code\u003e, \u003ccode\u003esendTime\u003c/code\u003e, and \u003ccode\u003eagentId\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003emessageId\u003c/code\u003e specifies the message associated with the event, which is only populated for DELIVERED and READ event types.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003esendTime\u003c/code\u003e field details when the event occurred, formatted according to RFC 3339.\u003c/p\u003e\n"]]],[],null,["# UserEvent\n\nAn event that occurred on the user's RCS client and was related to a conversation with the agent.\n\nFor instance, an event can indicate that the user is typing or that an earlier message from the agent was read by the user.\n\nThe UserEvent appears in the \"data\" field of the \"message\" object that the agent receives from its Google Pub/Sub subscription. The \"data\" field is a base64-encoded string that the agent must decode to match the UserEvent structure.\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"senderPhoneNumber\": string, \"eventType\": enum (/business-communications/rcs-business-messaging/reference/rest/v1/UserEvent.EventType), \"eventId\": string, \"messageId\": string, \"sendTime\": string, \"agentId\": string } ``` |\n\n| Fields ||\n|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `senderPhoneNumber` | `string` Phone number (in E.164 format) of the user involved in the event. |\n| `eventType` | `enum (`[UserEvent.EventType](/business-communications/rcs-business-messaging/reference/rest/v1/UserEvent.EventType)`)` Type of the event. |\n| `eventId` | `string` A unique event ID, assigned by the sending user's RCS client. |\n| `messageId` | `string` The ID of the message that is associated with the event. For example, a message that was delivered to the user's RCS client or read by the user. This field is populated for DELIVERED and READ events. |\n| `sendTime` | `string (`[Timestamp](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp)` format)` Time at which RCS client sends the event. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than \"Z\" are also accepted. Examples: `\"2014-10-02T15:01:23Z\"`, `\"2014-10-02T15:01:23.045123456Z\"` or `\"2014-10-02T15:01:23+05:30\"`. |\n| `agentId` | `string` The agent's unique identifier. Set by RCS Business Messaging. |"]]