conversations
Creates, updates, deletes, gets or lists a conversations resource.
Overview
| Name | conversations |
| Type | Resource |
| Id | google.contactcenterinsights.conversations |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Immutable. The resource name of the conversation. Format: projects/{project}/locations/{location}/conversations/{conversation} |
agentId | string | An opaque, user-specified string representing the human agent who handled the conversation. |
callMetadata | object | Call-specific metadata. (id: GoogleCloudContactcenterinsightsV1ConversationCallMetadata) |
correlationInfo | object | Output only. Info for correlating across conversations. (id: GoogleCloudContactcenterinsightsV1ConversationCorrelationInfo) |
createTime | string (google-datetime) | Output only. The time at which the conversation was created. |
dataSource | object | The source of the audio and transcription for the conversation. (id: GoogleCloudContactcenterinsightsV1ConversationDataSource) |
dialogflowIntents | object | Output only. All the matched Dialogflow intents in the call. The key corresponds to a Dialogflow intent, format: projects/{project}/agent/{agent}/intents/{intent} |
duration | string (google-duration) | Output only. The duration of the conversation. |
expireTime | string (google-datetime) | The time at which this conversation should expire. After this time, the conversation data and any associated analyses will be deleted. |
labels | object | A map for the user to specify any custom fields. A maximum of 100 labels per conversation is allowed, with a maximum of 256 characters per entry. |
languageCode | string | A user-specified language code for the conversation. |
latestAnalysis | object | Output only. The conversation's latest analysis, if one exists. (id: GoogleCloudContactcenterinsightsV1Analysis) |
latestSummary | object | Output only. Latest summary of the conversation. (id: GoogleCloudContactcenterinsightsV1ConversationSummarizationSuggestionData) |
medium | string | Immutable. The conversation medium. (MEDIUM_UNSPECIFIED, PHONE_CALL, CHAT) |
metadataJson | string | Optional. JSON metadata encoded as a string. This field is primarily used by Insights integrations with various telephony systems and must be in one of Insight's supported formats. |
obfuscatedUserId | string | Obfuscated user ID which the customer sent to us. |
qualityMetadata | object | Conversation metadata related to quality management. (id: GoogleCloudContactcenterinsightsV1ConversationQualityMetadata) |
runtimeAnnotations | array | Output only. The annotations that were generated during the customer and agent interaction. |
startTime | string (google-datetime) | The time at which the conversation started. |
transcript | object | Output only. The conversation transcript. (id: GoogleCloudContactcenterinsightsV1ConversationTranscript) |
ttl | string (google-duration) | Input only. The TTL for this resource. If specified, then this TTL will be used to calculate the expire time. |
turnCount | integer (int32) | Output only. The number of turns in the conversation. |
updateTime | string (google-datetime) | Output only. The most recent time at which the conversation was updated. |
| Name | Datatype | Description |
|---|---|---|
name | string | Immutable. The resource name of the conversation. Format: projects/{project}/locations/{location}/conversations/{conversation} |
agentId | string | An opaque, user-specified string representing the human agent who handled the conversation. |
callMetadata | object | Call-specific metadata. (id: GoogleCloudContactcenterinsightsV1ConversationCallMetadata) |
correlationInfo | object | Output only. Info for correlating across conversations. (id: GoogleCloudContactcenterinsightsV1ConversationCorrelationInfo) |
createTime | string (google-datetime) | Output only. The time at which the conversation was created. |
dataSource | object | The source of the audio and transcription for the conversation. (id: GoogleCloudContactcenterinsightsV1ConversationDataSource) |
dialogflowIntents | object | Output only. All the matched Dialogflow intents in the call. The key corresponds to a Dialogflow intent, format: projects/{project}/agent/{agent}/intents/{intent} |
duration | string (google-duration) | Output only. The duration of the conversation. |
expireTime | string (google-datetime) | The time at which this conversation should expire. After this time, the conversation data and any associated analyses will be deleted. |
labels | object | A map for the user to specify any custom fields. A maximum of 100 labels per conversation is allowed, with a maximum of 256 characters per entry. |
languageCode | string | A user-specified language code for the conversation. |
latestAnalysis | object | Output only. The conversation's latest analysis, if one exists. (id: GoogleCloudContactcenterinsightsV1Analysis) |
latestSummary | object | Output only. Latest summary of the conversation. (id: GoogleCloudContactcenterinsightsV1ConversationSummarizationSuggestionData) |
medium | string | Immutable. The conversation medium. (MEDIUM_UNSPECIFIED, PHONE_CALL, CHAT) |
metadataJson | string | Optional. JSON metadata encoded as a string. This field is primarily used by Insights integrations with various telephony systems and must be in one of Insight's supported formats. |
obfuscatedUserId | string | Obfuscated user ID which the customer sent to us. |
qualityMetadata | object | Conversation metadata related to quality management. (id: GoogleCloudContactcenterinsightsV1ConversationQualityMetadata) |
runtimeAnnotations | array | Output only. The annotations that were generated during the customer and agent interaction. |
startTime | string (google-datetime) | The time at which the conversation started. |
transcript | object | Output only. The conversation transcript. (id: GoogleCloudContactcenterinsightsV1ConversationTranscript) |
ttl | string (google-duration) | Input only. The TTL for this resource. If specified, then this TTL will be used to calculate the expire time. |
turnCount | integer (int32) | Output only. The number of turns in the conversation. |
updateTime | string (google-datetime) | Output only. The most recent time at which the conversation was updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, conversationsId | view | Gets a conversation. |
list | select | projectsId, locationsId | orderBy, pageToken, view, filter, pageSize | Lists conversations. |
create | insert | projectsId, locationsId | conversationId | Creates a conversation. Note that this method does not support audio transcription or redaction. Use conversations.upload instead. |
patch | update | projectsId, locationsId, conversationsId | updateMask, allowMissing, conversationAutoLabelingUpdateConfig.allowAutoLabelingUpdate | Updates a conversation. |
delete | delete | projectsId, locationsId, conversationsId | force | Deletes a conversation. |
bulk_delete | delete | projectsId, locationsId | Deletes multiple conversations in a single request. | |
generate_signed_audio | exec | projectsId, locationsId, conversationsId | Gets the signed URI for the audio for the given conversation. | |
ingest | exec | projectsId, locationsId | Imports conversations and processes them according to the user's configuration. | |
sample | exec | projectsId, locationsId | Samples conversations based on user configuration and handles the sampled conversations for different use cases. | |
calculate_stats | exec | projectsId, locationsId | filter | Gets conversation statistics. |
upload | exec | projectsId, locationsId | Create a long-running conversation upload operation. This method differs from CreateConversation by allowing audio transcription and optional DLP redaction. | |
bulk_analyze | exec | projectsId, locationsId | Analyzes multiple conversations in a single request. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
conversationsId | string | |
locationsId | string | |
projectsId | string | |
allowMissing | boolean | |
conversationAutoLabelingUpdateConfig.allowAutoLabelingUpdate | boolean | |
conversationId | string | |
filter | string | |
force | boolean | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) | |
view | string |
SELECT examples
- get
- list
Gets a conversation.
SELECT
name,
agentId,
callMetadata,
correlationInfo,
createTime,
dataSource,
dialogflowIntents,
duration,
expireTime,
labels,
languageCode,
latestAnalysis,
latestSummary,
medium,
metadataJson,
obfuscatedUserId,
qualityMetadata,
runtimeAnnotations,
startTime,
transcript,
ttl,
turnCount,
updateTime
FROM google.contactcenterinsights.conversations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND conversationsId = '{{ conversationsId }}' -- required
AND view = '{{ view }}'
;
Lists conversations.
SELECT
name,
agentId,
callMetadata,
correlationInfo,
createTime,
dataSource,
dialogflowIntents,
duration,
expireTime,
labels,
languageCode,
latestAnalysis,
latestSummary,
medium,
metadataJson,
obfuscatedUserId,
qualityMetadata,
runtimeAnnotations,
startTime,
transcript,
ttl,
turnCount,
updateTime
FROM google.contactcenterinsights.conversations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND orderBy = '{{ orderBy }}'
AND pageToken = '{{ pageToken }}'
AND view = '{{ view }}'
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
;
INSERT examples
- create
- Manifest
Creates a conversation. Note that this method does not support audio transcription or redaction. Use conversations.upload instead.
INSERT INTO google.contactcenterinsights.conversations (
data__labels,
data__callMetadata,
data__ttl,
data__metadataJson,
data__obfuscatedUserId,
data__agentId,
data__languageCode,
data__dataSource,
data__name,
data__qualityMetadata,
data__expireTime,
data__medium,
data__startTime,
projectsId,
locationsId,
conversationId
)
SELECT
'{{ labels }}',
'{{ callMetadata }}',
'{{ ttl }}',
'{{ metadataJson }}',
'{{ obfuscatedUserId }}',
'{{ agentId }}',
'{{ languageCode }}',
'{{ dataSource }}',
'{{ name }}',
'{{ qualityMetadata }}',
'{{ expireTime }}',
'{{ medium }}',
'{{ startTime }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ conversationId }}'
RETURNING
name,
agentId,
callMetadata,
correlationInfo,
createTime,
dataSource,
dialogflowIntents,
duration,
expireTime,
labels,
languageCode,
latestAnalysis,
latestSummary,
medium,
metadataJson,
obfuscatedUserId,
qualityMetadata,
runtimeAnnotations,
startTime,
transcript,
ttl,
turnCount,
updateTime
;
# Description fields are for documentation purposes
- name: conversations
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the conversations resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the conversations resource.
- name: labels
value: "{{ labels }}"
description: |
A map for the user to specify any custom fields. A maximum of 100 labels per conversation is allowed, with a maximum of 256 characters per entry.
- name: callMetadata
description: |
Call-specific metadata.
value:
agentChannel: {{ agentChannel }}
customerChannel: {{ customerChannel }}
- name: ttl
value: "{{ ttl }}"
description: |
Input only. The TTL for this resource. If specified, then this TTL will be used to calculate the expire time.
- name: metadataJson
value: "{{ metadataJson }}"
description: |
Optional. JSON metadata encoded as a string. This field is primarily used by Insights integrations with various telephony systems and must be in one of Insight's supported formats.
- name: obfuscatedUserId
value: "{{ obfuscatedUserId }}"
description: |
Obfuscated user ID which the customer sent to us.
- name: agentId
value: "{{ agentId }}"
description: |
An opaque, user-specified string representing the human agent who handled the conversation.
- name: languageCode
value: "{{ languageCode }}"
description: |
A user-specified language code for the conversation.
- name: dataSource
description: |
The source of the audio and transcription for the conversation.
value:
gcsSource:
audioUri: "{{ audioUri }}"
transcriptUri: "{{ transcriptUri }}"
metadataUri: "{{ metadataUri }}"
turnLevelAudios:
- audioGcsUri: "{{ audioGcsUri }}"
audioDuration: "{{ audioDuration }}"
dialogflowSource:
dialogflowConversation: "{{ dialogflowConversation }}"
audioUri: "{{ audioUri }}"
- name: name
value: "{{ name }}"
description: |
Immutable. The resource name of the conversation. Format: projects/{project}/locations/{location}/conversations/{conversation}
- name: qualityMetadata
description: |
Conversation metadata related to quality management.
value:
agentInfo:
- dispositionCode: "{{ dispositionCode }}"
versionId: "{{ versionId }}"
agentType: "{{ agentType }}"
displayName: "{{ displayName }}"
deploymentDisplayName: "{{ deploymentDisplayName }}"
team: "{{ team }}"
teams: "{{ teams }}"
entrySubagentId: "{{ entrySubagentId }}"
agentId: "{{ agentId }}"
location: "{{ location }}"
entrySubagentDisplayName: "{{ entrySubagentDisplayName }}"
deploymentId: "{{ deploymentId }}"
versionDisplayName: "{{ versionDisplayName }}"
customerSatisfactionRating: {{ customerSatisfactionRating }}
feedbackLabels:
- qaAnswerLabel:
numValue: {{ numValue }}
boolValue: {{ boolValue }}
key: "{{ key }}"
potentialScore: {{ potentialScore }}
score: {{ score }}
strValue: "{{ strValue }}"
naValue: {{ naValue }}
skipValue: {{ skipValue }}
normalizedScore: {{ normalizedScore }}
name: "{{ name }}"
labeledResource: "{{ labeledResource }}"
createTime: "{{ createTime }}"
updateTime: "{{ updateTime }}"
label: "{{ label }}"
waitDuration: "{{ waitDuration }}"
menuPath: "{{ menuPath }}"
- name: expireTime
value: "{{ expireTime }}"
description: |
The time at which this conversation should expire. After this time, the conversation data and any associated analyses will be deleted.
- name: medium
value: "{{ medium }}"
description: |
Immutable. The conversation medium.
valid_values: ['MEDIUM_UNSPECIFIED', 'PHONE_CALL', 'CHAT']
- name: startTime
value: "{{ startTime }}"
description: |
The time at which the conversation started.
- name: conversationId
value: "{{ conversationId }}"
UPDATE examples
- patch
Updates a conversation.
UPDATE google.contactcenterinsights.conversations
SET
data__labels = '{{ labels }}',
data__callMetadata = '{{ callMetadata }}',
data__ttl = '{{ ttl }}',
data__metadataJson = '{{ metadataJson }}',
data__obfuscatedUserId = '{{ obfuscatedUserId }}',
data__agentId = '{{ agentId }}',
data__languageCode = '{{ languageCode }}',
data__dataSource = '{{ dataSource }}',
data__name = '{{ name }}',
data__qualityMetadata = '{{ qualityMetadata }}',
data__expireTime = '{{ expireTime }}',
data__medium = '{{ medium }}',
data__startTime = '{{ startTime }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND conversationsId = '{{ conversationsId }}' --required
AND updateMask = '{{ updateMask}}'
AND allowMissing = {{ allowMissing}}
AND conversationAutoLabelingUpdateConfig.allowAutoLabelingUpdate = {{ conversationAutoLabelingUpdateConfig.allowAutoLabelingUpdate}}
RETURNING
name,
agentId,
callMetadata,
correlationInfo,
createTime,
dataSource,
dialogflowIntents,
duration,
expireTime,
labels,
languageCode,
latestAnalysis,
latestSummary,
medium,
metadataJson,
obfuscatedUserId,
qualityMetadata,
runtimeAnnotations,
startTime,
transcript,
ttl,
turnCount,
updateTime;
DELETE examples
- delete
- bulk_delete
Deletes a conversation.
DELETE FROM google.contactcenterinsights.conversations
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND conversationsId = '{{ conversationsId }}' --required
AND force = '{{ force }}'
;
Deletes multiple conversations in a single request.
DELETE FROM google.contactcenterinsights.conversations
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
;
Lifecycle Methods
- generate_signed_audio
- ingest
- sample
- calculate_stats
- upload
- bulk_analyze
Gets the signed URI for the audio for the given conversation.
EXEC google.contactcenterinsights.conversations.generate_signed_audio
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@conversationsId='{{ conversationsId }}' --required
;
Imports conversations and processes them according to the user's configuration.
EXEC google.contactcenterinsights.conversations.ingest
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required
@@json=
'{
"conversationConfig": "{{ conversationConfig }}",
"transcriptObjectConfig": "{{ transcriptObjectConfig }}",
"parent": "{{ parent }}",
"redactionConfig": "{{ redactionConfig }}",
"gcsSource": "{{ gcsSource }}",
"speechConfig": "{{ speechConfig }}",
"sampleSize": {{ sampleSize }}
}'
;
Samples conversations based on user configuration and handles the sampled conversations for different use cases.
EXEC google.contactcenterinsights.conversations.sample
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required
@@json=
'{
"destinationDataset": "{{ destinationDataset }}",
"parent": "{{ parent }}",
"sampleRule": "{{ sampleRule }}"
}'
;
Gets conversation statistics.
EXEC google.contactcenterinsights.conversations.calculate_stats
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@filter='{{ filter }}'
;
Create a long-running conversation upload operation. This method differs from CreateConversation by allowing audio transcription and optional DLP redaction.
EXEC google.contactcenterinsights.conversations.upload
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required
@@json=
'{
"speechConfig": "{{ speechConfig }}",
"conversation": "{{ conversation }}",
"conversationId": "{{ conversationId }}",
"redactionConfig": "{{ redactionConfig }}",
"parent": "{{ parent }}"
}'
;
Analyzes multiple conversations in a single request.
EXEC google.contactcenterinsights.conversations.bulk_analyze
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required
@@json=
'{
"relabel": {{ relabel }},
"parent": "{{ parent }}",
"analysisPercentage": {{ analysisPercentage }},
"filter": "{{ filter }}",
"annotatorSelector": "{{ annotatorSelector }}"
}'
;