Skip to content

GCP.ContactCenterInsights reference

Source: packages/gcp/src/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: packages/gcp/src/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" },
});

AssessmentRule: Looking up an existing assessment rule

Section titled “AssessmentRule: Looking up an existing assessment rule”

AssessmentRule.lookup references an assessment rule Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared assessment rule.

const assessmentRule = GCP.ContactCenterInsights.AssessmentRule.lookup({
assessmentRuleId: "my-assessment-rule",
});

Source: packages/gcp/src/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",
});

AuthorizedViewSet: Looking up an existing authorized view set

Section titled “AuthorizedViewSet: Looking up an existing authorized view set”

AuthorizedViewSet.lookup references an authorized view set Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared authorized view set.

const authorizedViewSet = GCP.ContactCenterInsights.AuthorizedViewSet.lookup({
authorizedViewSetId: "my-authorized-view-set",
});

Source: packages/gcp/src/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"',
},
);

AuthorizedViewSetsAuthorizedView: Looking up an existing authorized view sets authorized view

Section titled “AuthorizedViewSetsAuthorizedView: Looking up an existing authorized view sets authorized view”

AuthorizedViewSetsAuthorizedView.lookup references an authorized view sets authorized view Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared authorized view sets authorized view.

const authorizedViewSetsAuthorizedView = GCP.ContactCenterInsights.AuthorizedViewSetsAuthorizedView.lookup({
authorizedViewId: "my-authorized-view",
parent: "my-parent",
});

AuthorizedViewSetsAuthorizedViewsConversationsAssessment

Section titled “AuthorizedViewSetsAuthorizedViewsConversationsAssessment”

Source: packages/gcp/src/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: packages/gcp/src/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: packages/gcp/src/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" }],
});

AutoLabelingRule: Looking up an existing auto labeling rule

Section titled “AutoLabelingRule: Looking up an existing auto labeling rule”

AutoLabelingRule.lookup references an auto labeling rule Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared auto labeling rule.

const autoLabelingRule = GCP.ContactCenterInsights.AutoLabelingRule.lookup({
autoLabelingRuleId: "my-auto-labeling-rule",
});

Source: packages/gcp/src/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" },
},
},
);

Conversation: Looking up an existing conversation

Section titled “Conversation: Looking up an existing conversation”

Conversation.lookup references a conversation Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared conversation.

const conversation = GCP.ContactCenterInsights.Conversation.lookup({
conversationId: "my-conversation",
});

Source: packages/gcp/src/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: packages/gcp/src/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: packages/gcp/src/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: packages/gcp/src/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",
});

Dashboard: Looking up an existing dashboard

Section titled “Dashboard: Looking up an existing dashboard”

Dashboard.lookup references a dashboard Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared dashboard.

const dashboard = GCP.ContactCenterInsights.Dashboard.lookup({
dashboardId: "my-dashboard",
});

Source: packages/gcp/src/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: packages/gcp/src/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: packages/gcp/src/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: packages/gcp/src/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: packages/gcp/src/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: packages/gcp/src/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",
});

QaScorecard: Looking up an existing qa scorecard

Section titled “QaScorecard: Looking up an existing qa scorecard”

QaScorecard.lookup references a qa scorecard Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared qa scorecard.

const qaScorecard = GCP.ContactCenterInsights.QaScorecard.lookup({
qaScorecardId: "my-qa-scorecard",
});

Source: packages/gcp/src/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 },
);

QaScorecardsRevision: Looking up an existing qa scorecards revision

Section titled “QaScorecardsRevision: Looking up an existing qa scorecards revision”

QaScorecardsRevision.lookup references a qa scorecards revision Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared qa scorecards revision.

const qaScorecardsRevision = GCP.ContactCenterInsights.QaScorecardsRevision.lookup({
qaScorecardRevisionId: "my-qa-scorecard-revision",
parent: "my-parent",
});

Source: packages/gcp/src/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 },
],
},
);

QaScorecardsRevisionsQaQuestion: Looking up an existing qa scorecards revisions qa question

Section titled “QaScorecardsRevisionsQaQuestion: Looking up an existing qa scorecards revisions qa question”

QaScorecardsRevisionsQaQuestion.lookup references a qa scorecards revisions qa question Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared qa scorecards revisions qa question.

const qaScorecardsRevisionsQaQuestion = GCP.ContactCenterInsights.QaScorecardsRevisionsQaQuestion.lookup({
qaQuestionId: "my-qa-question",
parent: "my-parent",
});

Source: packages/gcp/src/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"',
});