- Resource: SessionRecord
- Interaction
- UserUtterance
- AgentUtterance
- ResolveOrder
- ResolveOrderInput
- ResolveOrderOutput
- SubmitOrder
- MatchIntent
- MatchIntentInput
- MatchIntentOutput
- ClientExecution
- ClientExecutionInput
- ClientExecutionOutput
- ClientOrderUpdate
- SuggestedOptions
- SuggestedItems
- SuggestedItem
- NutritionalInfo
- SuggestedModifiers
- SuggestedModifier
- SuggestedModGroup
- SuggestedStores
- SuggestedStore
- SuggestedModifierGroups
- SuggestedActions
- SuggestedAction
- TextInputAction
- UpsellAttemptRecord
- TrafficType
- ExperimentMetadata
- ExperimentStudy
- Methods
Resource: SessionRecord
Represents a single session record.
| JSON representation |
|---|
{ "name": string, "sessionStartTime": string, "storeId": string, "laneId": string, "interactions": [ { object ( |
| Fields | |
|---|---|
name |
Identifier. The resource name of the SessionRecord. Format: projects/{project}/locations/{location}/brands/{brand}/sessionRecords/{sessionRecord} |
sessionStartTime |
Output only. The timestamp when the session started. 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: |
storeId |
Immutable. The ID of the store where the order was placed. |
laneId |
Immutable. The lane ID of the order session. |
interactions[] |
Output only. The conversation turns. |
outcomeLabel |
Output only. The final outcome label of the order. |
outcomeGroupLabel |
Output only. The group label for the outcome. |
audioRecordingPath |
Output only. Deprecated: Use storagePath instead. Path to the full audio recording. |
order |
Output only. The order associated with the session record. |
sessionDuration |
Output only. Total duration of the session. A duration in seconds with up to nine fractional digits, ending with ' |
upsellAttemptRecords[] |
Output only. Upsells performed during the session. |
audioRecording |
Output only. Audio recording for the session. This field is only populated when calling sessionRecords.get. A base64-encoded string. |
trafficType |
Output only. The traffic type for the session. |
channelType |
Output only. The type of channel used for the session (e.g. drive-through, mobile app, phone call). |
environment |
Output only. The execution environment of the session (e.g. prod, preprod, preprod-au). |
experimentMetadata |
Output only. The metadata associated with the experiment. |
menu |
Output only. The resource name of the menu active during the session. Format: |
Interaction
Represents a single interaction in a turn in the conversation.
| JSON representation |
|---|
{ "turnPosition": string, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "userUtterance": { object ( |
| Fields | |
|---|---|
turnPosition |
Output only. Turn position in the conversation. |
| The type of interaction. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: | |
userUtterance |
User utterance. |
agentUtterance |
Agent utterance. |
resolveOrder |
ResolveOrder call performed by the agent |
submitOrder |
SubmitOrder call performed by the agent |
matchIntent |
MatchIntent call performed by the agent |
clientExecution |
ClientExecution call performed by the agent |
clientOrderUpdate |
Client-initiated order state update |
suggestedOptions |
Suggested options surfaced to the customer during the turn. |
| End of mutually exclusive fields. | |
UserUtterance
The user utterance.
| JSON representation |
|---|
{ "text": string, "createTime": string } |
| Fields | |
|---|---|
text |
The text of the user utterance. |
createTime |
Output only. The timestamp when the user utterance occurred. 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: |
AgentUtterance
The agent utterance.
| JSON representation |
|---|
{ "text": string, "createTime": string } |
| Fields | |
|---|---|
text |
The text of the agent utterance. |
createTime |
Output only. The timestamp when the agent utterance occurred. 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: |
ResolveOrder
The resolve order interaction.
| JSON representation |
|---|
{ "input": { object ( |
| Fields | |
|---|---|
input |
The input for the resolve order action. |
output |
The output for the resolve order action. |
ResolveOrderInput
The input for the resolve order interaction.
| JSON representation |
|---|
{ "payload": { object } } |
| Fields | |
|---|---|
payload |
The payload for the resolve order interaction. |
ResolveOrderOutput
The output for the resolve order interaction.
| JSON representation |
|---|
{ "payload": { object } } |
| Fields | |
|---|---|
payload |
The payload for the resolve order interaction output. |
SubmitOrder
This type has no fields.
The submit order interaction.
MatchIntent
The match intent interaction.
| JSON representation |
|---|
{ "input": { object ( |
| Fields | |
|---|---|
input |
The input for the match intent interaction. |
output |
The output for the match intent interaction. |
MatchIntentInput
The input for the match intent interaction.
| JSON representation |
|---|
{ "payload": { object } } |
| Fields | |
|---|---|
payload |
The payload for the match intent interaction input. |
MatchIntentOutput
The output for the match intent interaction.
| JSON representation |
|---|
{ "payload": { object } } |
| Fields | |
|---|---|
payload |
The payload for the match intent interaction output. |
ClientExecution
The client execution interaction.
| JSON representation |
|---|
{ "toolName": string, "input": { object ( |
| Fields | |
|---|---|
toolName |
The tool name for the client execution interaction. |
input |
The input for the client execution interaction. |
output |
The output for the client execution interaction. |
ClientExecutionInput
The input for the client execution interaction.
| JSON representation |
|---|
{ "payload": { object } } |
| Fields | |
|---|---|
payload |
The payload for the client execution interaction input. |
ClientExecutionOutput
The output for the client execution interaction.
| JSON representation |
|---|
{ "payload": { object } } |
| Fields | |
|---|---|
payload |
The payload for the client execution interaction output. |
ClientOrderUpdate
Client-initiated order state update.
| JSON representation |
|---|
{
"order": {
object ( |
| Fields | |
|---|---|
order |
An order state update sent by the client. |
SuggestedOptions
Options to suggest to the customer.
| JSON representation |
|---|
{ "suggestedModifierGroups": { object ( |
| Fields | |
|---|---|
suggestedModifierGroups |
A group of suggested modifiers. |
customIntegrationAttributes |
Optional. Arbitrary metadata to be associated with an entity, used to build downstream integrations, i.e. identifiers or schema information for constructing an order for submission to a third-party point of sale API. |
suggestedActions |
Optional. Generic contextual action pills. |
| The suggested options. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: | |
suggestedItems |
A list of items to suggest to the customer. |
suggestedModifiers |
A list of modifiers to suggest to the customer. |
suggestedStores |
A list of stores to suggest to the customer. |
| End of mutually exclusive fields. | |
SuggestedItems
A list of items to suggest to the customer.
| JSON representation |
|---|
{
"items": [
{
object ( |
| Fields | |
|---|---|
items[] |
The items to suggest to the customer. |
SuggestedItem
An item to suggest to the customer.
| JSON representation |
|---|
{ "itemId": string, "displayName": string, "image": { object ( |
| Fields | |
|---|---|
itemId |
ID of the item in the menu. |
displayName |
Human-readable name for this tem to be shown on user interfaces. |
image |
Image to display for this item in the UI. |
basePrice |
The base price of the item. This may be affected by the selected modifiers. This is the price per unit of the item. |
integrationAttributes |
Metadata associated with this entity used for downstream integrations. |
nutritionalInfo |
Nutritional information for this item. |
description |
Description for this item. |
NutritionalInfo
Nutritional information for an item or modifier.
| JSON representation |
|---|
{ "calories": string } |
| Fields | |
|---|---|
calories |
Calorie count or calorie range string (e.g. "290", "250-300 Cal"). |
SuggestedModifiers
A list of modifiers to suggest to the customer.
| JSON representation |
|---|
{
"modifiers": [
{
object ( |
| Fields | |
|---|---|
modifiers[] |
The modifiers to suggest to the customer. |
parentUid |
The unique identifier of the parent item/modifier to apply the modifiers to. |
SuggestedModifier
A modifier to suggest to the customer.
| JSON representation |
|---|
{ "modifierId": string, "modifierGroupId": string, "modifierGroupDisplayName": string, "displayName": string, "image": { object ( |
| Fields | |
|---|---|
modifierId |
ID of the modifier in the menu. |
modifierGroupId |
ID of the modifier group that this modifier should be added to if the suggestion is accepted. |
modifierGroupDisplayName |
Display name of the modifier group that this modifier belongs to. |
displayName |
Human-readable name for this tem to be shown on user interfaces. |
image |
Image to display for this item in the UI. |
priceAdjustment |
The price adjustment associated with this modifier, if any. This is the price per unit of the modifier. |
integrationAttributes |
Metadata associated with this entity used for downstream integrations. |
alreadyIncluded |
Whether this modifier is already included in the order. |
suggestedModifierGroups[] |
The nested modifier groups suggested for this modifier. |
nutritionalInfo |
Nutritional information for this modifier. |
SuggestedModGroup
A modifier group to suggest to the customer.
| JSON representation |
|---|
{
"modifierGroupId": string,
"displayName": string,
"modifiers": [
{
object ( |
| Fields | |
|---|---|
modifierGroupId |
ID of the modifier group in the menu. |
displayName |
The display name of the modifier group. |
modifiers[] |
The modifiers in this group. |
maxSelectionCount |
The maximum number of modifiers that can be selected from this group. |
minSelectionCount |
The minimum number of modifiers that must be selected from this group. |
maxSelectionCountPerModifier |
Limits the number of times each modifier can be applied within this group. |
minSelectionNotMatched |
Whether the minimum selection count is not matched. |
SuggestedStores
A list of stores to suggest to the customer.
| JSON representation |
|---|
{
"stores": [
{
object ( |
| Fields | |
|---|---|
stores[] |
The stores to suggest to the customer. |
SuggestedStore
A store to suggest to the customer.
| JSON representation |
|---|
{ "store": { object ( |
| Fields | |
|---|---|
store |
The suggested store. |
distance |
The distance from the customer to the store in miles. |
address |
The address of the store. |
storeHours[] |
The store hours. |
phoneNumber |
The phone number of the store. |
storeName |
The store resource name. Format: projects/{project}/locations/{location}/brands/{brand}/stores/{store} |
open |
Whether the store is currently open. |
timeZone |
The timezone of the store. |
SuggestedModifierGroups
A list of modifier groups to suggest to the customer.
| JSON representation |
|---|
{
"modifierGroups": [
{
object ( |
| Fields | |
|---|---|
modifierGroups[] |
The modifier groups to suggest to the customer. |
SuggestedActions
A collection of action pills.
| JSON representation |
|---|
{
"actions": [
{
object ( |
| Fields | |
|---|---|
actions[] |
The list of suggested actions to display as pills. |
SuggestedAction
A single action pill / chip.
| JSON representation |
|---|
{
"displayName": string,
// The following is a list of mutually exclusive fields. At most one of the
// fields will be set in a response:
"textInput": {
object ( |
| Fields | |
|---|---|
displayName |
The user-facing label rendered on the pill (e.g. "Edit Pizza", "Sign in"). |
| The typed action triggered when the pill is tapped. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: | |
textInput |
Sends back the text input through the textInput event. |
| End of mutually exclusive fields. | |
TextInputAction
Action that sends a text query back to FoodAI via TextInput event.
| JSON representation |
|---|
{ "text": string } |
| Fields | |
|---|---|
text |
For sending back the text input through textInput event. |
UpsellAttemptRecord
Represents an upsell attempt during an ordering session. This data is used to display upsell information in the console order history, namely upsell type, turn id, item names, price increase, and acceptance status.
| JSON representation |
|---|
{
"turnId": integer,
"upsellType": string,
"accepted": boolean,
"originalItemDisplayName": string,
"targetItemDisplayName": string,
"priceIncrease": {
object ( |
| Fields | |
|---|---|
turnId |
Output only. ID of the turn in which the upsell opportunity occurred. Example: 2. |
upsellType |
Output only. The type or configured display name of the upsell event. Example: "COMBO", "UP_SIZE", or "Add fries". |
accepted |
Output only. Whether the upsell was accepted by the customer. |
originalItemDisplayName |
Output only. The display name of the original item in the order that triggered the upsell. Example: "Cheeseburger". |
targetItemDisplayName |
Output only. The display name of the target item offered or accepted in the upsell. Example: "French Fries" or "Cheeseburger Combo Meal". |
priceIncrease |
Output only. The additional monetary price increase for the upsold item. Example: {currencyCode: "USD", units: 1, nanos: 500000000} ($1.50). |
TrafficType
The traffic type for the session. This is used to label the monitoring, logging, and observability metrics.
| Enums | |
|---|---|
TRAFFIC_TYPE_UNSPECIFIED |
The traffic type is not specified. |
EXTERNAL |
The traffic is from an external client. |
INTEGRATION_TEST |
The traffic is from an integration test. |
EVAL |
The traffic is from the eval tool. |
PROBER |
The traffic is from the prober. |
MANUAL_TEST |
The traffic is from manual testing. |
INTERNAL_TOOL |
The traffic is from an internal tool. |
CONSOLE |
The traffic is from the food AI console. |
QA |
Traffic from QA testing. |
ExperimentMetadata
The metadata associated with the experiment.
| JSON representation |
|---|
{
"publicStudies": [
{
object ( |
| Fields | |
|---|---|
publicStudies[] |
Output only. The public studies active during the session. |
ExperimentStudy
The metadata associated with the study.
| JSON representation |
|---|
{ "studyName": string, "armName": string } |
| Fields | |
|---|---|
studyName |
Optional. The name of the study. |
armName |
Optional. The name of the experiment arm. |
Methods |
|
|---|---|
|
Deletes an SessionRecord. |
|
Gets a specific SessionRecord. |
|
Lists SessionRecords for a given brand. |