Skip to content

GCP.ContactCenterInsights reference

Source: src/GCP/ContactCenterInsights/AnalysisRule.ts

A Contact Center AI Insights analysis rule that selects conversations and the annotators to run on them.

Analysis rules have no labels field — Alchemy stamps ownership into the display name so list / nuke can find them. Location and id are immutable. Filter, active flag, analysis percentage, and annotators update in place.

Inactive draft rule

const rule = yield* GCP.ContactCenterInsights.AnalysisRule("Draft", {
displayName: "draft-sentiment",
active: false,
analysisPercentage: 0,
annotatorSelector: { runSentimentAnnotator: true },
});

Named rule with a conversation filter

const rule = yield* GCP.ContactCenterInsights.AnalysisRule("Draft", {
analysisRuleId: "sentiment-en",
conversationFilter: 'language_code="en-US"',
active: false,
annotatorSelector: { runSentimentAnnotator: true },
});

Source: src/GCP/ContactCenterInsights/AssessmentRule.ts

A Contact Center AI Insights assessment rule that samples conversations on a schedule for quality assessment.

Assessment rules have no labels field — Alchemy stamps ownership into the display name. Location and id are immutable. Active flag, sample rule, and schedule update in place.

AssessmentRule: Creating an Assessment Rule

Section titled “AssessmentRule: Creating an Assessment Rule”
const rule = yield* GCP.ContactCenterInsights.AssessmentRule("Qa", {
displayName: "hourly-qa",
active: false,
sampleRule: { samplePercentage: 0.1 },
scheduleInfo: { schedule: "every 1 hours", timeZone: "UTC" },
});

Source: src/GCP/ContactCenterInsights/AuthorizedViewSet.ts

A Contact Center AI Insights AuthorizedViewSet, a container for AuthorizedView resources.

AuthorizedViewSets have no labels field — Alchemy stamps ownership into the display name. Location and id are immutable. Display name updates in place.

AuthorizedViewSet: Creating an AuthorizedViewSet

Section titled “AuthorizedViewSet: Creating an AuthorizedViewSet”

Generated id

const set = yield* GCP.ContactCenterInsights.AuthorizedViewSet("QaViews", {
displayName: "qa-reviewers",
});

Named set

const set = yield* GCP.ContactCenterInsights.AuthorizedViewSet("QaViews", {
authorizedViewSetId: "qa-reviewers",
displayName: "qa-reviewers",
});

Source: src/GCP/ContactCenterInsights/AuthorizedViewSetsAuthorizedView.ts

A Contact Center AI Insights AuthorizedView, a filtered view of conversations and related Insights resources.

AuthorizedViews have no labels field — Alchemy stamps ownership into the display name. Parent set and id are immutable. Display name and conversation filter update in place.

AuthorizedViewSetsAuthorizedView: Creating an AuthorizedView

Section titled “AuthorizedViewSetsAuthorizedView: Creating an AuthorizedView”
const view = yield* GCP.ContactCenterInsights.AuthorizedViewSetsAuthorizedView(
"Reviewers",
{
parent: set.name,
displayName: "reviewers",
conversationFilter: 'language_code="en-US"',
},
);

AuthorizedViewSetsAuthorizedViewsConversationsAssessment

Section titled “AuthorizedViewSetsAuthorizedViewsConversationsAssessment”

Source: src/GCP/ContactCenterInsights/AuthorizedViewSetsAuthorizedViewsConversationsAssessment.ts

A Contact Center AI Insights quality assessment of a conversation, created through an AuthorizedView.

Assessments have no labels field and no patch API — Alchemy stamps ownership into agentInfo.displayName. Parent conversation is immutable. Reconcile is observe-then-ensure.

AuthorizedViewSetsAuthorizedViewsConversationsAssessment: Creating an Assessment

Section titled “AuthorizedViewSetsAuthorizedViewsConversationsAssessment: Creating an Assessment”
const assessment =
yield* GCP.ContactCenterInsights.AuthorizedViewSetsAuthorizedViewsConversationsAssessment(
"Qa",
{
parent: `${view.name}/conversations/${conversation.conversationId}`,
agentInfo: { agentId: "agent-1", displayName: "Ada" },
},
);

AuthorizedViewSetsAuthorizedViewsConversationsFeedbackLabel

Section titled “AuthorizedViewSetsAuthorizedViewsConversationsFeedbackLabel”

Source: src/GCP/ContactCenterInsights/AuthorizedViewSetsAuthorizedViewsConversationsFeedbackLabel.ts

A Contact Center AI Insights feedback label on a conversation, created through an AuthorizedView.

Feedback labels have no labels map — Alchemy stamps ownership into the string label. Parent conversation and id are immutable. Label text, labeled resource, and QA answer update in place.

AuthorizedViewSetsAuthorizedViewsConversationsFeedbackLabel: Creating a Feedback Label

