Enable Dialogflow runtime integration

Dialogflow runtime integration lets you integrate data from other Dialogflow-powered Contact Center AI services into Contact Center AI Insights. These services also include Agent Assist and virtual agents. After you enable the integration, you can view conversations created in Agent Assist and virtual agent in CCAI Insights. To learn more about this feature, see the Concepts documentation.

Prerequisites

  1. Follow the instructions on the before you begin page to enable CCAI Insights for your Google Cloud project.
  2. Create a service account, and download the private JSON key file. You will need this file to authorize the integration. The service account associated with your project should be granted the Dialogflow API Admin role in order to authorize the integration.
  3. Authorize the integration by turning on the CCAI Insights export feature. You can do this directly or by using a curl command.

    1. Go to the Agent Assist console.

    2. Click the Settings option at the top right.

    3. Verify that Send data to Insights is enabled.

    Curl command:

    export GOOGLE_APPLICATION_CREDENTIALS=PATH
    curl -H "Content-Type: application/json" \
         -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \
         -X PATCH https://LOCATION-dialogflow.googleapis.com/v3/projects/PROJECT/locations/LOCATION/securitySettings/SECURITY_SETTINGS?update_mask=insights_export_settings \
         --data '{"insights_export_settings": {"enable_insights_export": true}}'
    
  4. (Optional) Enable CCAI Insights audio export settings for voice conversations. This step is necessary to make your audio files available for listening within CCAI Insights. Your audio files are stored in a Cloud Storage bucket and nowhere else. So if you don't enable audio_export_settings, CCAI Insights will only have access to the transcript and cannot play back the conversation audio.

    export GOOGLE_APPLICATION_CREDENTIALS=PATH
    curl -H "Content-Type: application/json" \
         -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \
         -X PATCH https://LOCATION-dialogflow.googleapis.com/v3/projects/PROJECT/locations/LOCATION/securitySettings/SECURITY_SETTINGS?update_mask=insights_export_settings \
         --data '{"audio_export_settings":{"gcs_bucket": "BUCKET","audio_format": "FORMAT"}}
    

    where BUCKET = the name of the Cloud Storage bucket where Dialogflow CX and Agent Assist conversation audio is stored and FORMAT = the supported audio format, like MP3 CCAI Insights

  5. Create a conversation profile using the Agent Assist console by following the tutorial instructions. Don't enable the virtual agent option.

  6. (Optional) Test the performance of your conversation profile using the Agent Assist simulator.

  7. Follow the instructions to create a Smart Reply conversation. Handling conversations at runtime requires direct API calls. These actions cannot be carried out using the Agent Assist console. Make sure that you complete the conversation before moving on. Only completed conversations are visible in CCAI Insights.

  8. Navigate to the CCAI Insights console.

  9. Enter the project ID that you used to create the Agent Assist conversation and view this conversation in CCAI Insights. The CCAI Insights conversation name matches the conversation name in Agent Assist.

Create a conversation in virtual agents and view it in CCAI Insights

  1. Create a virtual agent and optionally import sample data to your agent.
  2. The remaining steps are the same as creating a conversation in Agent Assist, with the exception that you must enable the virtual agent option when you create a conversation profile in order for the profile to use your newly created agent.

Create a conversation in Dialogflow CX console and view it in CCAI Insights

  1. Create a virtual agent.
  2. Test the agent to create a conversation.
  3. Navigate to the CCAI Insights console. After a few moments, you should see your conversation with the test agent on your conversation history.

Troubleshooting

For help with issues related to Dialogflow runtime integration, see the Troubleshooting page.