This feature is currently available as a Public Beta product and information contained in this document is subject to change. This means that some of the features are not yet implemented and others may be changed before the product is declared as Generally Available. Public Beta products are not covered by a Twilio SLA.
Virtual Agent for the Conversations channel is not a HIPAA Eligible Service and should not be used in Conversation or Flex workflows that are subject to HIPAA.
This guide outlines the native integration of Google Dialogflow CX with Flex. It uses the Twilio one-click integration for Google Dialogflow CX. With this integration, you can:
The supported Conversations channels are SMS, Webchat 3.0, WhatsApp, and Facebook Messenger.
Completion of the Dialogflow CX Onboarding guide. To ensure that the Virtual Agent transcripts are captured accurately, enable interaction logging in the Logging Settings of the Google Dialogflow CX Console.
This feature is only available for Google Dialogflow CX and would not work as expected for Dialogflow ES.
If you would like to use the Voice channel or Conversations channels with the Connect Virtual Agent Widget for Flex, contact our support team for help enabling this Beta feature.
Once the Dialogflow CX integration is complete, you can access the Connect Virtual Agent Widget in Twilio Studio.
This Widget connects Twilio Flex with Google's Dialogflow Virtual Agent. For an overview of transition events available for the Connect Virtual Agent Widget, see Connect Virtual Agent for Flex (Public Beta).
Please do not include Sensitive Data (PII and PHI) as part of the Virtual Agent to ensure appropriate handling of the data in our systems.
For agents in Flex to handle calls or conversations from the Virtual Agent, the Connect Virtual Agent Widget needs to link to the Send to Flex Widget using the Live Agent Handoff transition.
Follow these steps to integrate Flex with Google Dialogflow CX:
From the Google Dialogflow Console, ensure that the live agent handoff fulfillment is triggered by the Virtual Agent from the required flows to initiate the transition within Twilio Studio. This is the first step to ensure seamless routing of an ongoing call or conversation to an agent in Flex. For more details, check out Google's live agent handoff docs.
In the Live agent handoff fulfillment section of the Google Dialogflow Console, it is not mandatory to enter a JSON object to ensure that the call is routed to Flex. In a later section, we will look at how we share additional data from the virtual agent to Flex.
If the Virtual Agent is not able to fulfill the call or answer the conversation, Dialogflow CX allows you to escalate it to a live human agent.
If Google's Dialogflow CX Virtual Agent returns a live agent handoff response, it indicates that the call or conversation needs to be escalated to a human agent:
live-agent-handoff
.
If you are using the <Virtual Agent> TwiML noun for integrating with Flex instead of the Studio-based configurations, the Transcripts on the Flex UI would not be available.
Next, associate the Live Agent Handoff transition on the Connect Virtual Agent Widget with the Send to Flex Widget.
In the Send To Flex Widget config, you need to select the appropriate workflow on the appropriate Task Channel to route conversations. For Voice, select Voice as the Task Channel to route calls. For Conversations channels, select your messaging channel, such as Webchat or SMS, as the Task Channel to route incoming messages.
In the Attributes field, specify an attribute to send to Flex. For example, you could use the VirtualAgentProviderData from the Connect Virtual Agent Widget as follows:
{"escalation_type": "{{widgets.<connect_virtual_agent_widget-name>.VirtualAgentProviderData}}" }
This will ensure that the transition for Live Agent Handoff is used to create a task and route it to an appropriate agent in Flex.
If you're using a Voice channel, see the Dialogflow CX Onboarding Guide to connect your phone number to the Studio flow that you created.
If you're using a Conversations channel, you need to connect your Conversations channel to the relevant Studio flow:
Once you complete the setup steps, Virtual Agent calls or conversations that are escalated to Flex also include call transcripts or message history. With this information, the agent is better equipped to help the customer, and the agent won't need to request information that's already been provided.
The call transcript or message history is only available for the portion of the call or conversation where the Dialogflow CX Virtual Agent is interacting with the customer. The transcript messages show both the Virtual Agent's responses and the customer's responses.
To send additional information from Dialogflow CX Virtual Agent during the Live Agent handoff process, you can use the optional data section of the Dialogflow Live agent handoff fulfillment.
The data shared at the fulfillment step is available as part of the VirtualAgentProviderData variable of the Connect Virtual Agent Widget. Refer to Connect Virtual Agent Widget for details on the other variables you can use. You can use these variables to populate the task attributes in the Send to Flex Widget. They can be useful to route the incoming task accordingly or route to different workflows from Studio itself.
The above options allow for a lot of flexibility in terms of intelligent call and conversation routing that leverages the context provided by the Dialogflow CX Virtual Agent.