SlideShare a Scribd company logo
Everistus Olumese, RedPages
@eolumese
SW
Building an A.I. Powered
Chat Bot with Google
DialogFlow
A little about
Me
Lagos
• Integration Engineer for RedPages
Consulting and ICT Services
• Full-Stack JavaScript (Node.js,
Vue.js and React.js)
• PHP/Laravel Developer
• Interned at Hotels.ng
• A product of the ALC program
Agenda
1 . A Little Background
2. Account Creation
3. Agent
4. Intents
5. Entities
6. Parameters
7. Fulfilment
8. Integrations
9. Q&A
Location
6
A Little Background
How many of you are married?
How many of you are in a relationship
that is not “complicated”?
What three apps do you use most often
on your phones?
7
“By 2020, the average person will have more
conversations with bots than with their
spouse.” — Gartner
8
9
Current Bot Use Cases
• bring to life car user manuals for
consumers
• Insurance Assessments
• Banking
• Smarter Cities (IoT)
• Filing taxes
• Human resources
• Customer support
• Airline
• a lots more
10
What You can Use a Chatbot for
You need to order for food?
Use a chatbot
You need to switch off your light...
Use a chatbot
You need to transfer money...
Use a chatbot
Your house is on fire...
Call the fire service!!!
End
Process for Creating a DialogFlow Chatbot
12
13
Account Creation
Visit dialogflow.com and create a new
account
Location
14
Agents
An Agent is a chatbot application
a particular use case. It is a collection of
intents.
Prebuilt agents are
also available.
15
Agents
16
Intents
A query and response pair with other powerful
details like annotated entities, actions, values,
etc
Training Phrases
 I need a bank account
 I want a bank account
 I need a savings account
 How do I open a current account
 How do I open a checking account
