Skip to main content

conversations

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

Overview

Nameconversations
TypeResource
Idgoogle.contactcenterinsights.conversations

Fields

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.
createTimestringOutput only. The time at which the conversation was created.
dataSourceobjectThe conversation source, which is a combination of transcript and audio.
dialogflowIntentsobjectOutput only. All the matched Dialogflow intents in the call. The key corresponds to a Dialogflow intent, format: projects/{project}/agent/{agent}/intents/{intent}
durationstringOutput only. The duration of the conversation.
expireTimestringThe 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 20 labels per conversation is allowed, with a maximum of 256 characters per entry.
languageCodestringA user-specified language code for the conversation.
latestAnalysisobjectThe analysis resource.
latestSummaryobjectConversation summarization suggestion data.
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 telphony systems and must be in one of Insights' supported formats.
obfuscatedUserIdstringObfuscated user ID which the customer sent to us.
qualityMetadataobjectConversation metadata related to quality management.
runtimeAnnotationsarrayOutput only. The annotations that were generated during the customer and agent interaction.
startTimestringThe time at which the conversation started.
transcriptobjectA message representing the transcript of a conversation.
ttlstringInput only. The TTL for this resource. If specified, then this TTL will be used to calculate the expire time.
turnCountintegerOutput only. The number of turns in the conversation.
updateTimestringOutput only. The most recent time at which the conversation was updated.

Methods

NameAccessible byRequired ParamsDescription
getSELECTconversationsId, locationsId, projectsIdGets a conversation.
listSELECTlocationsId, projectsIdLists conversations.
createINSERTlocationsId, projectsIdCreates a conversation. Does not support audio transcription or DLP redaction. Use conversations.upload instead.
bulk_deleteDELETElocationsId, projectsIdDeletes multiple conversations in a single request.
deleteDELETEconversationsId, locationsId, projectsIdDeletes a conversation.
patchUPDATEconversationsId, locationsId, projectsIdUpdates a conversation.
bulk_analyzeEXEClocationsId, projectsIdAnalyzes multiple conversations in a single request.
calculate_statsEXEClocationsId, projectsIdGets conversation statistics.
ingestEXEClocationsId, projectsIdImports conversations and processes them according to the user's configuration.
uploadEXEClocationsId, projectsIdCreate a long-running conversation upload operation. This method differs from CreateConversation by allowing audio transcription and optional DLP redaction.

SELECT examples

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 locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new conversations resource.

/*+ create */
INSERT INTO google.contactcenterinsights.conversations (
locationsId,
projectsId,
agentId,
name,
expireTime,
languageCode,
ttl,
obfuscatedUserId,
metadataJson,
medium,
callMetadata,
startTime,
qualityMetadata,
labels,
dataSource
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ agentId }}',
'{{ name }}',
'{{ expireTime }}',
'{{ languageCode }}',
'{{ ttl }}',
'{{ obfuscatedUserId }}',
'{{ metadataJson }}',
'{{ medium }}',
'{{ callMetadata }}',
'{{ startTime }}',
'{{ qualityMetadata }}',
'{{ labels }}',
'{{ dataSource }}'
;

UPDATE example

Updates a conversations resource.

/*+ update */
UPDATE google.contactcenterinsights.conversations
SET
agentId = '{{ agentId }}',
name = '{{ name }}',
expireTime = '{{ expireTime }}',
languageCode = '{{ languageCode }}',
ttl = '{{ ttl }}',
obfuscatedUserId = '{{ obfuscatedUserId }}',
metadataJson = '{{ metadataJson }}',
medium = '{{ medium }}',
callMetadata = '{{ callMetadata }}',
startTime = '{{ startTime }}',
qualityMetadata = '{{ qualityMetadata }}',
labels = '{{ labels }}',
dataSource = '{{ dataSource }}'
WHERE
conversationsId = '{{ conversationsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified conversations resource.

/*+ delete */
DELETE FROM google.contactcenterinsights.conversations
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';