Skip to main content

conversations

Creates, updates, deletes, gets or lists a conversations resource.

Overview

Nameconversations
TypeResource
Idgoogle.contactcenterinsights.conversations

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringImmutable. The resource name of the conversation. Format: projects/{project}/locations/{location}/conversations/{conversation}
agentIdstringAn opaque, user-specified string representing the human agent who handled the conversation.
callMetadataobjectCall-specific metadata. (id: GoogleCloudContactcenterinsightsV1ConversationCallMetadata)
createTimestring (google-datetime)Output only. The time at which the conversation was created.
dataSourceobjectThe source of the audio and transcription for the conversation. (id: GoogleCloudContactcenterinsightsV1ConversationDataSource)
dialogflowIntentsobjectOutput only. All the matched Dialogflow intents in the call. The key corresponds to a Dialogflow intent, format: projects/{project}/agent/{agent}/intents/{intent}
durationstring (google-duration)Output only. The duration of the conversation.
expireTimestring (google-datetime)The time at which this conversation should expire. After this time, the conversation data and any associated analyses will be deleted.
labelsobjectA 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.
languageCodestringA user-specified language code for the conversation.
latestAnalysisobjectOutput only. The conversation's latest analysis, if one exists. (id: GoogleCloudContactcenterinsightsV1Analysis)
latestSummaryobjectOutput only. Latest summary of the conversation. (id: GoogleCloudContactcenterinsightsV1ConversationSummarizationSuggestionData)
mediumstringImmutable. The conversation medium, if unspecified will default to PHONE_CALL.
metadataJsonstringInput 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.
obfuscatedUserIdstringObfuscated user ID which the customer sent to us.
qualityMetadataobjectConversation metadata related to quality management. (id: GoogleCloudContactcenterinsightsV1ConversationQualityMetadata)
runtimeAnnotationsarrayOutput only. The annotations that were generated during the customer and agent interaction.
startTimestring (google-datetime)The time at which the conversation started.
transcriptobjectOutput only. The conversation transcript. (id: GoogleCloudContactcenterinsightsV1ConversationTranscript)
ttlstring (google-duration)Input only. The TTL for this resource. If specified, then this TTL will be used to calculate the expire time.
turnCountinteger (int32)Output only. The number of turns in the conversation.
updateTimestring (google-datetime)Output only. The most recent time at which the conversation was updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, authorizedViewSetsId, authorizedViewsId, conversationsIdviewGets a conversation.
listselectprojectsId, locationsId, authorizedViewSetsId, authorizedViewsIdpageSize, pageToken, filter, orderBy, viewLists conversations.
createinsertprojectsId, locationsIdconversationIdCreates a conversation. Note that this method does not support audio transcription or redaction. Use conversations.upload instead.
patchupdateprojectsId, locationsId, conversationsIdupdateMask, allowMissingUpdates a conversation.
deletedeleteprojectsId, locationsId, authorizedViewSetsId, authorizedViewsId, conversationsIdforceDeletes a conversation.
bulk_deletedeleteprojectsId, locationsId, datasetsIdDeletes multiple conversations in a single request.
uploadexecprojectsId, locationsIdCreate a long-running conversation upload operation. This method differs from CreateConversation by allowing audio transcription and optional DLP redaction.
sampleexecprojectsId, locationsId, datasetsIdSamples conversations based on user configuration and handles the sampled conversations for different use cases.
bulk_analyzeexecprojectsId, locationsId, authorizedViewSetsId, authorizedViewsIdAnalyzes multiple conversations in a single request.
ingestexecprojectsId, locationsId, datasetsIdImports conversations and processes them according to the user's configuration.
calculate_statsexecprojectsId, locationsId, authorizedViewSetsId, authorizedViewsIdfilterGets 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.

NameDatatypeDescription
authorizedViewSetsIdstring
authorizedViewsIdstring
conversationsIdstring
datasetsIdstring
locationsIdstring
projectsIdstring
allowMissingboolean
conversationIdstring
filterstring
forceboolean
orderBystring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)
viewstring

SELECT examples

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 }}';

INSERT examples

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
;

UPDATE examples

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

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 }}';

Lifecycle Methods

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 }}"
}';