Dialogflow API . projects . locations . conversations

Instance Methods

messages()

Returns the messages Resource.

participants()

Returns the participants Resource.

suggestions()

Returns the suggestions Resource.

close()

Close httplib2 connections.

complete(name, body=None, x__xgafv=None)

Completes the specified conversation. Finished conversations are purged from the database after 30 days.

create(parent, body=None, conversationId=None, x__xgafv=None)

Creates a new conversation. Conversations are auto-completed after 24 hours. Conversation Lifecycle: There are two stages during a conversation: Automated Agent Stage and Assist Stage. For Automated Agent Stage, there will be a dialogflow agent responding to user queries. For Assist Stage, there's no dialogflow agent responding to user queries. But we will provide suggestions which are generated from conversation. If Conversation.conversation_profile is configured for a dialogflow agent, conversation will start from `Automated Agent Stage`, otherwise, it will start from `Assist Stage`. And during `Automated Agent Stage`, once an Intent with Intent.live_agent_handoff is triggered, conversation will transfer to Assist Stage.

get(name, x__xgafv=None)

Retrieves the specific conversation.

list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)

Returns the list of all conversations in the specified project.

list_next()

Retrieves the next page of results.

Method Details

close()
Close httplib2 connections.
complete(name, body=None, x__xgafv=None)
Completes the specified conversation. Finished conversations are purged from the database after 30 days.

Args:
  name: string, Required. Resource identifier of the conversation to close. Format: `projects//locations//conversations/`. (required)
  body: object, The request body.
    The object takes the form of:

{ # The request message for Conversations.CompleteConversation.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Represents a conversation. A conversation is an interaction between an agent, including live agents and Dialogflow agents, and a support customer. Conversations can include phone calls and text-based chat sessions.
  "conversationProfile": "A String", # Required. The Conversation Profile to be used to configure this Conversation. This field cannot be updated. Format: `projects//locations//conversationProfiles/`.
  "conversationStage": "A String", # Optional. The stage of a conversation. It indicates whether the virtual agent or a human agent is handling the conversation. If the conversation is created with the conversation profile that has Dialogflow config set, defaults to ConversationStage.VIRTUAL_AGENT_STAGE; Otherwise, defaults to ConversationStage.HUMAN_ASSIST_STAGE. If the conversation is created with the conversation profile that has Dialogflow config set but explicitly sets conversation_stage to ConversationStage.HUMAN_ASSIST_STAGE, it skips ConversationStage.VIRTUAL_AGENT_STAGE stage and directly goes to ConversationStage.HUMAN_ASSIST_STAGE.
  "endTime": "A String", # Output only. The time the conversation was finished.
  "lifecycleState": "A String", # Output only. The current state of the Conversation.
  "name": "A String", # Output only. Identifier. The unique identifier of this conversation. Format: `projects//locations//conversations/`.
  "phoneNumber": { # Represents a phone number for telephony integration. It allows for connecting a particular conversation over telephony. # Output only. It will not be empty if the conversation is to be connected over telephony.
    "phoneNumber": "A String", # Output only. The phone number to connect to this conversation.
  },
  "startTime": "A String", # Output only. The time the conversation was started.
}
create(parent, body=None, conversationId=None, x__xgafv=None)
Creates a new conversation. Conversations are auto-completed after 24 hours. Conversation Lifecycle: There are two stages during a conversation: Automated Agent Stage and Assist Stage. For Automated Agent Stage, there will be a dialogflow agent responding to user queries. For Assist Stage, there's no dialogflow agent responding to user queries. But we will provide suggestions which are generated from conversation. If Conversation.conversation_profile is configured for a dialogflow agent, conversation will start from `Automated Agent Stage`, otherwise, it will start from `Assist Stage`. And during `Automated Agent Stage`, once an Intent with Intent.live_agent_handoff is triggered, conversation will transfer to Assist Stage.

