Context
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Mit einer Nachricht verknüpfte Kontextdaten.
JSON-Darstellung |
{
"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 .
} |
Felder |
entryPoint |
enum (EntryPoint )
Der Einstiegspunkt, auf den der Nutzer geklickt hat.
|
userInfo |
object (UserInfo )
Identität des Nutzers, der die Nachricht geschrieben hat
|
widget |
object (Widget )
Informationen zum Widget, mit dem die Unterhaltung gestartet wurde.
|
resolvedLocale |
string
Sprache wurde aufgelöst. Eine Übereinstimmung der Sprachen von Nutzern und unterstützten Agenten basierend auf dem Standort, der wahrscheinlichen Spracheinstellung und anderen Faktoren. Der Wert für die Sprache ist ein korrekt formatiertes IETF BCP 47-Tag.
|
customContext |
string
Vom Partner angegebene Kontextdaten.
|
Union-Feld place . Es kann entweder „placeId“ oder „nahePlaceId“ festgelegt werden. Für place ist nur einer der folgenden Werte zulässig: |
placeId |
string
Die Orts-ID oder die eindeutige Kennung des Standorts in Google Places.
|
nearPlaceId |
string
Die Orts-ID oder die in Google Places verwendete eindeutige Kennung des Standorts, der dem Nutzer am nächsten ist.
|
UserInfo
Daten zur Nutzeridentität im Zusammenhang mit einer Nachricht.
JSON-Darstellung |
{
"displayName": string,
"userDeviceLocale": string
} |
Felder |
displayName |
string
Anzeigename des Nutzers.
|
userDeviceLocale |
string
Sprache des Nutzers. Wird durch die Spracheinstellungen des Geräts bestimmt.
|
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-25 (UTC).
[null,null,["Zuletzt aktualisiert: 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. |"]]