Enable Customer Experience Insights
Before using Customer Experience Insights (CX Insights) to analyze conversational data, you must enable specific APIs.
In this quickstart, you will complete the following actions:
Enable the APIs:
- Cloud Speech-to-Text API—to upload audio files.
- Cloud Storage API—to ingest conversations into CX Insights.
- Contact Center AI Insights API—to use CX Insights.
- Dialogflow API—to support Dialogflow runtime integration and topic modeling.
- Sensitive Data Protection (DLP) API—to perform redaction on audio or transcript files.
Send a request to the Contact Center AI Insights API and receive a response.
Optionally, use CX Insights with VPC Service Controls.
Before you begin
Security constraints defined by your organization might prevent you from completing the following steps. For troubleshooting information, see Develop applications in a constrained Google Cloud environment.
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
-
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.-
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.
Send a request and receive a response
Install and set up the Google Cloud CLI. You can set up the gcloud CLI in one of the following development environments:
Cloud Shell
To use an online terminal with the gcloud CLI already set up, activate Cloud Shell:
At the bottom of this page, a Cloud Shell session starts and displays a command-line prompt. It can take a few seconds for the session to initialize.
Local shell
To use a local development environment, follow these steps:
-
Create local authentication credentials for your user account:
gcloud auth application-default login
If an authentication error is returned, and you are using an external identity provider (IdP), confirm that you have signed in to the gcloud CLI with your federated identity.
Verify your setup by running the following command, which lists all of your CX Insights conversations.
curl -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" "https://contactcenterinsights.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/conversations"Replace the following:
PROJECT_ID: your Google Cloud project ID.LOCATION: the region in which you are running this request.
The command should return an empty dictionary:
{}.
Optional: Use CX Insights with VPC Service Controls
To use CX Insights with VPC Service Controls, add CX Insights to your security perimeter. For more information, see the VPC Service Controls documentation.