پیامهای کسب و کار Google را در 31 ژوئیه 2024 متوقف میکنیم. اطلاعات بیشتر را
اینجا بخوانید.
Context
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
داده های متنی مرتبط با یک پیام.
نمایندگی JSON |
---|
{
"entryPoint": enum (EntryPoint ),
"userInfo": {
object (UserInfo )
},
"widget": {
object (Widget )
},
"resolvedLocale": string,
"customContext": string,
// Union field place can be only one of the following:
"placeId": string,
"nearPlaceId": string
// End of list of possible types for union field place .
} |
فیلدها |
---|
entryPoint | enum ( EntryPoint ) نقطه ورودی که کاربر روی آن کلیک کرده است. |
userInfo | object ( UserInfo ) هویت کاربری که پیام را نوشته است. |
widget | object ( Widget ) اطلاعاتی درباره ویجت مورد استفاده برای شروع مکالمه. |
resolvedLocale | string منطقه حل شد. مطابقت زبان های کاربر و عامل پشتیبانی شده بر اساس مکان، ترجیح زبان احتمالی و سایر عوامل. مقدار محلی یک تگ زبان IETF BCP 47 است که به خوبی شکل گرفته است. |
customContext | string داده های زمینه مشخص شده توسط شریک. |
place میدان اتحادیه . PlaceId یا nearPlaceId را می توان تنظیم کرد. place فقط می تواند یکی از موارد زیر باشد: |
placeId | string شناسه مکان یا شناسه منحصر به فرد مورد استفاده در Google Places برای مکان. |
nearPlaceId | string شناسه مکان یا شناسه منحصربهفرد مورد استفاده در Google Places، نزدیکترین مکان به کاربر. |
UserInfo
داده های هویت کاربر مرتبط با یک پیام.
نمایندگی JSON |
---|
{
"displayName": string,
"userDeviceLocale": string
} |
فیلدها |
---|
displayName | string نام نمایشی کاربر |
userDeviceLocale | string محل کاربر. توسط تنظیمات زبان دستگاه تعیین می شود. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eContextual data provides information about the user, entry point, widget, locale, and custom data associated with a message.\u003c/p\u003e\n"],["\u003cp\u003eUser info includes the user's display name and device locale.\u003c/p\u003e\n"],["\u003cp\u003eWidget details encompass the URL and context string of the widget used to initiate the conversation.\u003c/p\u003e\n"],["\u003cp\u003eResolved locale represents a match between user and agent locales based on location and language preferences.\u003c/p\u003e\n"],["\u003cp\u003eCustom and location context can be included as strings or Place IDs respectively, to provide additional data.\u003c/p\u003e\n"]]],[],null,["# Contextual data associated with a message.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"entryPoint\": enum (/business-communications/business-messages/reference/rest/v1/EntryPoint), \"userInfo\": { object (/business-communications/business-messages/reference/rest/v1/Context#UserInfo) }, \"widget\": { object (/business-communications/business-messages/reference/rest/v1/Context#Widget) }, \"resolvedLocale\": string, \"customContext\": string, // Union field `place` can be only one of the following: \"placeId\": string, \"nearPlaceId\": string // End of list of possible types for union field `place`. } ``` |\n\n| Fields ||\n|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `entryPoint` | `enum (`[EntryPoint](/business-communications/business-messages/reference/rest/v1/EntryPoint)`)` The entry point that the user clicked. |\n| `userInfo` | `object (`[UserInfo](/business-communications/business-messages/reference/rest/v1/Context#UserInfo)`)` Identity of the user who wrote the message. |\n| `widget` | `object (`[Widget](/business-communications/business-messages/reference/rest/v1/Context#Widget)`)` Information about the widget used to start the conversation. |\n| `resolvedLocale` | `string` Resolved locale. A match of user and supported agent locales based on location, likely language preference, and other factors. The locale value is a well-formed [IETF BCP 47](https://tools.ietf.org/html/bcp47) language tag. |\n| `customContext` | `string` Context data specified by the partner. |\n| Union field `place`. Either placeId or nearPlaceId can be set. `place` can be only one of the following: ||\n| `placeId` | `string` The [Place ID](https://developers.google.com/places/place-id), or unique identifier used in Google Places, for the location. |\n| `nearPlaceId` | `string` The [Place ID](https://developers.google.com/places/place-id), or unique identifier used in Google Places, of the nearest location to the user. |\n\nUserInfo\n--------\n\nUser identity data associated with a message.\n\n| JSON representation |\n|---------------------------------------------------------------|\n| ``` { \"displayName\": string, \"userDeviceLocale\": string } ``` |\n\n| Fields ||\n|--------------------|-----------------------------------------------------------------------|\n| `displayName` | `string` User's display name. |\n| `userDeviceLocale` | `string` User's locale. Determined by the device's language settings. |\n\nWidget\n------\n\nWidget information associated with a message.\n\n| JSON representation |\n|----------------------------------------------------|\n| ``` { \"url\": string, \"widgetContext\": string } ``` |\n\n| Fields ||\n|-----------------|-------------------------------------------------------------------------------------------------------------------|\n| `url` | `string` URL where the widget was integrated. |\n| `widgetContext` | `string` Context string associated with the widget. Specified by the widget's `data-bm-widget-context` attribute. |"]]