UserEvent
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
उपयोगकर्ता के आरसीएस क्लाइंट पर हुआ कोई ऐसा इवेंट जो एजेंट के साथ हुई बातचीत से जुड़ा था.
उदाहरण के लिए, किसी इवेंट से यह पता चल सकता है कि उपयोगकर्ता टाइप कर रहा है या उसने एजेंट का पिछला मैसेज पढ़ लिया है.
UserEvent, "message" ऑब्जेक्ट के "data" फ़ील्ड में दिखता है. यह ऑब्जेक्ट, एजेंट को 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
इवेंट से जुड़े मैसेज का आईडी. उदाहरण के लिए, ऐसा मैसेज जो उपयोगकर्ता के आरसीएस क्लाइंट को डिलीवर किया गया हो या जिसे उपयोगकर्ता ने पढ़ा हो. यह फ़ील्ड, DELIVERED और READ इवेंट के लिए अपने-आप भर जाता है.
|
sendTime |
string (Timestamp format)
वह समय जब आरसीएस क्लाइंट, इवेंट भेजता है. यह 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 Business Messaging सेट करता है.
|
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-08-22 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-08-22 (UTC) को अपडेट किया गया."],[[["\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. |"]]