Reputation: 183
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
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
Make sure that you have set up the application-default credentials
Upvotes: 1