17
18
19
20
Entities
These are human described variables or
enumeration that you need, to customise the
experience for each user. There are system
entities and custom entities
Account type
email
bvn
firstname
lastname
21
22
23
Parameters
When you define your parameters, you use
the built in entities or your custom entities
Required or optional
Customise your prompts
24
25
26
27
Fulfilment
Webhook/Webservice hosted in firebase or
your own server
Dialogflow agent call business logic on an
intent-by-intent basis
generate dynamic responses or trigger
actions on your back-end
28
Fulfilment
Use any language you want as long as it is
capable of supporting RESTful APIs
create one POST route
- in node.js
npm install dialogflow-fulfillment
29
30
//app.js
let express = require('express');
const PORT = process.env.PORT || 8000;
let app = express();
app.use(express.json());
app.listen(PORT, () => {
console.log("Bot server up at PORT: ", PORT)
})
app.use(express.urlencoded({ extended: false }));
let JollofBankController = require('./controllers/jollofbank');
app.post('/jollofbank', JollofBankController.banking)
32
/jollofbank.js
module.exports = {
banking: (req, res) => {
const agent = new WebhookClient({ request: req, response: res });
console.log(agent.intent);
let intentMap = new Map(); // Map functions to Dialogflow intent names
intentMap.set('Account Opening', openAccount);
intentMap.set('Transfer', transferFunds);
intentMap.set('Transactions', miniStatement);
intentMap.set('Airtime', rechargePhone);
agent.handleRequest(intentMap);
}
33
et JollofBankController = require('./controllers/jollofbank');
app.post('/jollofbank', JollofBankController.banking)
banking: (req, res) => {
34
//jolloffbank.js
const Account = require('../models/Account');
const AccountBalance = require('../models/AccountBalance');
const {WebhookClient} = require('dialogflow-fulfillment')
function openAccount(agent) {
return new Promise((resolve, reject)=>{
let accountNumber = "044" + Math.floor(1000000 + Math.random() *
9000000);
if (accountNumber.length > 10) {
accountNumber = accountNumber.substr(0, 10);
}
let data = {};
35
data.userId = uuidv4();
data.accountType = agent.parameters.accountType
data.email = agent.parameters.email
data.bvn = agent.parameters.bvn
data.name = agent.parameters.name
data.accountNumber = accountNumber;
Account.create(data).then(account => {
let accountNumber = account.accountNumber;
agent.add(`Your account have been opened successfully. Your
account Number is ${accountNumber}`)
resolve(agent)
})
})
}
36
Integration
You can enable one click integration for
many channels
Google Assistant
web
slack
twitter
FB messenger
Twillo
37
38
39
https://goo.gl/dQR22a
Everistus Olumese, RedPages
C onsulting and IC T Services
@eolumese
Location
Thank you!
Q&A
Find docs here
https://dialogflow.com/docs
https://github.com/bytenaija/
jollofbank
Location

More Related Content

What's hot

What's hot (20)

Conversational AI– Beyond the chatbot hype
 Conversational AI– Beyond the chatbot hype Conversational AI– Beyond the chatbot hype
Conversational AI– Beyond the chatbot hype
 
Chatbot and Virtual AI Assistant Implementation in Natural Language Processing
Chatbot and Virtual AI Assistant Implementation in Natural Language Processing Chatbot and Virtual AI Assistant Implementation in Natural Language Processing
Chatbot and Virtual AI Assistant Implementation in Natural Language Processing
 
Introduction to Chatbots
Introduction to ChatbotsIntroduction to Chatbots
Introduction to Chatbots
 
OpenAI Chatgpt.pptx
OpenAI Chatgpt.pptxOpenAI Chatgpt.pptx
OpenAI Chatgpt.pptx
 
Conversational AI and Chatbot Integrations
Conversational AI and Chatbot IntegrationsConversational AI and Chatbot Integrations
Conversational AI and Chatbot Integrations
 
Let's Build a Chatbot!
Let's Build a Chatbot!Let's Build a Chatbot!
Let's Build a Chatbot!
 
Leveraging the Power of Conversational AI for ITSM
Leveraging the Power of Conversational AI for ITSMLeveraging the Power of Conversational AI for ITSM
Leveraging the Power of Conversational AI for ITSM
 
What is a chatbot?
What is a chatbot?What is a chatbot?
What is a chatbot?
 
Chatbot
ChatbotChatbot
Chatbot
 
Chatbots - The Business Opportunity
Chatbots - The Business OpportunityChatbots - The Business Opportunity
Chatbots - The Business Opportunity
 
Chatbot
ChatbotChatbot
Chatbot
 
Chat bot technologies overview
Chat bot technologies overviewChat bot technologies overview
Chat bot technologies overview
 
Transform experiences with automation and conversational AI
Transform experiences with automation and conversational AITransform experiences with automation and conversational AI
Transform experiences with automation and conversational AI
 
Artificially Intelligent chatbot Implementation
Artificially Intelligent chatbot ImplementationArtificially Intelligent chatbot Implementation
Artificially Intelligent chatbot Implementation
 
Get started with Dialogflow & Contact Center AI on Google Cloud
Get started with Dialogflow & Contact Center AI on Google CloudGet started with Dialogflow & Contact Center AI on Google Cloud
Get started with Dialogflow & Contact Center AI on Google Cloud
 
ChatGPT 101 - Vancouver ChatGPT Experts
ChatGPT 101 - Vancouver ChatGPT ExpertsChatGPT 101 - Vancouver ChatGPT Experts
ChatGPT 101 - Vancouver ChatGPT Experts
 
Chatbot ppt
Chatbot pptChatbot ppt
Chatbot ppt
 
introduction Azure OpenAI by Usama wahab khan
introduction  Azure OpenAI by Usama wahab khanintroduction  Azure OpenAI by Usama wahab khan
introduction Azure OpenAI by Usama wahab khan
 
Chatbot
ChatbotChatbot
Chatbot
 
Chatbot
ChatbotChatbot
Chatbot
 

Similar to Developing Chatbots with Google DialogFlow

Fanug - Pragmatic Windows Phone Developer
Fanug - Pragmatic Windows Phone DeveloperFanug - Pragmatic Windows Phone Developer
Fanug - Pragmatic Windows Phone Developer
Sam Basu
 
Busy Bee Application Develompent Platform
Busy Bee Application Develompent PlatformBusy Bee Application Develompent Platform
Busy Bee Application Develompent Platform
Utkarsh Shukla
 
Rohit_Kumar_Resume
Rohit_Kumar_ResumeRohit_Kumar_Resume
Rohit_Kumar_Resume
Rohit Kumar
 
Azure + WP7 - CodePaLOUsa
Azure + WP7 - CodePaLOUsaAzure + WP7 - CodePaLOUsa
Azure + WP7 - CodePaLOUsa
Sam Basu
 
ActiveEon - Automate, Accelerate, Scale
ActiveEon - Automate, Accelerate, ScaleActiveEon - Automate, Accelerate, Scale
ActiveEon - Automate, Accelerate, Scale
Activeeon
 
Building a chat app with windows azure mobile
Building a chat app with windows azure mobileBuilding a chat app with windows azure mobile
Building a chat app with windows azure mobile
Flavius-Radu Demian
 

Similar to Developing Chatbots with Google DialogFlow (20)

WP7 & Azure
WP7 & AzureWP7 & Azure
WP7 & Azure
 
OAuth for QuickBooks Online REST Services
OAuth for QuickBooks Online REST ServicesOAuth for QuickBooks Online REST Services
OAuth for QuickBooks Online REST Services
 
Fanug - Pragmatic Windows Phone Developer
Fanug - Pragmatic Windows Phone DeveloperFanug - Pragmatic Windows Phone Developer
Fanug - Pragmatic Windows Phone Developer
 
Supriya Saha Resume
Supriya Saha ResumeSupriya Saha Resume
Supriya Saha Resume
 
.NET Drop 4
.NET Drop 4.NET Drop 4
.NET Drop 4
 
Busy Bee Application Develompent Platform
Busy Bee Application Develompent PlatformBusy Bee Application Develompent Platform
Busy Bee Application Develompent Platform
 
Rohit_Kumar_Resume
Rohit_Kumar_ResumeRohit_Kumar_Resume
Rohit_Kumar_Resume
 
MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...
MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...
MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...
 
Resumeupdated
ResumeupdatedResumeupdated
Resumeupdated
 
Resumeupdated
ResumeupdatedResumeupdated
Resumeupdated
 
Azure + WP7 - CodePaLOUsa
Azure + WP7 - CodePaLOUsaAzure + WP7 - CodePaLOUsa
Azure + WP7 - CodePaLOUsa
 
ActiveEon - Automate, Accelerate, Scale
ActiveEon - Automate, Accelerate, ScaleActiveEon - Automate, Accelerate, Scale
ActiveEon - Automate, Accelerate, Scale
 
Building a chat app with windows azure mobile
Building a chat app with windows azure mobileBuilding a chat app with windows azure mobile
Building a chat app with windows azure mobile
 
.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles
 
B.Karthik
B.KarthikB.Karthik
B.Karthik
 
mobicon_paper
mobicon_papermobicon_paper
mobicon_paper
 
SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...
SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...
SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...
 
shiv_chandra_pathak
shiv_chandra_pathakshiv_chandra_pathak
shiv_chandra_pathak
 
Pivorak.javascript.global domination
Pivorak.javascript.global dominationPivorak.javascript.global domination
Pivorak.javascript.global domination
 
Andriy Vandakurov about "Frontend. Global domination"
Andriy Vandakurov about  "Frontend. Global domination" Andriy Vandakurov about  "Frontend. Global domination"
Andriy Vandakurov about "Frontend. Global domination"
 

Recently uploaded

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Recently uploaded (20)

In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 

Developing Chatbots with Google DialogFlow

  • 1. Everistus Olumese, RedPages @eolumese SW Building an A.I. Powered Chat Bot with Google DialogFlow
  • 3. • Integration Engineer for RedPages Consulting and ICT Services • Full-Stack JavaScript (Node.js, Vue.js and React.js) • PHP/Laravel Developer • Interned at Hotels.ng • A product of the ALC program
  • 4. Agenda 1 . A Little Background 2. Account Creation 3. Agent 4. Intents 5. Entities 6. Parameters 7. Fulfilment 8. Integrations 9. Q&A Location
  • 5. 6 A Little Background How many of you are married? How many of you are in a relationship that is not “complicated”? What three apps do you use most often on your phones?
  • 6. 7 “By 2020, the average person will have more conversations with bots than with their spouse.” — Gartner
  • 7. 8
  • 8. 9 Current Bot Use Cases • bring to life car user manuals for consumers • Insurance Assessments • Banking • Smarter Cities (IoT) • Filing taxes • Human resources • Customer support • Airline • a lots more
  • 9. 10 What You can Use a Chatbot for You need to order for food? Use a chatbot You need to switch off your light... Use a chatbot You need to transfer money... Use a chatbot Your house is on fire... Call the fire service!!!
  • 10. End Process for Creating a DialogFlow Chatbot
  • 11. 12
  • 12. 13 Account Creation Visit dialogflow.com and create a new account Location
  • 13. 14 Agents An Agent is a chatbot application a particular use case. It is a collection of intents. Prebuilt agents are also available.
  • 15. 16 Intents A query and response pair with other powerful details like annotated entities, actions, values, etc Training Phrases  I need a bank account  I want a bank account  I need a savings account  How do I open a current account  How do I open a checking account
  • 16. 17
  • 17. 18
  • 18. 19
  • 19. 20 Entities These are human described variables or enumeration that you need, to customise the experience for each user. There are system entities and custom entities Account type email bvn firstname lastname
  • 20. 21
  • 21. 22
  • 22. 23 Parameters When you define your parameters, you use the built in entities or your custom entities Required or optional Customise your prompts
  • 23. 24
  • 24. 25
  • 25. 26
  • 26. 27 Fulfilment Webhook/Webservice hosted in firebase or your own server Dialogflow agent call business logic on an intent-by-intent basis generate dynamic responses or trigger actions on your back-end
  • 27. 28 Fulfilment Use any language you want as long as it is capable of supporting RESTful APIs create one POST route - in node.js npm install dialogflow-fulfillment
  • 28. 29
  • 29. 30
  • 30. //app.js let express = require('express'); const PORT = process.env.PORT || 8000; let app = express(); app.use(express.json()); app.listen(PORT, () => { console.log("Bot server up at PORT: ", PORT) }) app.use(express.urlencoded({ extended: false })); let JollofBankController = require('./controllers/jollofbank'); app.post('/jollofbank', JollofBankController.banking)
  • 31. 32 /jollofbank.js module.exports = { banking: (req, res) => { const agent = new WebhookClient({ request: req, response: res }); console.log(agent.intent); let intentMap = new Map(); // Map functions to Dialogflow intent names intentMap.set('Account Opening', openAccount); intentMap.set('Transfer', transferFunds); intentMap.set('Transactions', miniStatement); intentMap.set('Airtime', rechargePhone); agent.handleRequest(intentMap); }
  • 32. 33 et JollofBankController = require('./controllers/jollofbank'); app.post('/jollofbank', JollofBankController.banking) banking: (req, res) => {
  • 33. 34 //jolloffbank.js const Account = require('../models/Account'); const AccountBalance = require('../models/AccountBalance'); const {WebhookClient} = require('dialogflow-fulfillment') function openAccount(agent) { return new Promise((resolve, reject)=>{ let accountNumber = "044" + Math.floor(1000000 + Math.random() * 9000000); if (accountNumber.length > 10) { accountNumber = accountNumber.substr(0, 10); } let data = {};
  • 34. 35 data.userId = uuidv4(); data.accountType = agent.parameters.accountType data.email = agent.parameters.email data.bvn = agent.parameters.bvn data.name = agent.parameters.name data.accountNumber = accountNumber; Account.create(data).then(account => { let accountNumber = account.accountNumber; agent.add(`Your account have been opened successfully. Your account Number is ${accountNumber}`) resolve(agent) }) }) }
  • 35. 36 Integration You can enable one click integration for many channels Google Assistant web slack twitter FB messenger Twillo
  • 36. 37
  • 37. 38
  • 39. Everistus Olumese, RedPages C onsulting and IC T Services @eolumese Location Thank you!