2024 年 7 月 31 日をもって、Google ビジネス メッセージはご利用いただけなくなります。詳しくは
こちらをご覧ください。
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 )
メッセージを作成したユーザーの ID。
|
widget |
object (Widget )
会話を開始するために使用されるウィジェットに関する情報。
|
resolvedLocale |
string
解決済みの言語 / 地域。場所、想定される言語設定などの要素に基づく、ユーザーとサポートされているエージェントの言語 / 地域の一致。ロケール値は、正しい形式の IETF BCP 47 言語タグです。
|
customContext |
string
パートナーが指定したコンテキスト データ。
|
共用体フィールド place 。placeId または nearPlaceId を設定できます。place は次のいずれかになります。 |
placeId |
string
ビジネスのプレイス ID、または Google プレイスで使用される一意の識別子。
|
nearPlaceId |
string
ユーザーに最も近い場所のプレイス ID(Google プレイスで使用される一意の識別子)。
|
UserInfo
メッセージに関連付けられたユーザー ID データ。
JSON 表現 |
{
"displayName": string,
"userDeviceLocale": string
} |
フィールド |
displayName |
string
ユーザーの表示名。
|
userDeviceLocale |
string
ユーザーの言語 / 地域。デバイスの言語設定によって決まります。
|
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[[["\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. |"]]