Csaba Kassai
Csaba Kassai

Reputation: 183

How to set up Dialogflow CX and CCAI Insights integration

I would like to enable CCAI Insights on my [Dialogflow CX Agent] (https://cloud.google.com/dialogflow/cx/docs/concept/agent)

Upvotes: 1

Views: 152

Answers (1)

Csaba Kassai
Csaba Kassai

Reputation: 183

The configuration to enable CCAI Insights on a Dialogflow CX Agent is on the SecuritySettings resource. So if you have not set up any security settings to your agent, do it as described here.

Once you have the security settings you can use the following script enable the CCAI Insights Service.

ENDPOINT='{{endpoint}}'
PROJECT_ID='{{project_id}}'
LOCATION='{{location}}'
SECURITY_SETTINGS_ID='{{security_settings_id}}'

ACCESS_TOKEN=$(gcloud auth application-default print-access-token)


curl --request PATCH \
$ENDPOINT'/v3/projects/'$PROJECT_ID'/locations/'$LOCATION'/securitySettings/'$SECURITY_SETTINGS_ID'?update_mask=insights_export_settings' \
--header 'Authorization: Bearer '$ACCESS_TOKEN \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Goog-User-Project: '$PROJECT_ID \
--data '{"insightsExportSettings":{"enableInsightsExport":true}}' \
--compressed
  • endpoint: Select the right endpoint based on the location of your agent from here.
  • project_id, location: The Dialogflow CX Agent project_id and location
  • security_settings_id: The ID you of the security settings used the agent. You can find it under the Manage Security Settings menu

Make sure that you have set up the application-default credentials

Upvotes: 1

Related Questions