Section titled “AuthorizedViewSetsAuthorizedViewsConversationsFeedbackLabel: Creating a Feedback Label”
const feedback =
yield* GCP.ContactCenterInsights.AuthorizedViewSetsAuthorizedViewsConversationsFeedbackLabel(
"Topic",
{
parent: `${view.name}/conversations/${conversation.conversationId}`,
label: "billing",
},
);

Source: src/GCP/ContactCenterInsights/AutoLabelingRule.ts

A Contact Center AI Insights auto-labeling rule that writes a custom label onto matching conversations.

Auto-labeling rules have no labels field — Alchemy stamps ownership into the description. Location and id are immutable. Display name, description, active flag, and conditions update in place.

AutoLabelingRule: Creating an Auto-Labeling Rule

Section titled “AutoLabelingRule: Creating an Auto-Labeling Rule”
const rule = yield* GCP.ContactCenterInsights.AutoLabelingRule("Topic", {
displayName: "billing-topic",
active: false,
conditions: [{ value: '"billing"', condition: "true" }],
});

Source: src/GCP/ContactCenterInsights/Conversation.ts

A Contact Center AI Insights conversation (chat or phone call).

create does not transcribe or redact audio — use conversations.upload for that. Location, id, and medium are immutable. Labels, agent id, language, and expiry update in place.

Chat conversation with labels

const conversation = yield* GCP.ContactCenterInsights.Conversation(
"Chat",
{
medium: "CHAT",
languageCode: "en-US",
agentId: "agent-1",
labels: { env: "test" },
},
);

Transcript from Cloud Storage

const conversation = yield* GCP.ContactCenterInsights.Conversation(
"Chat",
{
medium: "CHAT",
dataSource: {
gcsSource: { transcriptUri: "gs://bucket/transcript.json" },
},
},
);

Source: src/GCP/ContactCenterInsights/ConversationsAnalyses.ts

An analysis of a Contact Center Insights conversation.

Parent conversation and annotator selector are immutable — there is no update RPC, so changing either replaces the analysis. Create is a long-running operation that completes when the analysis finishes. Analyses have no labels field; list walks alchemy-labeled parent conversations.

ConversationsAnalyses: Creating an Analysis

Section titled “ConversationsAnalyses: Creating an Analysis”
const analysis = yield* GCP.ContactCenterInsights.ConversationsAnalyses(
"Silence",
{
parent: conversation.name,
annotatorSelector: { runSilenceAnnotator: true },
},
);

Source: src/GCP/ContactCenterInsights/ConversationsAssessment.ts

A quality assessment of a Contact Center Insights conversation.

Parent conversation and agent info are immutable — there is no update RPC, so changing either replaces the assessment. Assessments have no labels field; Alchemy stamps ownership into agentInfo.displayName.

ConversationsAssessment: Creating an Assessment

Section titled “ConversationsAssessment: Creating an Assessment”
const assessment = yield* GCP.ContactCenterInsights.ConversationsAssessment(
"QA",
{
parent: conversation.name,
agentInfo: { agentId: "agent-1", displayName: "Ada", agentType: "HUMAN_AGENT" },
},
);

Source: src/GCP/ContactCenterInsights/ConversationsFeedbackLabel.ts

A feedback label on a Contact Center Insights conversation.

Parent conversation and feedback label id are immutable. Feedback labels have no labels map — Alchemy stamps ownership into the label string. The label text, labeled resource, and QA answer update in place.

ConversationsFeedbackLabel: Creating a Feedback Label

Section titled “ConversationsFeedbackLabel: Creating a Feedback Label”
const label = yield* GCP.ContactCenterInsights.ConversationsFeedbackLabel(
"Topic",
{
parent: conversation.name,
label: "billing",
},
);

Source: src/GCP/ContactCenterInsights/Dashboard.ts

A Contact Center Insights dashboard of conversation charts.

Dashboards have no labels field — Alchemy stamps ownership into the description. Location and dashboard id are immutable. Display name, description, filter, date range, and root container update in place.

Generated id

const dashboard = yield* GCP.ContactCenterInsights.Dashboard("Overview", {
displayName: "overview",
description: "call quality",
});

Named dashboard

const dashboard = yield* GCP.ContactCenterInsights.Dashboard("Overview", {
dashboardId: "quality-overview",
displayName: "quality",
});

Source: src/GCP/ContactCenterInsights/DashboardsChart.ts

A chart widget on a Contact Center Insights dashboard.

Parent dashboard and chart id are immutable. Charts have no labels field — Alchemy stamps ownership into the description. Display name, description, filter, size, visualization, and data source update in place.

const chart = yield* GCP.ContactCenterInsights.DashboardsChart("Volume", {
parent: dashboard.name,
displayName: "volume",
chartVisualizationType: "BAR",
});

Source: src/GCP/ContactCenterInsights/DatasetsConversationsFeedbackLabel.ts

A feedback label on a conversation inside a Contact Center Insights dataset.

Parent dataset conversation and feedback label id are immutable. Feedback labels have no labels map — Alchemy stamps ownership into the label string. The label text, labeled resource, and QA answer update in place.