Args:
  parent: string, Required. Resource identifier of the project creating the conversation. Format: `projects//locations/`. (required)
  body: object, The request body.
    The object takes the form of:

{ # Represents a conversation. A conversation is an interaction between an agent, including live agents and Dialogflow agents, and a support customer. Conversations can include phone calls and text-based chat sessions.
  "conversationProfile": "A String", # Required. The Conversation Profile to be used to configure this Conversation. This field cannot be updated. Format: `projects//locations//conversationProfiles/`.
  "conversationStage": "A String", # Optional. The stage of a conversation. It indicates whether the virtual agent or a human agent is handling the conversation. If the conversation is created with the conversation profile that has Dialogflow config set, defaults to ConversationStage.VIRTUAL_AGENT_STAGE; Otherwise, defaults to ConversationStage.HUMAN_ASSIST_STAGE. If the conversation is created with the conversation profile that has Dialogflow config set but explicitly sets conversation_stage to ConversationStage.HUMAN_ASSIST_STAGE, it skips ConversationStage.VIRTUAL_AGENT_STAGE stage and directly goes to ConversationStage.HUMAN_ASSIST_STAGE.
  "endTime": "A String", # Output only. The time the conversation was finished.
  "lifecycleState": "A String", # Output only. The current state of the Conversation.
  "name": "A String", # Output only. Identifier. The unique identifier of this conversation. Format: `projects//locations//conversations/`.
  "phoneNumber": { # Represents a phone number for telephony integration. It allows for connecting a particular conversation over telephony. # Output only. It will not be empty if the conversation is to be connected over telephony.
    "phoneNumber": "A String", # Output only. The phone number to connect to this conversation.
  },
  "startTime": "A String", # Output only. The time the conversation was started.
}

  conversationId: string, Optional. Identifier of the conversation. Generally it's auto generated by Google. Only set it if you cannot wait for the response to return a auto-generated one to you. The conversation ID must be compliant with the regression formula `a-zA-Z*` with the characters length in range of [3,64]. If the field is provided, the caller is responsible for 1. the uniqueness of the ID, otherwise the request will be rejected. 2. the consistency for whether to use custom ID or not under a project to better ensure uniqueness.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Represents a conversation. A conversation is an interaction between an agent, including live agents and Dialogflow agents, and a support customer. Conversations can include phone calls and text-based chat sessions.
  "conversationProfile": "A String", # Required. The Conversation Profile to be used to configure this Conversation. This field cannot be updated. Format: `projects//locations//conversationProfiles/`.
  "conversationStage": "A String", # Optional. The stage of a conversation. It indicates whether the virtual agent or a human agent is handling the conversation. If the conversation is created with the conversation profile that has Dialogflow config set, defaults to ConversationStage.VIRTUAL_AGENT_STAGE; Otherwise, defaults to ConversationStage.HUMAN_ASSIST_STAGE. If the conversation is created with the conversation profile that has Dialogflow config set but explicitly sets conversation_stage to ConversationStage.HUMAN_ASSIST_STAGE, it skips ConversationStage.VIRTUAL_AGENT_STAGE stage and directly goes to ConversationStage.HUMAN_ASSIST_STAGE.
  "endTime": "A String", # Output only. The time the conversation was finished.
  "lifecycleState": "A String", # Output only. The current state of the Conversation.
  "name": "A String", # Output only. Identifier. The unique identifier of this conversation. Format: `projects//locations//conversations/`.
  "phoneNumber": { # Represents a phone number for telephony integration. It allows for connecting a particular conversation over telephony. # Output only. It will not be empty if the conversation is to be connected over telephony.
    "phoneNumber": "A String", # Output only. The phone number to connect to this conversation.
  },
  "startTime": "A String", # Output only. The time the conversation was started.
}
get(name, x__xgafv=None)
Retrieves the specific conversation.

