SlideShare a Scribd company logo
Building Conversational
Experiences with
Actions on Google
+GreenIdo
@greenido
Developer Advocate
June 2017
The Google Assistant — A conversation between you
and Google that helps you get things done in your
world.
Google Home/Mobile device — The surface to
interact with the Assistant.
Actions on Google — How developers can extend the
Assistant (via Assistant apps)
The next session about Android is “Building Data
Driven applications with Android” in room 404 on
Tuesday at 4. Would you like to hear more?
Sure! Here’s Google IO 17.
Ok Google, let’s talk to Google IO 17
Enter Earcon
Exit Earcon
Hi, I’m one of the Googlers running I/O this year! I can
help you explore topics or pick a session to attend.
What would you like to know?
When is the next Android talk?
Building conversational experiences with Actions on Google
How does it work?
Design Develop Discover
Assistant app
{ conversation
api request }
{ conversation
api response }
user input
app
response
Ok Google,
let’s talk to
Google IO 17
I want to know
about Machine
Learning
Sure, here’s
Google IO 17
Hi! Welcome
to Google IO!
The next ML
session is...
Speech to Text
NLP
Knowledge Graph
ML Ranking
User Profile
Handle
“action.intent.MAIN”
Speech to Text
Text to Speech
...
...
...
“
Intent Matching — Match and categorize user utterances to
an intent.
Entity Extraction — Identify key words and phrases spoken by
the user.
@
Actions on Google API.AI
Intent - type of input Event
actions.intent.TEXT Intent (user utterance)
Action - app entry point Triggering Intent
N/A Action - fulfillment alias
Terminology
Ok Google,
let’s talk to
Google IO 17
I want to know
about Machine
Learning
Sure, here’s
Google IO 17
Hi! Welcome
to Google IO!
The next ML
session is...
Speech to Text
NLP
Knowledge Graph
ML Ranking
User Profile Convert
“action.intent.MAIN”
to WELCOME event
Speech to Text
Text to Speech
...
...
...
...
NLP:
Intent Matching
Entity Extraction
Building conversational experiences with Actions on Google
Intent
Triggered via a series of “user says” phrases or platform based events
Can collect entity values
Matched at every turn of conversation
Follow-up Intents
Input and Output Contexts
You can require a context to be available before an Intent is enabled
Intent can set context to enable other Intents
Retain data across intents
Entities (slot-filling)
Values that we are trying to capture from the user phrases
Can specify a parameter name and a type of value
Values can be optional
Values can be a list of fixed values
System Entities
● Time
● Date
● Time Period
● Number
● Cardinal
● Ordinal
● Temperature
● Speed
● Volume
● Weight
● Age
● Currency
● Country
● Location
● Language
● Artist
● Music
● ….
Developer Entities
Specify follow up questions if a user doesn’t specify certain values
Read out in random order to make it more natural
Prompts
Fulfillment
Building conversational experiences with Actions on Google
Node.js Client library
https://github.com/actions-on-google/actions-on-google-nodejs
const App = require('actions-on-google').ApiAiApp;
exports.yourApp = (request, response) => {
const app = new App({request, response});
console.log('Request headers: ' + JSON.stringify(request.headers));
console.log('Request body: ' + JSON.stringify(request.body));
// Fulfill action business logic
function responseHandler (app) {
// Complete your fulfillment logic and send a response
app.ask('Hello, World!');
}
const actionMap = new Map();
actionMap.set('<API.AI_action_name>', responseHandler);
app.handleRequest(actionMap);
};
Facts about Google sample (context and deep links)
https://developers.google.com/actions/develop/apiai/tutorials/google-facts
Facts about Google sample (context and deep links)
https://developers.google.com/actions/develop/apiai/tutorials/google-facts
Facts about Google sample (context and deep links)
https://developers.google.com/actions/develop/apiai/tutorials/google-facts
Facts about Google sample (context and deep links)
https://developers.google.com/actions/develop/apiai/tutorials/google-facts
if (app.hasSurfaceCapability(app.SurfaceCapabilities.SCREEN_OUTPUT)) {
app.ask(app.buildRichResponse()
.addSimpleResponse(`Here's a fact for you. ${fact} Which one ` +
`do you want to hear about next, Google's history or headquarters?`)
.addBasicCard(
app.buildBasicCard('Google is an amazing company.')
.setImage(GOOGLE_LOGO_SRC))
.addSuggestions(['History', 'Headquarters']));
} else {
app.ask(`Here's a fact for you. ${fact} Which one ` +
`do you want to hear about next, Google's history or headquarters?`);
}
Facts about Google Code Snippet
Designing for multiple surfaces
From ‘app’ to ‘experience’...
Create a persona.
Preserve and reinforce your persona by
engaging the user as a separate entity
from the Google Assistant.
Own it.
Hey! This is ___
Welcome to ___
Ready to play ____
Hi! ___ here.
Hello. I’m ___
Greetings, human.
Welcome back to ___
Hey again. ___
Let’s play ___
Here’s your ___
Brought to you by ___
Hi there, ___
Let’s get started.
Ready for your ___
___, here to…
Live from ___
This is ___
What’s up, ___
and more...
<speak> <!-- Must be at the start of the string -->
<say-as interpret-as="characters">SSML</say-as>
<break time="3s"/>.
<audio src="https://example.com/file.mp3"></audio>
<say-as interpret-as="cardinal">10</say-as>.
<say-as interpret-as="ordinal">10</say-as>
<say-as interpret-as="characters">10</say-as>.
<sub alias="World Wide Web">WWW</sub>.
<p><s>This is one.</s><s>This is two.</s></p>
</speak> <!-- Must be at the end of the string -->
Reinforce it with SSML
Speech Synthesis Markup language
“S S M L”
[3 second pause]
[audio file plays]
“Ten”
“Tenth”
“One Oh”
World Wide Web
[two sentences]
function welcome (app) {
return isPreviousUser(app.getUser().userId).then((userHasVisited) => {
if (userHasVisited) {
app.ask(`Welcome to Number Genie!...`, NO_INPUT_PROMPTS);
} else {
app.ask(`Hey you're back...`, NO_INPUT_PROMPTS);
}
});
}
Reinforce it with persistence
https://developers.google.com/actions/assistant/best-practices
Design for multiple surfaces.
Support different surface capabilities
https://developers.google.com/actions/assistant/surface-capabilities
AUDIO_OUTPUT SCREEN_OUTPUT
function simpleResponse (app) {
app.ask({
speech: 'Howdy! I can tell you fun facts about ' +
'almost any number, like 42. What do you have in mind?',
displayText: 'Howdy! I can tell you fun facts about ' +
'almost any number. What do you have in mind?'
});
}
Support speech and display text
https://developers.google.com/actions/assistant/responses
Chat text should be a subset of audio
function suggestionChips (app) {
app.ask(app.buildRichResponse()
.addSimpleResponse('Howdy! I can tell you fun facts ‘ +
‘about almost any number. What number do you have ‘ +
‘in mind?')
.addSuggestions(['0', '42', '100', 'Never mind'])
);
}
Guide the user (suggestion chips)
https://developers.google.com/actions/assistant/responses
Chip text should be under 25 characters
function basicCard (app) {
app.ask(app.buildRichResponse()
.addSimpleResponse('Math and prime numbers it is!')
.addBasicCard(
app.buildBasicCard(`42 is an even composite number. It ` +
`is composed of three distinct prime numbers multiplied together. It ` +
`has a total of eight divisors. 42 is an abundant number, because the ` +
`sum of its proper divisors 54 is greater than itself. To count from ` +
`1 to 42 would take you about twenty-one…`)
.setTitle('Math & prime numbers')
.addButton('Read more')
.setImage('https://example.google.com/42.png', 'Image alternate text')
)
);
}
Display basic cards
https://developers.google.com/actions/assistant/responses
Lists and carousels for selection
https://developers.google.com/actions/assistant/responses
Used for easy selection
<10 items
Used for comparison
<30 items
Know the
user
Google Home Mobile Device
NAME Registered device user’s full name Registered device user’s full name
DEVICE_COARSE_LOCATION Zip code and city N/A
DEVICE_PRECISE_LOCATION Coordinates and street address Coordinates
let permission = app.SupportedPermissions.DEVICE_COARSE_LOCATION;
app.askForPermission('To find bookstores near you', permission);
Q: "Recommend me a local bookstore"
A: "To find bookstores near you, I'll just need to get your zip code from Google. Is that okay?"
Ask for information
https://developers.google.com/actions/assistant/helpers#user_information
Link an account (OAuth2)
https://developers.google.com/actions/identity/
Seamless account linking with Google Sign-in
Transact with the user
https://developers.google.com/actions/identity/
Build orders
Use Google provided payment
instrument
Use your payment processor
(Stripe, Braintree, Vantiv, more
coming)
Update order status
Building conversational experiences with Actions on Google
Reach users...
In Dialogue Discovery:
Explicit Triggering (of Actions)
Ok Google, ask Google I/O 17 about what was announced
Trigger Phrase App Name
Developer Specified
Action
Preposition
Action Phrase
Developer Specified
Partner Examples: Let’s speak to Domino’s
At Akinator
Ask Dr. Doggy if dogs can eat chocolate
Ok Google, let’s talk to Google I/O 17
Trigger Phrase App Name
Developer Specified
Hey Google, I want to play a game.Hey Google, tell me a joke.
In Dialogue Discovery:
Implicit Triggering
Hey Google, I want to work out. Hey Google, what’s the surf report
Discovery in the Google
Assistant Directory
Link to your
Assistant App
From anywhere
Share through social media.
Promote through your own site or apps.
Encourage press to drive traffic
to your Assistant app.
Where do I start?
Actions Console
console.actions.google.com
0. Put away the code
1. Draft a persona
2. Write some dialog
DIALOG + STRUCTURE
g.co/dev/ActionsDesign
developers.google.com/actions
Actions on Google Developer Community
https://g.co/actionsdev
Actions on Google Developers
https://developers.google.com/actions
Actions on Google Developer Challenge
https://g.co/actionschallenge
+GreenIdo
@greenido
Developer Advocate
Ad

More Related Content

Similar to Building conversational experiences with Actions on Google (20)

Esplorando Google Assistant e Dialogflow
Esplorando Google Assistant e DialogflowEsplorando Google Assistant e Dialogflow
Esplorando Google Assistant e Dialogflow
Paolo Montrasio
 
Engage user with actions
Engage user with actionsEngage user with actions
Engage user with actions
Matteo Bonifazi
 
Construindo projetos para o Google Assistant - I/O 2019 Recap São Paulo
Construindo projetos para o Google Assistant - I/O 2019 Recap São PauloConstruindo projetos para o Google Assistant - I/O 2019 Recap São Paulo
Construindo projetos para o Google Assistant - I/O 2019 Recap São Paulo
Alvaro Viebrantz
 
Hey hubballi! - Talk on "Actions on Google" #DevFestHubali
Hey hubballi! - Talk on "Actions on Google" #DevFestHubali Hey hubballi! - Talk on "Actions on Google" #DevFestHubali
Hey hubballi! - Talk on "Actions on Google" #DevFestHubali
Smit Jethwa
 
Bringing Characters to Life for Immersive Storytelling - Dioselin Gonzalez
Bringing Characters to Life for Immersive Storytelling - Dioselin GonzalezBringing Characters to Life for Immersive Storytelling - Dioselin Gonzalez
Bringing Characters to Life for Immersive Storytelling - Dioselin Gonzalez
WithTheBest
 
Bringing characters to life for immersive storytelling
Bringing characters to life for immersive storytellingBringing characters to life for immersive storytelling
Bringing characters to life for immersive storytelling
Dioselin Gonzalez
 
POSI Overview
POSI OverviewPOSI Overview
POSI Overview
aindilis
 
Android Developer Days 2013 - MultiDevice Nightmare
Android Developer Days 2013 - MultiDevice NightmareAndroid Developer Days 2013 - MultiDevice Nightmare
Android Developer Days 2013 - MultiDevice Nightmare
Hasan Hosgel
 
Building a Location-based platform with MongoDB from Zero.
Building a Location-based platform with MongoDB from Zero.Building a Location-based platform with MongoDB from Zero.
Building a Location-based platform with MongoDB from Zero.
Ravi Teja
 
Android design patterns
Android design patternsAndroid design patterns
Android design patterns
Vitali Pekelis
 
Use Web Skills To Build Mobile Apps
Use Web Skills To Build Mobile AppsUse Web Skills To Build Mobile Apps
Use Web Skills To Build Mobile Apps
Nathan Smith
 
Groovy On Trading Desk (2010)
Groovy On Trading Desk (2010)Groovy On Trading Desk (2010)
Groovy On Trading Desk (2010)
Jonathan Felch
 
Google Assistant Overview
Google Assistant Overview  Google Assistant Overview
Google Assistant Overview
AI.academy
 
Interview with Developer Jose Luis Arenas regarding Google App Engine & Geosp...
Interview with Developer Jose Luis Arenas regarding Google App Engine & Geosp...Interview with Developer Jose Luis Arenas regarding Google App Engine & Geosp...
Interview with Developer Jose Luis Arenas regarding Google App Engine & Geosp...
Rif Kiamil
 
The Django Web Framework (EuroPython 2006)
The Django Web Framework (EuroPython 2006)The Django Web Framework (EuroPython 2006)
The Django Web Framework (EuroPython 2006)
Simon Willison
 
Building Conversational Experiences for Google Assistant
Building Conversational Experiences for Google AssistantBuilding Conversational Experiences for Google Assistant
Building Conversational Experiences for Google Assistant
Nader Khaled
 
Web Development Study Jam #2 _ Basic JavaScript.pptx
Web Development Study Jam #2 _ Basic JavaScript.pptxWeb Development Study Jam #2 _ Basic JavaScript.pptx
Web Development Study Jam #2 _ Basic JavaScript.pptx
SekarMaduKusumawarda1
 
Questioning the status quo
Questioning the status quoQuestioning the status quo
Questioning the status quo
Ivano Pagano
 
Python 101
Python 101Python 101
Python 101
The Active Network
 
Faster! Faster! Accelerate your business with blazing prototypes
Faster! Faster! Accelerate your business with blazing prototypesFaster! Faster! Accelerate your business with blazing prototypes
Faster! Faster! Accelerate your business with blazing prototypes
OSCON Byrum
 
Esplorando Google Assistant e Dialogflow
Esplorando Google Assistant e DialogflowEsplorando Google Assistant e Dialogflow
Esplorando Google Assistant e Dialogflow
Paolo Montrasio
 
Engage user with actions
Engage user with actionsEngage user with actions
Engage user with actions
Matteo Bonifazi
 
Construindo projetos para o Google Assistant - I/O 2019 Recap São Paulo
Construindo projetos para o Google Assistant - I/O 2019 Recap São PauloConstruindo projetos para o Google Assistant - I/O 2019 Recap São Paulo
Construindo projetos para o Google Assistant - I/O 2019 Recap São Paulo
Alvaro Viebrantz
 
Hey hubballi! - Talk on "Actions on Google" #DevFestHubali
Hey hubballi! - Talk on "Actions on Google" #DevFestHubali Hey hubballi! - Talk on "Actions on Google" #DevFestHubali
Hey hubballi! - Talk on "Actions on Google" #DevFestHubali
Smit Jethwa
 
Bringing Characters to Life for Immersive Storytelling - Dioselin Gonzalez
Bringing Characters to Life for Immersive Storytelling - Dioselin GonzalezBringing Characters to Life for Immersive Storytelling - Dioselin Gonzalez
Bringing Characters to Life for Immersive Storytelling - Dioselin Gonzalez
WithTheBest
 
Bringing characters to life for immersive storytelling
Bringing characters to life for immersive storytellingBringing characters to life for immersive storytelling
Bringing characters to life for immersive storytelling
Dioselin Gonzalez
 
POSI Overview
POSI OverviewPOSI Overview
POSI Overview
aindilis
 
Android Developer Days 2013 - MultiDevice Nightmare
Android Developer Days 2013 - MultiDevice NightmareAndroid Developer Days 2013 - MultiDevice Nightmare
Android Developer Days 2013 - MultiDevice Nightmare
Hasan Hosgel
 
Building a Location-based platform with MongoDB from Zero.
Building a Location-based platform with MongoDB from Zero.Building a Location-based platform with MongoDB from Zero.
Building a Location-based platform with MongoDB from Zero.
Ravi Teja
 
Android design patterns
Android design patternsAndroid design patterns
Android design patterns
Vitali Pekelis
 
Use Web Skills To Build Mobile Apps
Use Web Skills To Build Mobile AppsUse Web Skills To Build Mobile Apps
Use Web Skills To Build Mobile Apps
Nathan Smith
 
Groovy On Trading Desk (2010)
Groovy On Trading Desk (2010)Groovy On Trading Desk (2010)
Groovy On Trading Desk (2010)
Jonathan Felch
 
Google Assistant Overview
Google Assistant Overview  Google Assistant Overview
Google Assistant Overview
AI.academy
 
Interview with Developer Jose Luis Arenas regarding Google App Engine & Geosp...
Interview with Developer Jose Luis Arenas regarding Google App Engine & Geosp...Interview with Developer Jose Luis Arenas regarding Google App Engine & Geosp...
Interview with Developer Jose Luis Arenas regarding Google App Engine & Geosp...
Rif Kiamil
 
The Django Web Framework (EuroPython 2006)
The Django Web Framework (EuroPython 2006)The Django Web Framework (EuroPython 2006)
The Django Web Framework (EuroPython 2006)
Simon Willison
 
Building Conversational Experiences for Google Assistant
Building Conversational Experiences for Google AssistantBuilding Conversational Experiences for Google Assistant
Building Conversational Experiences for Google Assistant
Nader Khaled
 
Web Development Study Jam #2 _ Basic JavaScript.pptx
Web Development Study Jam #2 _ Basic JavaScript.pptxWeb Development Study Jam #2 _ Basic JavaScript.pptx
Web Development Study Jam #2 _ Basic JavaScript.pptx
SekarMaduKusumawarda1
 
Questioning the status quo
Questioning the status quoQuestioning the status quo
Questioning the status quo
Ivano Pagano
 
Faster! Faster! Accelerate your business with blazing prototypes
Faster! Faster! Accelerate your business with blazing prototypesFaster! Faster! Accelerate your business with blazing prototypes
Faster! Faster! Accelerate your business with blazing prototypes
OSCON Byrum
 

More from Ido Green (20)

מדמיון למציאות - 9.2024 - הרצאה במכינת כפר הנשיא
מדמיון למציאות - 9.2024 - הרצאה במכינת כפר הנשיאמדמיון למציאות - 9.2024 - הרצאה במכינת כפר הנשיא
מדמיון למציאות - 9.2024 - הרצאה במכינת כפר הנשיא
Ido Green
 
How to get things done - Lessons from Yahoo, Google, Netflix and Meta
How to get things done - Lessons from Yahoo, Google, Netflix and Meta How to get things done - Lessons from Yahoo, Google, Netflix and Meta
How to get things done - Lessons from Yahoo, Google, Netflix and Meta
Ido Green
 
Crypto 101 and a bit more [Sep-2022]
Crypto 101 and a bit more [Sep-2022]Crypto 101 and a bit more [Sep-2022]
Crypto 101 and a bit more [Sep-2022]
Ido Green
 
The Future of Continuous Software Updates Is Here
The Future of Continuous Software Updates Is HereThe Future of Continuous Software Updates Is Here
The Future of Continuous Software Updates Is Here
Ido Green
 
Open Source & DevOps Market trends - Open Core Summit
Open Source & DevOps Market trends - Open Core SummitOpen Source & DevOps Market trends - Open Core Summit
Open Source & DevOps Market trends - Open Core Summit
Ido Green
 
DevOps as a competitive advantage
DevOps as a competitive advantageDevOps as a competitive advantage
DevOps as a competitive advantage
Ido Green
 
Data Driven DevOps & Technologies (swampUP 2019 keynote)
Data Driven DevOps & Technologies (swampUP 2019 keynote)Data Driven DevOps & Technologies (swampUP 2019 keynote)
Data Driven DevOps & Technologies (swampUP 2019 keynote)
Ido Green
 
VUI Design
VUI DesignVUI Design
VUI Design
Ido Green
 
The Google Assistant - Macro View (October 2017)
The Google Assistant - Macro View (October 2017)The Google Assistant - Macro View (October 2017)
The Google Assistant - Macro View (October 2017)
Ido Green
 
Startups Best Practices
Startups Best PracticesStartups Best Practices
Startups Best Practices
Ido Green
 
Progressive Web Apps For Startups
Progressive Web Apps For StartupsProgressive Web Apps For Startups
Progressive Web Apps For Startups
Ido Green
 
Earn More Revenue With Firebase and AdMob
Earn More Revenue With Firebase and AdMobEarn More Revenue With Firebase and AdMob
Earn More Revenue With Firebase and AdMob
Ido Green
 
How To Grow Your User Base?
How To Grow Your User Base?How To Grow Your User Base?
How To Grow Your User Base?
Ido Green
 
Amp Overview #YGLF 2016
Amp Overview #YGLF 2016Amp Overview #YGLF 2016
Amp Overview #YGLF 2016
Ido Green
 
AMP - Accelerated Mobile Pages
AMP - Accelerated Mobile PagesAMP - Accelerated Mobile Pages
AMP - Accelerated Mobile Pages
Ido Green
 
From AMP to PWA
From AMP to PWAFrom AMP to PWA
From AMP to PWA
Ido Green
 
Google Innovation 101
Google Innovation 101Google Innovation 101
Google Innovation 101
Ido Green
 
סטארטאפ - איך? כמה? ולמה
סטארטאפ - איך? כמה? ולמהסטארטאפ - איך? כמה? ולמה
סטארטאפ - איך? כמה? ולמה
Ido Green
 
איך להתחיל סטארטאפ 2016
איך להתחיל סטארטאפ 2016איך להתחיל סטארטאפ 2016
איך להתחיל סטארטאפ 2016
Ido Green
 
Building a Progressive Web App
Building a  Progressive Web AppBuilding a  Progressive Web App
Building a Progressive Web App
Ido Green
 
מדמיון למציאות - 9.2024 - הרצאה במכינת כפר הנשיא
מדמיון למציאות - 9.2024 - הרצאה במכינת כפר הנשיאמדמיון למציאות - 9.2024 - הרצאה במכינת כפר הנשיא
מדמיון למציאות - 9.2024 - הרצאה במכינת כפר הנשיא
Ido Green
 
How to get things done - Lessons from Yahoo, Google, Netflix and Meta
How to get things done - Lessons from Yahoo, Google, Netflix and Meta How to get things done - Lessons from Yahoo, Google, Netflix and Meta
How to get things done - Lessons from Yahoo, Google, Netflix and Meta
Ido Green
 
Crypto 101 and a bit more [Sep-2022]
Crypto 101 and a bit more [Sep-2022]Crypto 101 and a bit more [Sep-2022]
Crypto 101 and a bit more [Sep-2022]
Ido Green
 
The Future of Continuous Software Updates Is Here
The Future of Continuous Software Updates Is HereThe Future of Continuous Software Updates Is Here
The Future of Continuous Software Updates Is Here
Ido Green
 
Open Source & DevOps Market trends - Open Core Summit
Open Source & DevOps Market trends - Open Core SummitOpen Source & DevOps Market trends - Open Core Summit
Open Source & DevOps Market trends - Open Core Summit
Ido Green
 
DevOps as a competitive advantage
DevOps as a competitive advantageDevOps as a competitive advantage
DevOps as a competitive advantage
Ido Green
 
Data Driven DevOps & Technologies (swampUP 2019 keynote)
Data Driven DevOps & Technologies (swampUP 2019 keynote)Data Driven DevOps & Technologies (swampUP 2019 keynote)
Data Driven DevOps & Technologies (swampUP 2019 keynote)
Ido Green
 
The Google Assistant - Macro View (October 2017)
The Google Assistant - Macro View (October 2017)The Google Assistant - Macro View (October 2017)
The Google Assistant - Macro View (October 2017)
Ido Green
 
Startups Best Practices
Startups Best PracticesStartups Best Practices
Startups Best Practices
Ido Green
 
Progressive Web Apps For Startups
Progressive Web Apps For StartupsProgressive Web Apps For Startups
Progressive Web Apps For Startups
Ido Green
 
Earn More Revenue With Firebase and AdMob
Earn More Revenue With Firebase and AdMobEarn More Revenue With Firebase and AdMob
Earn More Revenue With Firebase and AdMob
Ido Green
 
How To Grow Your User Base?
How To Grow Your User Base?How To Grow Your User Base?
How To Grow Your User Base?
Ido Green
 
Amp Overview #YGLF 2016
Amp Overview #YGLF 2016Amp Overview #YGLF 2016
Amp Overview #YGLF 2016
Ido Green
 
AMP - Accelerated Mobile Pages
AMP - Accelerated Mobile PagesAMP - Accelerated Mobile Pages
AMP - Accelerated Mobile Pages
Ido Green
 
From AMP to PWA
From AMP to PWAFrom AMP to PWA
From AMP to PWA
Ido Green
 
Google Innovation 101
Google Innovation 101Google Innovation 101
Google Innovation 101
Ido Green
 
סטארטאפ - איך? כמה? ולמה
סטארטאפ - איך? כמה? ולמהסטארטאפ - איך? כמה? ולמה
סטארטאפ - איך? כמה? ולמה
Ido Green
 
איך להתחיל סטארטאפ 2016
איך להתחיל סטארטאפ 2016איך להתחיל סטארטאפ 2016
איך להתחיל סטארטאפ 2016
Ido Green
 
Building a Progressive Web App
Building a  Progressive Web AppBuilding a  Progressive Web App
Building a Progressive Web App
Ido Green
 
Ad

Recently uploaded (19)

Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 SupportReliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
steve198109
 
5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx
andani26
 
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC
 
Understanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep WebUnderstanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep Web
nabilajabin35
 
OSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description fOSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description f
cbr49917
 
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHostingTop Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
steve198109
 
highend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptxhighend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptx
elhadjcheikhdiop
 
IT Services Workflow From Request to Resolution
IT Services Workflow From Request to ResolutionIT Services Workflow From Request to Resolution
IT Services Workflow From Request to Resolution
mzmziiskd
 
Perguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolhaPerguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolha
socaslev
 
Computers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers NetworksComputers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers Networks
Tito208863
 
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
DataProvider1
 
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation TemplateSmart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
yojeari421237
 
APNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC Update, presented at NZNOG 2025 by Terry SweetserAPNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC
 
DNS Resolvers and Nameservers (in New Zealand)
DNS Resolvers and Nameservers (in New Zealand)DNS Resolvers and Nameservers (in New Zealand)
DNS Resolvers and Nameservers (in New Zealand)
APNIC
 
White and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptxWhite and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptx
canumatown
 
Best web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you businessBest web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you business
steve198109
 
project_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptxproject_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptx
redzuriel13
 
(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security
aluacharya169
 
Determining Glass is mechanical textile
Determining  Glass is mechanical textileDetermining  Glass is mechanical textile
Determining Glass is mechanical textile
Azizul Hakim
 
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 SupportReliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
steve198109
 
5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx
andani26
 
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC
 
Understanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep WebUnderstanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep Web
nabilajabin35
 
OSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description fOSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description f
cbr49917
 
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHostingTop Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
steve198109
 
highend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptxhighend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptx
elhadjcheikhdiop
 
IT Services Workflow From Request to Resolution
IT Services Workflow From Request to ResolutionIT Services Workflow From Request to Resolution
IT Services Workflow From Request to Resolution
mzmziiskd
 
Perguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolhaPerguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolha
socaslev
 
Computers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers NetworksComputers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers Networks
Tito208863
 
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
DataProvider1
 
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation TemplateSmart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
yojeari421237
 
APNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC Update, presented at NZNOG 2025 by Terry SweetserAPNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC
 
DNS Resolvers and Nameservers (in New Zealand)
DNS Resolvers and Nameservers (in New Zealand)DNS Resolvers and Nameservers (in New Zealand)
DNS Resolvers and Nameservers (in New Zealand)
APNIC
 
White and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptxWhite and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptx
canumatown
 
Best web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you businessBest web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you business
steve198109
 
project_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptxproject_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptx
redzuriel13
 
(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security
aluacharya169
 
Determining Glass is mechanical textile
Determining  Glass is mechanical textileDetermining  Glass is mechanical textile
Determining Glass is mechanical textile
Azizul Hakim
 
Ad

Building conversational experiences with Actions on Google

  • 1. Building Conversational Experiences with Actions on Google +GreenIdo @greenido Developer Advocate June 2017
  • 2. The Google Assistant — A conversation between you and Google that helps you get things done in your world. Google Home/Mobile device — The surface to interact with the Assistant. Actions on Google — How developers can extend the Assistant (via Assistant apps)
  • 3. The next session about Android is “Building Data Driven applications with Android” in room 404 on Tuesday at 4. Would you like to hear more? Sure! Here’s Google IO 17. Ok Google, let’s talk to Google IO 17 Enter Earcon Exit Earcon Hi, I’m one of the Googlers running I/O this year! I can help you explore topics or pick a session to attend. What would you like to know? When is the next Android talk?
  • 5. How does it work? Design Develop Discover
  • 6. Assistant app { conversation api request } { conversation api response } user input app response
  • 7. Ok Google, let’s talk to Google IO 17 I want to know about Machine Learning Sure, here’s Google IO 17 Hi! Welcome to Google IO! The next ML session is... Speech to Text NLP Knowledge Graph ML Ranking User Profile Handle “action.intent.MAIN” Speech to Text Text to Speech ... ... ...
  • 8. “ Intent Matching — Match and categorize user utterances to an intent. Entity Extraction — Identify key words and phrases spoken by the user. @
  • 9. Actions on Google API.AI Intent - type of input Event actions.intent.TEXT Intent (user utterance) Action - app entry point Triggering Intent N/A Action - fulfillment alias Terminology
  • 10. Ok Google, let’s talk to Google IO 17 I want to know about Machine Learning Sure, here’s Google IO 17 Hi! Welcome to Google IO! The next ML session is... Speech to Text NLP Knowledge Graph ML Ranking User Profile Convert “action.intent.MAIN” to WELCOME event Speech to Text Text to Speech ... ... ... ... NLP: Intent Matching Entity Extraction
  • 12. Intent Triggered via a series of “user says” phrases or platform based events Can collect entity values Matched at every turn of conversation
  • 14. Input and Output Contexts You can require a context to be available before an Intent is enabled Intent can set context to enable other Intents Retain data across intents
  • 15. Entities (slot-filling) Values that we are trying to capture from the user phrases Can specify a parameter name and a type of value Values can be optional Values can be a list of fixed values
  • 16. System Entities ● Time ● Date ● Time Period ● Number ● Cardinal ● Ordinal ● Temperature ● Speed ● Volume ● Weight ● Age ● Currency ● Country ● Location ● Language ● Artist ● Music ● ….
  • 18. Specify follow up questions if a user doesn’t specify certain values Read out in random order to make it more natural Prompts
  • 21. Node.js Client library https://github.com/actions-on-google/actions-on-google-nodejs const App = require('actions-on-google').ApiAiApp; exports.yourApp = (request, response) => { const app = new App({request, response}); console.log('Request headers: ' + JSON.stringify(request.headers)); console.log('Request body: ' + JSON.stringify(request.body)); // Fulfill action business logic function responseHandler (app) { // Complete your fulfillment logic and send a response app.ask('Hello, World!'); } const actionMap = new Map(); actionMap.set('<API.AI_action_name>', responseHandler); app.handleRequest(actionMap); };
  • 22. Facts about Google sample (context and deep links) https://developers.google.com/actions/develop/apiai/tutorials/google-facts
  • 23. Facts about Google sample (context and deep links) https://developers.google.com/actions/develop/apiai/tutorials/google-facts
  • 24. Facts about Google sample (context and deep links) https://developers.google.com/actions/develop/apiai/tutorials/google-facts
  • 25. Facts about Google sample (context and deep links) https://developers.google.com/actions/develop/apiai/tutorials/google-facts
  • 26. if (app.hasSurfaceCapability(app.SurfaceCapabilities.SCREEN_OUTPUT)) { app.ask(app.buildRichResponse() .addSimpleResponse(`Here's a fact for you. ${fact} Which one ` + `do you want to hear about next, Google's history or headquarters?`) .addBasicCard( app.buildBasicCard('Google is an amazing company.') .setImage(GOOGLE_LOGO_SRC)) .addSuggestions(['History', 'Headquarters'])); } else { app.ask(`Here's a fact for you. ${fact} Which one ` + `do you want to hear about next, Google's history or headquarters?`); } Facts about Google Code Snippet Designing for multiple surfaces
  • 27. From ‘app’ to ‘experience’...
  • 29. Preserve and reinforce your persona by engaging the user as a separate entity from the Google Assistant. Own it. Hey! This is ___ Welcome to ___ Ready to play ____ Hi! ___ here. Hello. I’m ___ Greetings, human. Welcome back to ___ Hey again. ___ Let’s play ___ Here’s your ___ Brought to you by ___ Hi there, ___ Let’s get started. Ready for your ___ ___, here to… Live from ___ This is ___ What’s up, ___ and more...
  • 30. <speak> <!-- Must be at the start of the string --> <say-as interpret-as="characters">SSML</say-as> <break time="3s"/>. <audio src="https://example.com/file.mp3"></audio> <say-as interpret-as="cardinal">10</say-as>. <say-as interpret-as="ordinal">10</say-as> <say-as interpret-as="characters">10</say-as>. <sub alias="World Wide Web">WWW</sub>. <p><s>This is one.</s><s>This is two.</s></p> </speak> <!-- Must be at the end of the string --> Reinforce it with SSML Speech Synthesis Markup language “S S M L” [3 second pause] [audio file plays] “Ten” “Tenth” “One Oh” World Wide Web [two sentences]
  • 31. function welcome (app) { return isPreviousUser(app.getUser().userId).then((userHasVisited) => { if (userHasVisited) { app.ask(`Welcome to Number Genie!...`, NO_INPUT_PROMPTS); } else { app.ask(`Hey you're back...`, NO_INPUT_PROMPTS); } }); } Reinforce it with persistence https://developers.google.com/actions/assistant/best-practices
  • 32. Design for multiple surfaces.
  • 33. Support different surface capabilities https://developers.google.com/actions/assistant/surface-capabilities AUDIO_OUTPUT SCREEN_OUTPUT
  • 34. function simpleResponse (app) { app.ask({ speech: 'Howdy! I can tell you fun facts about ' + 'almost any number, like 42. What do you have in mind?', displayText: 'Howdy! I can tell you fun facts about ' + 'almost any number. What do you have in mind?' }); } Support speech and display text https://developers.google.com/actions/assistant/responses Chat text should be a subset of audio
  • 35. function suggestionChips (app) { app.ask(app.buildRichResponse() .addSimpleResponse('Howdy! I can tell you fun facts ‘ + ‘about almost any number. What number do you have ‘ + ‘in mind?') .addSuggestions(['0', '42', '100', 'Never mind']) ); } Guide the user (suggestion chips) https://developers.google.com/actions/assistant/responses Chip text should be under 25 characters
  • 36. function basicCard (app) { app.ask(app.buildRichResponse() .addSimpleResponse('Math and prime numbers it is!') .addBasicCard( app.buildBasicCard(`42 is an even composite number. It ` + `is composed of three distinct prime numbers multiplied together. It ` + `has a total of eight divisors. 42 is an abundant number, because the ` + `sum of its proper divisors 54 is greater than itself. To count from ` + `1 to 42 would take you about twenty-one…`) .setTitle('Math & prime numbers') .addButton('Read more') .setImage('https://example.google.com/42.png', 'Image alternate text') ) ); } Display basic cards https://developers.google.com/actions/assistant/responses
  • 37. Lists and carousels for selection https://developers.google.com/actions/assistant/responses Used for easy selection <10 items Used for comparison <30 items
  • 39. Google Home Mobile Device NAME Registered device user’s full name Registered device user’s full name DEVICE_COARSE_LOCATION Zip code and city N/A DEVICE_PRECISE_LOCATION Coordinates and street address Coordinates let permission = app.SupportedPermissions.DEVICE_COARSE_LOCATION; app.askForPermission('To find bookstores near you', permission); Q: "Recommend me a local bookstore" A: "To find bookstores near you, I'll just need to get your zip code from Google. Is that okay?" Ask for information https://developers.google.com/actions/assistant/helpers#user_information
  • 40. Link an account (OAuth2) https://developers.google.com/actions/identity/ Seamless account linking with Google Sign-in
  • 41. Transact with the user https://developers.google.com/actions/identity/ Build orders Use Google provided payment instrument Use your payment processor (Stripe, Braintree, Vantiv, more coming) Update order status
  • 44. In Dialogue Discovery: Explicit Triggering (of Actions) Ok Google, ask Google I/O 17 about what was announced Trigger Phrase App Name Developer Specified Action Preposition Action Phrase Developer Specified Partner Examples: Let’s speak to Domino’s At Akinator Ask Dr. Doggy if dogs can eat chocolate Ok Google, let’s talk to Google I/O 17 Trigger Phrase App Name Developer Specified
  • 45. Hey Google, I want to play a game.Hey Google, tell me a joke. In Dialogue Discovery: Implicit Triggering Hey Google, I want to work out. Hey Google, what’s the surf report
  • 46. Discovery in the Google Assistant Directory
  • 47. Link to your Assistant App From anywhere Share through social media. Promote through your own site or apps. Encourage press to drive traffic to your Assistant app.
  • 48. Where do I start?
  • 50. 0. Put away the code 1. Draft a persona 2. Write some dialog
  • 54. Actions on Google Developer Community https://g.co/actionsdev Actions on Google Developers https://developers.google.com/actions Actions on Google Developer Challenge https://g.co/actionschallenge +GreenIdo @greenido Developer Advocate