Google Dialog Flow
Cisco CCE
12.6
VVB
Setup
Reference: https://cloud.google.com/contact-center/ccai-platform/docs/Virtual_Agent
- Create a Gmail account
- Sign up for GCP - free $300 and you need to supply credit card
- Log into GCP
- Enable API & Services and add “Dialogflow API” (This is needed - but actually you enable this for the project AFTER you create the project)
-
- Select CX Agent or browse to https://dialogflow.cloud.google.com/cx/projects
- Create Service Account
Sample Agent
TTS
Step by Step Guide
Creating Conversation Profile
Looks like one is needed for each CX Agent!
Watch out for the double quotes when coping from Google website - it can get corrupted.
- Open Google SDK CLI
- Login using the command gcloud auth login- which will open your browser and ask you to log into the account
- to get the bearer token - impersonate the Service account using the command
gcloud auth print-access-token --impersonate-service-account=Service Account IDM
This service account is a account you previously setup which should the following roles
- Service Account Token Creator
- Dialogflow API Admin
- Service Account User
Here is an example
C:\Users\gerar\AppData\Local\Google\Cloud SDK>gcloud auth login Your browser has been opened to visit: https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=32555940559.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A8085%2F&scope=openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fappengine.admin+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fsqlservice.login+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcompute+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Faccounts.reauth&state=zJXB7ym2y2hkZ9WgjpXGhCLseJCq19&access_type=offline&code_challenge=hYx7bEqoDwuomQ4SOCo2ILqECtYUHs307YzVAU04T-I&code_challenge_method=S256 You are now logged in as [[email protected]]. Your current project is [mydemo-project1]. You can change this setting by running: $ gcloud config set project PROJECT_ID C:\Users\gerar\AppData\Local\Google\Cloud SDK>gcloud auth print-access-token --impersonate-service-account=srv-account1@mydemo-project.iam.gserviceaccount.com WARNING: This command is using service account impersonation. All API calls will be executed as [[email protected]]. ya29axb5555555555555555555555555555555555555555555555555555555555555555fiS7WfG594_z7X3tU40pPPL4f7b7jytNV5TdoBeN9y00aOf-0WUEvWY3CIxg-PA4A3PhhXGsS4x5QRKCtPg2DJvrr0pRI-jP2ybhJzvvSHf4mgaxR5ChqjCvGwNxGOX3pZgvQARGKQjrRn7ROrMfd2v5LQbwn_I9zKyrLZPw0axoQWX6HfL8D1SeB1cuyAS0frRI9QMuNAWnoHtuuXkAILEG_Hv6Dd-GMLLKiJaBsBt1eHkiW87wvWUDxwa9SUISFOBe3DI4WR-ZW-4yi2XldJWS2MP42u3py8RbxKqarvPUS3OqpGcjJDhNeaCYOMKrV0P23pCRmUQPU1LY7L_qLdIfwzXclV-F3OQ2a9GgNUJx15a2A3yuPIULnBbFIwiEr-KAFSbqGN0OvcYiGIPCrZ_--iYwl5MQUSKuml2cZHGljoBwkG6KRc2BBAQ7_pjz3SIdAIBGXOc2j-v1lok9YC8DPygvdKhvCWIZQ6S9ediWf65WdsZWWBcEc-7x022ST585DSIb0SJarzmo4j6ZMj7s1tsFwfpbwcvrZUFBZI363ZgbqzWVFzUOv8beMuYuB7xXa0Qoj0-oaI94r_-3lgsIs229BIS0m39i7XqpsX47Yr4-868B5twdiiye3-90o8fyJ8-d9-V9_wpkBgScSFiOgV2MkQqgVQkJ05_1y2UYQ9lh7Xm2Wh1MeMex1Zn3gMYBkfwnlUwY0Y7zclX6WvMMBJ9wRhUU8ia3_3srpU6_VrQFlSXvs0m4JxejeW-YjtoItRr122xo5mIFp26ienjS9VhZx-vY_YplFgxX79vsW_3Yk7jO5o7YZ1p3Z1nck_555555555555555555555555555_sSld8z6Bc9McnIeZ6gQRgBgIkS8Xo6-aIw12ZkFg8k3mRhJzMhhsQgJt5oyiFd7IyVod42wgzjJqdIrkX3 C:\Users\gerar\AppData\Local\Google\Cloud SDK>
Request
- Use Postman for the HTTP POST request.
- Set the Authorization Header and the value to be 'Bearer <token>'
- The URL should use the of your Project - as per below example
- The Agent should include the URL of your Agent - as per below example
URL: https://europe-west1-dialogflow.googleapis.com/v2beta1/projects/my-dev-project1/locations/europe-west1/conversationProfiles Headers: Authorization: Bearer <google token - from sdk)
{
"name": "TACCXTest",
"automatedAgentConfig": {
"agent": "projects/my-dev-project1/locations/europe-west1/agents/55555555-eb4a-4fac-b23f-12ef145e9f71"
},
"displayName": "TACCXTest",
"humanAgentAssistantConfig": {
"messageAnalysisConfig": {
"enableEntityExtraction": true,
"enableSentimentAnalysis": true
}
}
}
Response
200 OK
{
"name": "projects/my-dev-project1/locations/europe-west1/conversationProfiles/B6gbdisORoSW6OLlZ8_-Zw",
"displayName": "TACCXTest",
"automatedAgentConfig": {
"agent": "projects/my-dev-project1/locations/europe-west1/agents/55555555-eb4a-4fac-b23f-12ef145e9f71/environments/draft"
},
"humanAgentAssistantConfig": {
"notificationConfig": {},
"messageAnalysisConfig": {
"enableEntityExtraction": true,
"enableSentimentAnalysis": true
}
},
"languageCode": "en-US"
}
Troubleshooting
Cloud Connect Server
file list activelog hybrid/log/cloudconnectmgmt
file tail activelog hybrid/log/cloudconnectmgmt/cloudconnectmgmt_error.log
file tail activelog hybrid/log/cloudconnectmgmt/cloudconnectmgmt.log
VVB Server
file tail activelog speechserver/logs/SpeechServer/SpeechServer.log