Actions on Google lets you extend the functionality of the Google Assistant with Actions. Actions let users get things done through a conversational interface that can range from a quick command to turn on some lights or a longer conversation, such as playing a trivia game.
Dialogflow is a conversational platform that lets you design and build Actions by wrapping the functionality of the Actions SDK and providing additional features such as an easy-to-use IDE, natural language understanding (NLU), machine learning, and more.
To extend the Google Assistant, you build an Action with the following steps.
Design your Conversation
Before developing, you should design your conversation, or the user interface for your Action. The conversation describes how users invoke your Action, the valid things that they can say to your Action, and how your Action responds to them.
Create an Actions on Google developer project and Dialogflow Agent
Go to the Actions on Google Developer Console and create a developer project. The project lets you define metadata about your Action and manage and track your Action through the approval process. Once you have a project, you can create a Dialogflow agent that defines all your Actions.
You define Actions in your Dialogflow agent with intents that define entry points into your Action's functionality. For example, say you wanted to build an Action that could purchase some goods, check the status of orders, and to show some daily deals. You can define intents that are triggered by saying:
- "Ok Google, talk to My Favorite Shoe Store to purchase some shoes"
- "Ok Google, talk to My Favorite Shoe Store to check on my order"
- "Ok Google, talk to My Favorite Shoe Store to show me today's deals"
Build and deploy fulfillment
When an Action in your Action is invoked, it calls fulfillment to start a conversation with users to fulfill the Action.
To create your conversation, you define intents in Dialogflow to create your conversation's grammar, or the things users can actually say to your Action. When users actually say something to trigger an intent, your fulfillment is called and returns a response back to the user.
This back and forth request and response happens repeatedly until your fulfillment has enough information to complete the task.
Submit your Action for approval and make it available to users