Twilio's Dialogflow CX Connector is a native telephony integration with Google Dialogflow CX aimed at enterprises with medium to large sized contact centers. Through this integration, Twilio enables customer applications with rich conversational AI experiences.
This guide walks through the process of integrating your Twilio application with your Google Dialogflow CX virtual agent.
These prerequisite steps are required prior to starting the one-click integration:
Check out Google's Dialogflow CX setup documentation on how to start using Dialogflow in Google Cloud.
This one-time manual step is required prior to initiating one-click integration. You will need to provide Twilio's production service account permission to run your Dialogflow agent:
Under "New Principals", add virtualagent-ccai-prod@dialogflow-prod-env.iam.gserviceaccount.com as a member with the following roles:
Before performing the one-click integration with Google Dialogflow, you should be signed into the Twilio Console and logged into the account or sub-account you wish to use with your Dialogflow CX agent integration.
Once you have completed the prerequisite steps, you are ready to use the one-click integration to connect your Twilio Dialogflow CX Connector to your desired Dialogflow CX agent.
See the <VirtualAgent> documentation for more information about how to use this TwiML noun.
When you configure the Dialogflow CX Connector within Twilio, you can specify a welcome intent. When Twilio connects a call to your Dialogflow CX agent, this welcome intent will trigger (for example, saying "Hello" to the caller before they start speaking). You can use the Dialogflow CX agent's default welcome intent called "WELCOME" and configure it in your Dialogflow CX Connector. You can edit this default welcome intent within Dialogflow.
You can pass custom parameters to the Dialogflow CX agent either within the Connect Virtual Agent Studio Widget or from the <VirtualAgent> TwiML noun. You can also configure parameters in your agent's setting in the Google Cloud console.
In your Dialogflow CX console, you can set the transition target for an intent to "End" to indicate that the conversation with the agent should end after a particular virtual agent response. For more information, check out the Google docs.
If you are using TwiML and the virtual agent ends the conversation because an intent matches the "end of the conversation" intent indicating the call completed successfully, the VirtualAgentStatus field in the request to your action URL is set to completed
. This will execute the next TwiML in your application by using the action parameter, or the next TwiML step <Connect>
verb.
If you are using Connect Virtual Agent Studio Widget and the virtual agent ends the conversation because an intent matches the "end of the conversation" intent, the Completed transition state is triggered.
If the virtual agent was not able to fulfill the call, Dialogflow CX now allows you to escalate it to a live human agent. Twilio's support for status callbacks allows us to pass requests containing information on call status, intents triggered, sentiment scores, agent-caller text, and more to your application URL, which would enable you to write custom code against it and build a live agent hand-off experience in your own contact center application.
For more details on how to enable the live agent handoff inside the agent fulfillment within your Dialogflow CX console, check out Google docs.
If you are using TwiML and the Dialogflow CX agent returns a live agent handoff response indicating the call needs to be escalated to a human agent,the VirtualAgentStatus field in the request to your action URL is set to live-agent-handoff
.
If you are using Connect Virtual Agent Studio widget and the Dialogflow CX agent returns a live agent handoff response indicating the call needs to be escalated to a human agent, the Live Agent Handoff transition state is triggered..
You can enable Barge-in within Dialogflow CX agents, which allows callers to interrupt the virtual agent anytime. If barge-in is enabled and a caller starts speaking in the middle of the agent's response, Dialogflow will stop sending audio to the caller and process the caller's next input.
For more details on how to turn on the barge-in feature, check out these Google docs.
In addition to speech input, an end user can provide a DTMF (Dual-tone multi-frequency signaling) input through their telephone keypad. You can configure DTMF for a parameter in your Google Dialogflow CX console. Once enabled, your customer can use their telephone keypad to provide parameter values for an agent using a telephony integration.
We are looking forward to hearing from you! Please reach out to your Twilio Account Manager or contact our Sales Team. We're looking for feedback on: