- JSON representation
- DriveOffEvent
- CrewInterjectionEvent
- OrderStateUpdateEvent
- ClientEscalationEvent
- CallerHangupEvent
- PosErrorEvent
- EndSessionEvent
- Reason
- StoreChangeEvent
The event input from the client. This is used to trigger specific events within the agent.
| JSON representation |
|---|
{ // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "driveOffEvent": { object ( |
| Fields | |
|---|---|
| Next ID: 12 The event to trigger. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: | |
driveOffEvent |
The drive off event. |
crewInterjectionEvent |
The crew interjection event. |
updateOrderStateEvent |
A client-side update to the order state. |
clientEscalationEvent |
A client-side escalation event. |
callerHangupEvent |
Optional. A caller hangup event. |
posErrorInput |
Optional. A POS error event. |
endSessionEvent |
Optional. A client-initiated end session event. |
storeChangeEvent |
Optional. The store change event. |
| End of mutually exclusive fields. | |
DriveOffEvent
The drive off event. This indicates the customer drove off. Session will be closed after this event.
| JSON representation |
|---|
{ "reason": string } |
| Fields | |
|---|---|
reason |
Optional. The reason for drive off e.g. "order completed", "unexpected driveoff". |
CrewInterjectionEvent
The crew interjection event. This indicates a crew member interjected in the session. Session will be closed after this event.
| JSON representation |
|---|
{ "mode": string } |
| Fields | |
|---|---|
mode |
Optional. The mode in which the crew member interjected, e.g. "headset", "pos". |
OrderStateUpdateEvent
The update order state request. This event should be sent when the order is updated on the client side, e.g. when an item is added or removed via a traditional touch interface.
| JSON representation |
|---|
{
"order": {
object ( |
| Fields | |
|---|---|
order |
Required. The updated state of the Order associated with this session. |
ClientEscalationEvent
Indicates the client is escalating the session to a human agent.
| JSON representation |
|---|
{ "reason": string } |
| Fields | |
|---|---|
reason |
Optional. The reason for client escalation e.g. "payment-declined", "pos-error", "integration-error" etc. |
CallerHangupEvent
This type has no fields.
Indicates the customer hung up the call prematurely (e.g., AI aversion).
PosErrorEvent
Point-of-Sale (POS) specific failures.
| JSON representation |
|---|
{ "errorMessages": [ string ], "affectedItemUids": [ string ], "affectedExternalIds": [ string ], "metadata": { string: string, ... } } |
| Fields | |
|---|---|
errorMessages[] |
Optional. A list of human-readable descriptions of the errors. Multiple error messages can be provided if multiple issues occur simultaneously (e.g., multiple items are out of stock) or to provide a more detailed breakdown of a single complex failure. These messages may be used by the agent to inform the customer or for logging purposes. |
affectedItemUids[] |
Optional. Unique item UIDs generated by the Food Ordering AI Agent that caused the error. Corresponds to |
affectedExternalIds[] |
Optional. List of external IDs (from the Menu) that caused the error. Should be equal to the actual representatives in the POS, which are usually under integration attributes in menu.proto (e.g., in |
metadata |
Optional. Free-form metadata for debugging or brand-specific signaling. Can be used to pass brand-specific error codes or categories (e.g., {"BRAND_ERROR_CODE": "OUT_OF_STOCK"}). An object containing a list of |
EndSessionEvent
Indicates the client is explicitly requesting to end the session (for example, the customer tapped a "Checkout" or "Done" button on a touch interface, rather than the agent detecting the end of the conversation). The session will be closed after this event.
| JSON representation |
|---|
{
"reason": enum ( |
| Fields | |
|---|---|
reason |
Optional. The reason the client is ending the session. |
Reason
The reason the client is ending the session.
| Enums | |
|---|---|
REASON_UNSPECIFIED |
The reason is unspecified. The session is ended as a generic client-initiated request. |
CHECKOUT |
The customer proceeded to checkout / payment. |
CHECKOUT_COMPLETED |
The checkout is completed. |
StoreChangeEvent
This type has no fields.
The store change event. This indicates the client selected or switched to a different store.