In this article, you are going to learn how Dialogflow CX, powered by Vertex AI Agent Builder, is changing the way conventional chatbots were designed. Gone are the days when people used to reach out to the support center of an organization and they used to get connected to another person sitting across the world, solving their issues. With Dialogflow, this dynamic has changed upside down, but let’s first try to understand what has fueled this change.
Traditional customer support relied heavily on human agents, leading to challenges such as:
Dialogflow overcomes these challenges by:
Creating a product support chatbot with Dialogflow CX is simple and efficient:
Here are the simple steps, following which you can have a simple chatbot up and running in minutes which is going to explain every feature of your product.
This will open up a new tab which will have a Dialogflow CX chatbot which is ready to answer all your questions in the blink of an eye. For the sake of this example, we have created a chatbot that answers all the questions about a car after reading up the car manual.
Publishing a Dialogflow chatbot is even easier than creating one. All you have to do is, follow these steps which will ensure that you have a working support agent.
Using these simple steps, you can have a support agent up and running only in a few minutes that would be able to support most of the questions related to your product. Now, let’s dive into the solution for other conventional issues.
Dialogflow events are the key to building chatbots that go beyond simple question-and-answer interactions. With different Dialogflow messenger events available, you can customize every response that goes out of the Dialogflow chatbot and every message that is processed by Dialogflow. This helps in providing an additional layer of intelligence and control over the messages going in and out of Dialogflow.
Think of events as signals that trigger specific actions within your chatbot. Two fundamental events provide you with granular control over message flow:
df-request-sent
: This event is fired every time a message is sent to the Dialogflow backend, which usually happens when the user sends a message to the chatbot. It allows you to intercept and process the outgoing message before it reaches Dialogflow.Example:
window.addEventListener('df-request-sent', (event) => {
console.log('Request', event.detail.data.requestBody);
});
df-response-received
: This event is triggered when a response is received from Dialogflow. It gives you the opportunity to modify the response or perform additional actions before it is displayed to the user.Example:
window.addEventListener('df-response-received', (event) => {
event.preventDefault(); // Dialogflow Messenger won't handle the response.
const messenger = document.querySelector('df-messenger');
event.detail.data.messages.forEach(message => {
if (message.type === 'text') {
messenger.renderCustomText(message.text);
}
});
});
These events can be utilized when there is any preprocessing required before sending a request or after receiving a response.
By leveraging Dialogflow you can create powerful chatbots which are reliable, available and address most of the customer requirements in a shorter time. Have questions as you’re building? Ask them in the Google Cloud Community forums.