DatasetsConversationsFeedbackLabel: Creating a Dataset Conversation Feedback Label

Section titled “DatasetsConversationsFeedbackLabel: Creating a Dataset Conversation Feedback Label”
const label = yield* GCP.ContactCenterInsights.DatasetsConversationsFeedbackLabel(
"Topic",
{
parent: datasetConversation.name,
label: "billing",
},
);

Source: src/GCP/ContactCenterInsights/IssueModel.ts

A Contact Center Insights issue model for topic modeling.

Issue models have no labels field — Alchemy stamps ownership into the display name. Location is immutable. Display name, language, model type, and input data config update in place. Create and delete are long-running; a deployed model is undeployed before delete.

const model = yield* GCP.ContactCenterInsights.IssueModel("Topics", {
displayName: "billing-topics",
modelType: "TYPE_V2",
inputDataConfig: { medium: "CHAT" },
});

Source: src/GCP/ContactCenterInsights/IssueModelsIssue.ts

An issue under a Contact Center Insights issue model.

Parent issue model is immutable. Issues have no labels field — Alchemy stamps ownership into displayDescription. Display name and description update in place. Create is a long-running operation; the parent model must be undeployed.

const issue = yield* GCP.ContactCenterInsights.IssueModelsIssue("Billing", {
parent: model.name,
displayName: "billing",
displayDescription: "questions about invoices",
});

Source: src/GCP/ContactCenterInsights/PhraseMatcher.ts

A Contact Center AI Insights phrase matcher that flags conversations containing configured phrases.

Phrase matchers have no labels field — Alchemy stamps ownership into the display name so list / nuke can find them. Location and id are immutable. Display name, type, active flag, role, version tag, and rule groups update in place.

const matcher = yield* GCP.ContactCenterInsights.PhraseMatcher("Refunds", {
displayName: "refunds",
type: "ALL_OF",
active: false,
phraseMatchRuleGroups: [
{
type: "ANY_OF",
phraseMatchRules: [
{
query: "refund",
config: { exactMatchConfig: { caseSensitive: false } },
},
],
},
],
});

Source: src/GCP/ContactCenterInsights/QaQuestionTag.ts

A Contact Center AI Insights QA question tag used to categorize questions across scorecards.

Question tags have no labels field — Alchemy stamps ownership into the display name. Location and id are immutable. Display name and linked question ids update in place. Patch and delete are long-running.

const tag = yield* GCP.ContactCenterInsights.QaQuestionTag("Billing", {
displayName: "billing",
});

Source: src/GCP/ContactCenterInsights/QaScorecard.ts

A Contact Center AI Insights QA scorecard — a collection of questions scored during analysis.

Scorecards have no labels field — Alchemy stamps ownership into the description. Location and id are immutable. Display name and description update in place. Delete uses force so child revisions and questions are removed.

const card = yield* GCP.ContactCenterInsights.QaScorecard("Quality", {
displayName: "quality",
description: "call quality",
});

Source: src/GCP/ContactCenterInsights/QaScorecardsRevision.ts

A revision of a Contact Center AI Insights QA scorecard. Changing a published scorecard invalidates existing results, so updates create a new revision instead of mutating the current one.

Parent scorecard and revision id are immutable. Revisions have no labels or display name — Alchemy stamps ownership into snapshot.description on create (and list also matches revisions whose parent scorecard snapshot already carries an Alchemy marker). There is no update API; reconcile is observe-ensure only. A READY revision is undeployed before delete.

QaScorecardsRevision: Creating a Scorecard Revision

Section titled “QaScorecardsRevision: Creating a Scorecard Revision”
const revision = yield* GCP.ContactCenterInsights.QaScorecardsRevision(
"V1",
{ parent: card.name },
);

Source: src/GCP/ContactCenterInsights/QaScorecardsRevisionsQaQuestion.ts

A question on a Contact Center AI Insights QA scorecard revision.

Parent revision and question id are immutable. Questions have no labels field — Alchemy stamps ownership into answerInstructions. Question body, abbreviation, instructions, order, choices, and tags update in place while the parent revision is EDITABLE.

QaScorecardsRevisionsQaQuestion: Creating a QA Question

Section titled “QaScorecardsRevisionsQaQuestion: Creating a QA Question”
const question = yield* GCP.ContactCenterInsights.QaScorecardsRevisionsQaQuestion(
"Greeting",
{
parent: revision.name,
abbreviation: "Greeting",
questionBody: "Did the agent greet the customer?",
answerChoices: [
{ strValue: "Yes", score: 1 },
{ strValue: "No", score: 0 },
],
},
);

Source: src/GCP/ContactCenterInsights/View.ts

A Contact Center AI Insights saved view — a named conversation filter.

Views have no labels field — Alchemy stamps ownership into the display name. Location and id are immutable. Display name and filter value update in place.

const view = yield* GCP.ContactCenterInsights.View("Chat", {
displayName: "chat",
value: 'medium="CHAT"',
});