EventInput

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 (DriveOffEvent)
  },
  "crewInterjectionEvent": {
    object (CrewInterjectionEvent)
  },
  "updateOrderStateEvent": {
    object (OrderStateUpdateEvent)
  },
  "clientEscalationEvent": {
    object (ClientEscalationEvent)
  },
  "callerHangupEvent": {
    object (CallerHangupEvent)
  },
  "posErrorInput": {
    object (PosErrorEvent)
  },
  "endSessionEvent": {
    object (EndSessionEvent)
  },
  "storeChangeEvent": {
    object (StoreChangeEvent)
  }
  // End of mutually exclusive fields.
}
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

object (DriveOffEvent)

The drive off event.

crewInterjectionEvent

object (CrewInterjectionEvent)

The crew interjection event.

updateOrderStateEvent

object (OrderStateUpdateEvent)

A client-side update to the order state.

clientEscalationEvent

object (ClientEscalationEvent)

A client-side escalation event.

callerHangupEvent

object (CallerHangupEvent)

Optional. A caller hangup event.

posErrorInput

object (PosErrorEvent)

Optional. A POS error event.

endSessionEvent

object (EndSessionEvent)

Optional. A client-initiated end session event.

storeChangeEvent

object (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

string

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

string

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 (Order)
  }
}
Fields
order

object (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

string

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[]

string

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[]

string

Optional. Unique item UIDs generated by the Food Ordering AI Agent that caused the error. Corresponds to UpdatedOrderState.OrderItem.uid.

affectedExternalIds[]

string

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 ItemIntegrationAttributes or ModifierIntegrationAttributes).

metadata

map (key: string, value: string)

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 "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

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 (Reason)
}
Fields
reason

enum (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.