Method: projects.locations.conversations.ingest

Imports conversations and processes them according to the user's configuration.

HTTP request

POST https://contactcenterinsights.googleapis.com/v1/{parent=projects/*/locations/*}/conversations:ingest

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The parent resource for new conversations.

Request body

The request body contains data with the following structure:

JSON representation
{
  "conversationConfig": {
    object (ConversationConfig)
  },
  "redactionConfig": {
    object (RedactionConfig)
  },
  "speechConfig": {
    object (SpeechConfig)
  },

  // Union field source can be only one of the following:
  "gcsSource": {
    object (GcsSource)
  }
  // End of list of possible types for union field source.

  // Union field object_config can be only one of the following:
  "transcriptObjectConfig": {
    object (TranscriptObjectConfig)
  }
  // End of list of possible types for union field object_config.
}
Fields
conversationConfig

object (ConversationConfig)

Configuration that applies to all conversations.

redactionConfig

object (RedactionConfig)

Optional. DLP settings for transcript redaction. Optional, will default to the config specified in Settings.

speechConfig

object (SpeechConfig)

Optional. Default Speech-to-Text configuration. Optional, will default to the config specified in Settings.

Union field source. Configuration for an external data store containing objects that will be converted to conversations. source can be only one of the following:
gcsSource

object (GcsSource)

A cloud storage bucket source. Note that any previously ingested objects from the source will be skipped to avoid duplication.

Union field object_config. Configuration for converting individual source objects to conversations. object_config can be only one of the following:
transcriptObjectConfig

object (TranscriptObjectConfig)

Configuration for when source contains conversation transcripts.

Response body

If successful, the response body contains an instance of Operation.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • contactcenterinsights.conversations.create

For more information, see the IAM documentation.

GcsSource

Configuration for Cloud Storage bucket sources.

JSON representation
{
  "bucketUri": string,
  "bucketObjectType": enum (BucketObjectType),
  "customMetadataKeys": [
    string
  ],
  "metadataBucketUri": string
}
Fields
bucketUri

string

Required. The Cloud Storage bucket containing source objects.

bucketObjectType

enum (BucketObjectType)

Optional. Specifies the type of the objects in bucketUri.

customMetadataKeys[]

string

Optional. Custom keys to extract as conversation labels from metadata files in metadataBucketUri. Keys not included in this field will be ignored. Note that there is a limit of 20 labels per conversation.

metadataBucketUri

string

Optional. The Cloud Storage path to the source object metadata. Note that: [1] metadata files are expected to be in JSON format [2] metadata and source objects must be in separate buckets [3] a source object's metadata object must share the same name to be properly ingested.

BucketObjectType

Enums
BUCKET_OBJECT_TYPE_UNSPECIFIED The object type is unspecified and will default to TRANSCRIPT.
TRANSCRIPT The object is a transcript.
AUDIO The object is an audio file.

TranscriptObjectConfig

Configuration for processing transcript objects.

JSON representation
{
  "medium": enum (Medium)
}
Fields
medium

enum (Medium)

Required. The medium transcript objects represent.

ConversationConfig

Configuration that applies to all conversations.

JSON representation
{
  "agentId": string,
  "agentChannel": integer,
  "customerChannel": integer
}
Fields
agentId

string

An opaque, user-specified string representing the human agent who handled the conversations.

agentChannel

integer

Optional. Indicates which of the channels, 1 or 2, contains the agent. Note that this must be set for conversations to be properly displayed and analyzed.

customerChannel

integer

Optional. Indicates which of the channels, 1 or 2, contains the agent. Note that this must be set for conversations to be properly displayed and analyzed.