The configuration for a session and food ordering properties. At the start of each connection, the client must first send a config message. This must happen before any other requests to initiate the session. If the client disconnects, they should repeat the same config message when they reconnect.
| JSON representation |
|---|
{ "session": string, "store": string, "laneId": string, "enableEchoCancellation": boolean, "daypartId": string, "userInfo": { object ( |
| Fields | |
|---|---|
session |
Required. The session for the order. Format: |
store |
Required. The store the order is being placed for. Format: |
laneId |
Optional. The id of a specifc drive through lane. |
enableEchoCancellation |
Optional. Whether to enable echo cancellation for the session. If enabled, the client should provide the customerAudio and crewAudio in the AudioInput. |
daypartId |
Optional. Daypart of the food menu, including breakfast, lunch, dinner, etc. This is used to determine the menu to use for the order. |
userInfo |
Optional. The personal information of the end user shared with the agent. |
orderType |
Optional. Deprecated: Use initialOrder.fulfillment.fulfillment_type instead. The type of order to be placed. |
initialOrder |
Optional. The initial order before starting the agent session. If provided, the agent will use it as the initial order state. |
featureGate |
Optional. The feature gates for the session. This is used to enable or disable features for the session. |
initialUtterance |
Optional. The initial utterance from the client to kick off the conversation. If provided, the agent will use this as the first user utterance, and will not start with a greeting message. |
clientAppInfo |
Optional. The information about the client application and device environment. |
mode |
Optional. The mode of the session. |
channelType |
Optional. The type of channel used for agent communication. |
enableListenOnlyDualChannel |
Optional. Whether to enable listen-only dual channel for the session. If enabled, the client should provide the customerAudio and crewAudio in the AudioInput. |
testSessionStartTime |
Optional. The start time of the session, used for testing or evaluation purposes. 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: |
fulfillmentMethod |
Optional. The fulfillment method for the session. |
clientEnv |
Optional. The environment on the client side (e.g., "qa", "uat", "preprod"). |
UserInfo
Personal information of the end user shared with the Food AI agent.
| JSON representation |
|---|
{ "preferredName": string, "paymentInfo": { object ( |
| Fields | |
|---|---|
preferredName |
Optional. The name of the user that the agent should use to address the user. Food AI client is responsible for selecting the preferred name based on the user's profile, and make sure it aligns with the brand's convention, e.g. use first name, or full name. |
paymentInfo |
Optional. The payment information of the user. Only |
deliveryAddress |
Optional. Deprecated: Use savedDeliveryAddress instead. The saved delivery address of the user. |
pastOrders[] |
Optional. The order history of the user. |
loyaltyInfo |
Optional. The loyalty info of the user. |
phoneNumber |
Optional. The phone number of the user. |
userId |
Optional. The unique identifier of the user in the client's system. |
savedDeliveryAddress |
Optional. The saved delivery address of the user. Will be replacing the existing string deliveryAddress field. |
additionalSavedAddresses[] |
Optional. All past delivery addresses previously used with the user's phone number, deduplicated by the client. Unlike savedDeliveryAddress, these are not confirmed to belong to the current user: e.g. if the session is for a phone call, the phone number might be associated with multiple users. Addresses need not be validated. May include savedDeliveryAddress. |
additionalSavedCustomerNames[] |
Optional. All customer names previously used with the user's phone number, deduplicated by the client. Unlike preferredName, these are not confirmed to belong to the current user: e.g. if the session is for a phone call, the phone number might be associated with multiple users. May include preferredName. |
PastOrder
The past order of the user.
| JSON representation |
|---|
{
"order": {
object ( |
| Fields | |
|---|---|
order |
Required. The original Food AI order. |
OrderType
The type of order to be placed.
| Enums | |
|---|---|
ORDER_TYPE_UNSPECIFIED |
The order type is not specified. |
ORDER_TYPE_DRIVE_THROUGH |
The order is for drive through. |
ORDER_TYPE_CARRY_OUT |
The order is for carry out. |
ORDER_TYPE_DELIVERY |
The order is for delivery. |
FeatureGate
The feature gates for the session. This is used to enable or disable features for the session.
| JSON representation |
|---|
{ "triggerOfferEngineOnDemand": boolean, "triggerLoyaltyOnDemand": boolean, "triggerOrderMediaAssistantOnDemand": boolean, "menuResponseEnabled": boolean, "revampedPaymentFlowEnabled": boolean, "updatedOrderStateEnabled": boolean, "enableOrderStatusRetrieval": boolean, "enableClientEscalationAudio": boolean } |
| Fields | |
|---|---|
triggerOfferEngineOnDemand |
Optional. For limited audience only, if set, offer engine will be optional in the payment flow and will only be triggered when users request for it. |
triggerLoyaltyOnDemand |
Optional. For limited audience only, if set, loyalty will be optional in the payment flow and will only be triggered when users request for it. |
triggerOrderMediaAssistantOnDemand |
Optional. For limited audience only, if set, order media assistant will be optional and will only be triggered when users request for it. |
menuResponseEnabled |
Optional. Returns the menu data to the client in BidiProcessOrderResponse if set. |
revampedPaymentFlowEnabled |
Optional. For limited audience only, if set, a revamped version of the payment flow will be used. |
updatedOrderStateEnabled |
Optional. If set, updatedOrderState is returned instead of legacyOrderStateResponse. |
enableOrderStatusRetrieval |
Optional. If set, the agent will support order status retrieval. |
enableClientEscalationAudio |
Optional. If set, client escalation audio is synthesized and streamed on ClientEscalationEvent. |
ClientAppInfo
Information about the client application and device environment. This is primarily used for logging, analytics, and debugging.
| JSON representation |
|---|
{ "deviceModel": string, "osVersion": string, "sdkVersion": string } |
| Fields | |
|---|---|
deviceModel |
Optional. The device model of the client (e.g., "iPhone 13", "Pixel 7", "Kiosk v2"). |
osVersion |
Optional. The operating system version of the client (e.g., "iOS 16.1", "Android 13"). |
sdkVersion |
Optional. The version of the client SDK or application software. |
SessionMode
The mode of the session.
| Enums | |
|---|---|
SESSION_MODE_UNSPECIFIED |
The session mode is not specified. |
HYBRID |
The session supports both audio and text. This is the default. |
TEXT |
The session is text-only. |