Args:
  name: string, Required. The name of the conversation. Format: `projects//locations//conversations/`. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Represents a conversation. A conversation is an interaction between an agent, including live agents and Dialogflow agents, and a support customer. Conversations can include phone calls and text-based chat sessions.
  "conversationProfile": "A String", # Required. The Conversation Profile to be used to configure this Conversation. This field cannot be updated. Format: `projects//locations//conversationProfiles/`.
  "conversationStage": "A String", # Optional. The stage of a conversation. It indicates whether the virtual agent or a human agent is handling the conversation. If the conversation is created with the conversation profile that has Dialogflow config set, defaults to ConversationStage.VIRTUAL_AGENT_STAGE; Otherwise, defaults to ConversationStage.HUMAN_ASSIST_STAGE. If the conversation is created with the conversation profile that has Dialogflow config set but explicitly sets conversation_stage to ConversationStage.HUMAN_ASSIST_STAGE, it skips ConversationStage.VIRTUAL_AGENT_STAGE stage and directly goes to ConversationStage.HUMAN_ASSIST_STAGE.
  "endTime": "A String", # Output only. The time the conversation was finished.
  "lifecycleState": "A String", # Output only. The current state of the Conversation.
  "name": "A String", # Output only. Identifier. The unique identifier of this conversation. Format: `projects//locations//conversations/`.
  "phoneNumber": { # Represents a phone number for telephony integration. It allows for connecting a particular conversation over telephony. # Output only. It will not be empty if the conversation is to be connected over telephony.
    "phoneNumber": "A String", # Output only. The phone number to connect to this conversation.
  },
  "startTime": "A String", # Output only. The time the conversation was started.
}
list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Returns the list of all conversations in the specified project.

Args:
  parent: string, Required. The project from which to list all conversation. Format: `projects//locations/`. (required)
  filter: string, Optional. A filter expression that filters conversations listed in the response. Only `lifecycle_state` can be filtered on in this way. For example, the following expression only returns `COMPLETED` conversations: `lifecycle_state = "COMPLETED"` For more information about filtering, see [API Filtering](https://aip.dev/160).
  pageSize: integer, Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.
  pageToken: string, Optional. The next_page_token value returned from a previous list request.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response message for Conversations.ListConversations.
  "conversations": [ # The list of conversations. There will be a maximum number of items returned based on the page_size field in the request.
    { # Represents a conversation. A conversation is an interaction between an agent, including live agents and Dialogflow agents, and a support customer. Conversations can include phone calls and text-based chat sessions.
      "conversationProfile": "A String", # Required. The Conversation Profile to be used to configure this Conversation. This field cannot be updated. Format: `projects//locations//conversationProfiles/`.
      "conversationStage": "A String", # Optional. The stage of a conversation. It indicates whether the virtual agent or a human agent is handling the conversation. If the conversation is created with the conversation profile that has Dialogflow config set, defaults to ConversationStage.VIRTUAL_AGENT_STAGE; Otherwise, defaults to ConversationStage.HUMAN_ASSIST_STAGE. If the conversation is created with the conversation profile that has Dialogflow config set but explicitly sets conversation_stage to ConversationStage.HUMAN_ASSIST_STAGE, it skips ConversationStage.VIRTUAL_AGENT_STAGE stage and directly goes to ConversationStage.HUMAN_ASSIST_STAGE.
      "endTime": "A String", # Output only. The time the conversation was finished.
      "lifecycleState": "A String", # Output only. The current state of the Conversation.
      "name": "A String", # Output only. Identifier. The unique identifier of this conversation. Format: `projects//locations//conversations/`.
      "phoneNumber": { # Represents a phone number for telephony integration. It allows for connecting a particular conversation over telephony. # Output only. It will not be empty if the conversation is to be connected over telephony.
        "phoneNumber": "A String", # Output only. The phone number to connect to this conversation.
      },
      "startTime": "A String", # Output only. The time the conversation was started.
    },
  ],
  "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no more results in the list.
}
list_next()
Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call 'execute()' on to request the next
          page. Returns None if there are no more items in the collection.