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
Successful response
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) |
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, if unspecified will default to PHONE_CALL. |
metadataJson | string | Input only. 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. |
Successful response
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) |
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, if unspecified will default to PHONE_CALL. |
metadataJson | string | Input only. 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 , authorizedViewSetsId , authorizedViewsId , conversationsId | view | Gets a conversation. |
list | select | projectsId , locationsId , authorizedViewSetsId , authorizedViewsId | pageSize , pageToken , filter , orderBy , view | 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 | Updates a conversation. |
delete | delete | projectsId , locationsId , authorizedViewSetsId , authorizedViewsId , conversationsId | force | Deletes a conversation. |
bulk_delete | delete | projectsId , locationsId , datasetsId | Deletes multiple conversations in a single request. | |
upload | exec | projectsId , locationsId | Create a long-running conversation upload operation. This method differs from CreateConversation by allowing audio transcription and optional DLP redaction. | |
sample | exec | projectsId , locationsId , datasetsId | Samples conversations based on user configuration and handles the sampled conversations for different use cases. | |
bulk_analyze | exec | projectsId , locationsId , authorizedViewSetsId , authorizedViewsId | Analyzes multiple conversations in a single request. | |
ingest | exec | projectsId , locationsId , datasetsId | Imports conversations and processes them according to the user's configuration. | |
calculate_stats | exec | projectsId , locationsId , authorizedViewSetsId , authorizedViewsId | filter | Gets conversation statistics. |
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 |
---|---|---|
authorizedViewSetsId | string | |
authorizedViewsId | string | |
conversationsId | string | |
datasetsId | string | |
locationsId | string | |
projectsId | string | |
allowMissing | 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,
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 authorizedViewSetsId = '{{ authorizedViewSetsId }}' -- required
AND authorizedViewsId = '{{ authorizedViewsId }}' -- required
AND conversationsId = '{{ conversationsId }}' -- required
AND view = '{{ view }}';
Lists conversations.
SELECT
name,
agentId,
callMetadata,
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 authorizedViewSetsId = '{{ authorizedViewSetsId }}' -- required
AND authorizedViewsId = '{{ authorizedViewsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND view = '{{ view }}';
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__callMetadata,
data__expireTime,
data__ttl,
data__name,
data__dataSource,
data__startTime,
data__languageCode,
data__agentId,
data__labels,
data__qualityMetadata,
data__metadataJson,
data__medium,
data__obfuscatedUserId,
projectsId,
locationsId,
conversationId
)
SELECT
'{{ callMetadata }}',
'{{ expireTime }}',
'{{ ttl }}',
'{{ name }}',
'{{ dataSource }}',
'{{ startTime }}',
'{{ languageCode }}',
'{{ agentId }}',
'{{ labels }}',
'{{ qualityMetadata }}',
'{{ metadataJson }}',
'{{ medium }}',
'{{ obfuscatedUserId }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ conversationId }}'
RETURNING
name,
agentId,
callMetadata,
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: string
description: Required parameter for the conversations resource.
- name: locationsId
value: string
description: Required parameter for the conversations resource.
- name: callMetadata
value: object
description: >
Call-specific metadata.
- name: expireTime
value: string
description: >
The time at which this conversation should expire. After this time, the conversation data and any associated analyses will be deleted.
- name: ttl
value: string
description: >
Input only. The TTL for this resource. If specified, then this TTL will be used to calculate the expire time.
- name: name
value: string
description: >
Immutable. The resource name of the conversation. Format: projects/{project}/locations/{location}/conversations/{conversation}
- name: dataSource
value: object
description: >
The source of the audio and transcription for the conversation.
- name: startTime
value: string
description: >
The time at which the conversation started.
- name: languageCode
value: string
description: >
A user-specified language code for the conversation.
- name: agentId
value: string
description: >
An opaque, user-specified string representing the human agent who handled the conversation.
- name: labels
value: object
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: qualityMetadata
value: object
description: >
Conversation metadata related to quality management.
- name: metadataJson
value: string
description: >
Input only. 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: medium
value: string
description: >
Immutable. The conversation medium, if unspecified will default to PHONE_CALL.
valid_values: ['MEDIUM_UNSPECIFIED', 'PHONE_CALL', 'CHAT']
- name: obfuscatedUserId
value: string
description: >
Obfuscated user ID which the customer sent to us.
- name: conversationId
value: string
UPDATE
examples
- patch
Updates a conversation.
UPDATE google.contactcenterinsights.conversations
SET
data__callMetadata = '{{ callMetadata }}',
data__expireTime = '{{ expireTime }}',
data__ttl = '{{ ttl }}',
data__name = '{{ name }}',
data__dataSource = '{{ dataSource }}',
data__startTime = '{{ startTime }}',
data__languageCode = '{{ languageCode }}',
data__agentId = '{{ agentId }}',
data__labels = '{{ labels }}',
data__qualityMetadata = '{{ qualityMetadata }}',
data__metadataJson = '{{ metadataJson }}',
data__medium = '{{ medium }}',
data__obfuscatedUserId = '{{ obfuscatedUserId }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND conversationsId = '{{ conversationsId }}' --required
AND updateMask = '{{ updateMask}}'
AND allowMissing = {{ allowMissing}}
RETURNING
name,
agentId,
callMetadata,
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 authorizedViewSetsId = '{{ authorizedViewSetsId }}' --required
AND authorizedViewsId = '{{ authorizedViewsId }}' --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
AND datasetsId = '{{ datasetsId }}' --required;
Lifecycle Methods
- upload
- sample
- bulk_analyze
- ingest
- calculate_stats
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=
'{
"parent": "{{ parent }}",
"conversation": "{{ conversation }}",
"conversationId": "{{ conversationId }}",
"redactionConfig": "{{ redactionConfig }}",
"speechConfig": "{{ speechConfig }}"
}';
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,
@datasetsId='{{ datasetsId }}' --required
@@json=
'{
"destinationDataset": "{{ destinationDataset }}",
"parent": "{{ parent }}",
"sampleRule": "{{ sampleRule }}"
}';
Analyzes multiple conversations in a single request.
EXEC google.contactcenterinsights.conversations.bulk_analyze
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@authorizedViewSetsId='{{ authorizedViewSetsId }}' --required,
@authorizedViewsId='{{ authorizedViewsId }}' --required
@@json=
'{
"parent": "{{ parent }}",
"filter": "{{ filter }}",
"analysisPercentage": {{ analysisPercentage }},
"annotatorSelector": "{{ annotatorSelector }}"
}';
Imports conversations and processes them according to the user's configuration.
EXEC google.contactcenterinsights.conversations.ingest
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@datasetsId='{{ datasetsId }}' --required
@@json=
'{
"gcsSource": "{{ gcsSource }}",
"transcriptObjectConfig": "{{ transcriptObjectConfig }}",
"parent": "{{ parent }}",
"conversationConfig": "{{ conversationConfig }}",
"redactionConfig": "{{ redactionConfig }}",
"speechConfig": "{{ speechConfig }}",
"sampleSize": {{ sampleSize }}
}';
Gets conversation statistics.
EXEC google.contactcenterinsights.conversations.calculate_stats
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@authorizedViewSetsId='{{ authorizedViewSetsId }}' --required,
@authorizedViewsId='{{ authorizedViewsId }}' --required,
@filter='{{ filter }}';