Chatbots cannot just do the old “press 1 for English” kind of menu. We want to talk to chatbots – especially voice gadgets – like people talk to people. We don’t need to pretend to be human, but we want the conversation to be like a human interaction. This code pattern is built for developers who want to access their chatbots using Google Home, a smartphone, or another device supported by Google Assistant. It shows how to create a Google Action and a Node.js server to make your Watson Assistant dialogs available when you say “Hey Google.”
When using a chatbot, you want the interaction to be as natural as possible. You want them to simulate the back-and-forth dialogue of a human conversation. They can respond the same way every time or they can use machine learning to respond according to the situation. The chatbot in this code pattern responds to the situation.
The code pattern explains how to build a retail agent chatbot that can ask for car reservation schedules and specifics. It includes a Watson™ Assistant workspace and uses Watson Assistant’s content catalog and digression feature to make the conversation flow naturally and stay on task. To test it with Google Assistant devices, you’ll set up a Google Action that calls out to a Node.js server that interacts with Watson Assistant.
When you have completed this code pattern, you’ll understand how to:
- Create a Google Assistant Action that calls out to an HTTPS endpoint
- Launch a Node.js server that can interact with the Google Assistant requests and send responses from Watson Assistant
- Use Watson Assistant to create a retail agent that can have a conversation to gather the information needed to make a reservation
- The user talks or types to Google Assistant.
- Google Assistant posts the text to an HTTPS endpoint.
- The Node.js server calls Watson Assistant to get the response.
- The response is returned to Google Assistant.
- Google Assistant replies to the user.
Ready to put this code pattern to use? Complete details on how to get started running and using this application are in the README.