カスタマー エクスペリエンスのインサイトを有効にする
カスタマー エクスペリエンス インサイト(CX インサイト)を使用して会話データを分析する前に、特定の API を有効にする必要があります。
このクイックスタートでは、次の操作を行います。
API を有効にします。
- Cloud Speech-to-Text API - 音声ファイルをアップロードします。
- Cloud Storage API - 会話を CX Insights に取り込むため。
- Contact Center AI Insights API - CX Insights を使用します。
- Dialogflow API - Dialogflow ランタイム統合とトピック モデリングをサポートします。
- Sensitive Data Protection(DLP)API - 音声ファイルまたは文字起こしファイルの秘匿化を行うため。
Contact Center AI Insights API にリクエストを送信して、レスポンスを受け取ります。
必要に応じて、VPC Service Controls で CX Insights を使用します。
始める前に
組織で定義されているセキュリティの制約により、次の手順を完了できない場合があります。トラブルシューティング情報については、制約のある Google Cloud 環境でアプリケーションを開発するをご覧ください。
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
Enable the Cloud Speech-to-Text, Cloud Storage, Contact Center AI Insights, Dialogflow, and Sensitive Data Protection (DLP) APIs.
Roles required to enable APIs
To enable APIs, you need the
serviceusage.services.enablepermission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.
リクエストを送信してレスポンスを受信する
Google Cloud CLI をインストールして設定します。gcloud CLI は、次のいずれかの開発環境で設定できます。
Cloud Shell
gcloud CLI がすでに設定されているオンライン ターミナルを使用するには、Cloud Shell をアクティブにします。
このページの下部で Cloud Shell セッションが開始され、コマンドライン プロンプトが表示されます。セッションが初期化されるまで数秒かかることがあります。
ローカルシェル
ローカル開発環境を使用する手順は次のとおりです。
-
ユーザー アカウントのローカル認証情報を作成します。
gcloud auth application-default login
認証エラーが返され、外部 ID プロバイダ(IdP)を使用している場合は、 フェデレーション ID を使用して gcloud CLI にログインしていることを確認します。
次のコマンドを実行して設定を確認します。このコマンドは、すべての CX Insights の会話を一覧表示します。
curl -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" "https://contactcenterinsights.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/conversations"次のように置き換えます。
PROJECT_ID: 実際の Google Cloud プロジェクト ID。LOCATION: このリクエストを実行しているリージョン。
コマンドは空の辞書
{}を返します。
省略可: VPC Service Controls で CX Insights を使用する
VPC Service Controls で CX Insights を使用するには、セキュリティ境界に CX Insights を追加します。詳細については、VPC Service Controls のドキュメントをご覧ください。