啟用 Customer Experience Insights

使用 Customer Experience Insights (CX Insights) 分析對話資料前,請務必啟用特定 API。

在本快速入門導覽課程中,您將完成下列動作:

  1. 啟用 API:

  2. 向 Contact Center AI Insights API 傳送要求並接收回應。

  3. (選用) 將 CX Insights 與 VPC Service Controls 搭配使用。

事前準備

貴機構定義的安全性限制,可能會導致您無法完成下列步驟。如需疑難排解資訊,請參閱「在受限的 Google Cloud 環境中開發應用程式」。

  1. 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 the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  2. Verify that billing is enabled for your Google Cloud project.

  3. 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 Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

    Enable the APIs

傳送要求並接收回應

  1. 安裝並設定 Google Cloud CLI。您可以在下列任一開發環境中設定 gcloud CLI:

    Cloud Shell

    如要使用已設定 gcloud CLI 的線上終端機,請啟用 Cloud Shell:

    頁面底部會開啟 Cloud Shell 工作階段,並顯示指令列提示。工作階段可能要幾秒鐘的時間才能初始化。

    本機殼層

    如要使用本機開發環境,請按照下列步驟操作:

    1. 安裝 gcloud CLI。
    2. 初始化 gcloud CLI。

  2. 為使用者帳戶建立本機驗證憑證:

    gcloud auth application-default login

    如果系統傳回驗證錯誤,且您使用外部識別資訊提供者 (IdP),請確認您已 使用聯合身分登入 gcloud CLI。

  3. 執行下列指令,列出所有 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:您執行這項要求的區域。

    指令應傳回空白字典:{}。

選用:將 CX Insights 與 VPC Service Controls 搭配使用

如要搭配 VPC Service Controls 使用 CX Insights,請將 CX Insights 新增至安全防護範圍。詳情請參閱 VPC Service Controls 說明文件。

後續步驟