1
Dynamics 365 an
chat bots
Joris Poelmans
February 3th
2
About me
• Solution architect
• Work at Realdolmen
• Blog: http://jopx.blogspot.com
• Twitter: @jopxtwits
• Board member Belux CRM User
Group
3
Big thanks to the sponsors
4
Agenda
5
What is a (chat)bot and why should I care?
6
Use cases
7
Bot communication
API
8
How bots evolved
Simple
• One medium
• Keyword based
Moderate
• Multiple mediums
• Use custom messaging
• Keyword based
Advanced
• Multiple mediums
• Use custom messaging
• Understands natural
language
9
Channel connector frameworks
Google Dialogflow (API.AI) Microsoft Bot Framework
10
Microsoft Bot
Framework
• SDK for building bots
• Node.js or .NET
• Multiple channels
• Rich conversations with dialogs
and cards
• Rich attachment support
• Natural Language Processing –
QnA or LUIS.AI
11
Demo – QnA Maker sample bot
12
QnA Maker
• Free REST-API and web based
service to power a Q&A bot
• No code way of managing
content for a FAQ style bot
• Preview
13
Microsoft Bot Framework
14
Microsoft Bot Framework – Connector Service
var connector = new
ConnectorClient(incomingMessage.ServiceUrl);
var replyMessage =
incomingMessage.CreateReply("How can I
help?");
await
connector.Conversations.ReplyToActivityAsync(
replyMessage);
15
Microsoft Bot Framework - Activities
public async Task<HttpResponseMessage> Post([FromBody]Activity activity)
{
if (activity.Type == ActivityTypes.Message)
{
var connector = new ConnectorClient(new Uri(activity.ServiceUrl));
Activity reply = activity.CreateReply($"You sent {activity.Text} which
was {activity.Text.Length.ToString()} characters");
await connector.Conversations.ReplyToActivityAsync(reply);
}
var response = Request.CreateResponse(HttpStatusCode.OK);
return response;
}
16
Microsoft Bot Framework - Dialogs
17
Microsoft Bot Framework - Dialogs
18
Microsoft Bot Framework
Attachments, cards and actions
19
Microsoft Bot Framework – FormFlow
Jane user John bot
20
Microsoft Bot Framework – FormFlow
Jane user John bot
21
Microsoft Bot Framework – FormFlow
Jane user John bot
22
FormFlow
23
Demo – Customer Service Bot
24
Language
understanding is ..
• Technically challenging
• Costly to implement
• Often domain specific
25
Natural Language Processing Services
26
• Utterances
• Intents
• Slots or entities
NLU concepts
27
LUIS
Create your
own LU model
Train by providing
examples
Deploy to an HTTP
endpoint and
activate on any
device
Maintain model
with ease
28
Demo – LUIS.ai Portal
Azure Bot Reference Architecture
User
Direct Line
Facebook
Messenger
Skype
Telegram
Web Chat
Bot
Connector
Intent Handling
Bot Application
Message Response
Cognitive Services
Knowledge Base
Azure Search DocumentDB
Application Insights
Telemetry collects customer
activity, effectiveness and
technical information
Azure Functions
Backend Services
(e.g. Dynamics
CRM)
What makes a bot great ….
 Not how much AI it has
 Not how sophisticated the language model
is
 Not whether it uses voice or not
 Not whether it uses Buttons/Cards
What makes a bot great …
Great bots are like great
apps; they appeal to users
because they do whatever
they're trying to do WELL
32
References
https://dev.botframework.com/
https://docs.microsoft.com/en-us/bot-framework/
https://emulator.botframework.com
https://www.qnamaker.ai/
https://www.luis.ai
http://jopx.blogspot.be/2017/12/bots-and-dynamics-365-part-1.html
https://myignite.microsoft.com/videos/55282
https://myignite.microsoft.com/videos/55288
https://channel9.msdn.com/Events/Build/2017/B8090
https://channel9.msdn.com/Events/Build/2017/B8010
33
Big thanks to the sponsors

Dynamics 365 Saturday Amsterdam 02/2018 - Dynamics 365 and chatbots