Method: projects.locations.sessions.processOrder

Performs a single turn logic to process user input and return the result.

HTTP request

POST https://foodorderingaiagent.googleapis.com/v1/{config.session=projects/*/locations/*/sessions/*}:processOrder

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
config.session

string

Required. The session for the order. Format: projects/{project}/locations/{location}/sessions/{session}

Request body

The request body contains data with the following structure:

JSON representation
{
  "config": {
    "session": string,
    "store": string,
    "laneId": string,
    "enableEchoCancellation": boolean,
    "daypartId": string,
    "featureGate": {
      "menuResponseEnabled": boolean,
      "updatedOrderStateEnabled": boolean,
      "enableOrderStatusRetrieval": boolean,
      "enableClientEscalationAudio": boolean
    },
    "clientAppInfo": {
      "deviceModel": string,
      "osVersion": string,
      "sdkVersion": string
    },
    "mode": enum (SessionMode),
    "channelType": enum (ChannelType),
    "enableListenOnlyDualChannel": boolean,
    "testSessionStartTime": string,
    "fulfillmentMethod": enum (FulfillmentMethod),
    "clientEnv": string
  },
  "turnType": enum (TurnType),

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "textInput": {
    object (TextInput)
  },
  "audioInput": {
    object (AudioInput)
  },
  "eventInput": {
    object (EventInput)
  },
  "clientExecutionResult": {
    object (ClientExecutionResult)
  },
  "blobInput": {
    object (Blob)
  },
  "dtmfInput": {
    object (DtmfInput)
  }
  // End of mutually exclusive fields.
}
Fields
config.store

string

Required. The store the order is being placed for. Format: projects/{project}/locations/{location}/brands/{brand}/stores/{store}

config.laneId

string

Optional. The id of a specifc drive through lane.

config.enableEchoCancellation

boolean

Optional. Whether to enable echo cancellation for the session. If enabled, the client should provide the customerAudio and crewAudio in the AudioInput.

config.daypartId

string

Optional. Daypart of the food menu, including breakfast, lunch, dinner, etc. This is used to determine the menu to use for the order.

config.featureGate

object (FeatureGate)

Optional. The feature gates for the session. This is used to enable or disable features for the session.

config.clientAppInfo

object (ClientAppInfo)

Optional. The information about the client application and device environment.

config.mode

enum (SessionMode)

Optional. The mode of the session.

config.channelType

enum (ChannelType)

Optional. The type of channel used for agent communication.

config.enableListenOnlyDualChannel

boolean

Optional. Whether to enable listen-only dual channel for the session. If enabled, the client should provide the customerAudio and crewAudio in the AudioInput.

config.testSessionStartTime

string (Timestamp format)

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: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

config.fulfillmentMethod

enum (FulfillmentMethod)

Optional. The fulfillment method for the session.

config.clientEnv

string

Optional. The environment on the client side (e.g., "qa", "uat", "preprod").

turnType

enum (TurnType)

Optional. Explicit indicator of the request's position in the session lifecycle. Allows clients to deterministically control when initial session setup variables are injected.

The input from the client. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
textInput

object (TextInput)

The text input from the client.

audioInput

object (AudioInput)

The audio input from the client.

eventInput

object (EventInput)

The event input from the client.

clientExecutionResult

object (ClientExecutionResult)

The result of a client execution request.

blobInput

object (Blob)

Generic binary data input.

dtmfInput

object (DtmfInput)

The DTMF input from the client.

End of mutually exclusive fields.

Response body

Response message for FoodOrderingService.ProcessOrder. Functionally contains fields from BidiProcessOrderResponse minus streaming-specific ones.

If successful, the response body contains data with the following structure:

JSON representation
{
  "responses": [
    {
      object (BidiProcessOrderResponse)
    }
  ]
}
Fields
responses[]

object (BidiProcessOrderResponse)

Output only. List of agent responses to the request, returned in-order.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.