Filtering

You can filter conversations based on information gleaned directly from their characteristics or from attributes of operations that those conversations have been through.

Conversation filters

Conversations can be filtered on one or more of the characteristics in the following table. These filters are useful for narrowing down a search among large conversation data sets. The "Filtering" section of the List Conversations page lists the permissions you need to apply the following filters.

Filter term Description Field type Reference code
Agent ID String which identifies a unique agent string agent_id="some agent_id"
Analysis create time Time when the analysis was created numerical latest_analysis.create_time>"2023-12-31T16:00:10-08:00"
Analysis status Status of whether or not a conversation has been analyzed numerical

Has been analyzed:

latest_analysis:"*"

Has not been analyzed:

-latest_analysis:"*"

Conversation channel Medium of conversation: PHONE_CALL or CHAT string medium="PHONE_CALL"
Conversation create time Time when the conversation was imported into Insights numerical

create_time>"1969-12-31T16:00:10-08:00"

create_time<="1969-12-31T16:00:20-08:00"

Conversation label Label or tag assigned to a conversation string

labels:"key_only"

labels.key_1:"value_1"

Conversation start time Time at which conversation began numerical

start_time>"1969-12-31T16:00:10-08:00"

start_time>"1969-12-31T16:00:20-08:00"

Conversation update time Time when conversation was imported numerical

update_time>"1969-12-31T16:00:10-08:00"

update_time<="1969-12-31T16:00:20-08:00"

Custom highlight (also called Phrase matchers) Parameters that you define which are applied to portions of a conversation to help flag certain phrases. string

latest_analysis.analysis_result.call_analysis_metadata.phrase_matchers.id:"add_one_positive_custom_highlight"

latest_analysis.analysis_result.call_analysis_metadata.phrase_matchers.id:"multiple positive custom highlights"

latest_analysis.analysis_result.call_analysis_metadata.phrase_matchers.id:"one_negative_custom_highlight"

latest_analysis.analysis_result.call_analysis_metadata.phrase_matchers.id:"multiple negative custom highlights"

Dialogflow conversation Conversation that took place through Dialogflow, using a virtual agent string data_source.dialogflow_source.dialogflow_conversation="projects/123456789/locations/us-central1/conversations/some_dialogflow_conversation"
Dialogflow conversation profile ID String which identifies a unique Dialogflow conversation profile string

dialogflow_conversation_profile_id="some_dialogflow_conversation_profile_id"

data_source.dialogflow_source.dialogflow_conversation="projects/123456789/locations/us-central1/conversations/some_dialogflow_conversation"

Duration Length of time conversation lasts string duration<="20s"
Language Spoken or typed language used in the conversation. The language code is in BCP-47 format and prefixes are supported. string language_code: "some_language_code"
Latest analysis create time Time at which latest analysis was created numerical

latest_analysis.create_time>"1969-12-31T16:00:10-08:00"

latest_analysis.create_time<$eq;"1969-12-31T16:00:20-08:00"

Latest summary Most recent summary string

latest_summary.text:"phrase to match"

latest_summary.text:"and another"

latest_summary.text:"exclude this"

Smart highlight Suggested parameters which are applied to portions of a conversation to help flag certain phrases. string

latest_analysis.analysis_result.call_analysis_metadata.intents.display_name:"one_positive_smart_highlight"

latest_analysis.analysis_result.call_analysis_metadata.intents.display_name:"multiple positive smart highlights"

latest_analysis.analysis_result.call_analysis_metadata.intents.display_name:"one_negative_smart_highlight"

latest_analysis.analysis_result.call_analysis_metadata.intents.display_name:"multiple negative smart highlights"

Summary status Status of summary generation string

Has a summary:

latest_summary:"*"

No summary:

-latest_summary:"*"

Topic (also called Issue) Topic or issue identified by Topic Modeling. string

latest_analysis.analysis_result.issues.issue="projects/123456789/locations/us-central1/issueModels/test_model/issues/issue_foo"

latest_analysis.analysis_result.issue_model_id="projects/123456789/locations/us-central1/issueModels/test_model"

Transcript Text of conversation string

transcript.transcript_segments.text:"one_positive_term"

transcript.transcript_segments.text:"multiple positive terms"

transcript.transcript_segments.text:"one_negative_term""

transcript.transcript_segments.text:"multiple negative terms"

Turn count Number of conversation turns numerical

turn_count>"10"

turn_count<="20"

Operation filters

You can also filter conversations based on the information available from operations that have been performed on them. You can filter a conversation dataset based on the following operation attributes.

Filter term Description Reference code
Create time The time at which the operation was created.

metadata.create_time>"1969-12-31T16:00:10-08:00"

metadata.create_time<="1969-12-31T16:00:20-08:00"

Conversation ID The string which identifies a specific conversation. metadata.conversation_id="some_conversation_id"
Done The final status of an operation.

**Completed**: done="true"

**Not completed**: done="false"

Operation Type Identifies the type of operation performed on the dataset.

BulkAnalyzeConversations

CreateAnalysis

CreateIssueModel

DeleteIssueModel

DeployIssueModel

ExportInsightsData

IngestConversations

UndeployIssueModel

Status A detailed status of the operation.

**Completed successfully**: status_code="0"

**Failed but not aborted**: status_code!="ABORTED"

To view the errors from running a bulk operation, you must use a curl command.

  • Bulk analyze operations:
    curl -X GET \
     -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \
     -H "Content-Type: application/json; charset=utf-8" "https://contactcenterinsights.googleapis.com/v1/projects/$PROJECT/locations/$LOCATION/operations?filter=metadata.operation_type=\"BulkAnalyzeConversations\"&page_size=10"
  • Bulk ingest operations (transcript or audio):
    curl -X GET \
     -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \
     -H "Content-Type: application/json; charset=utf-8"  "https://contactcenterinsights.googleapis.com/v1/projects/$PROJECT/locations/$LOCATION/operations?filter=metadata.operation_type=\"IngestConversations\"&page_size=10"