Top Banner
Programming the Microsoft Bot Framework Stefano Tempesta, Microsoft MVP
17

Programming the Microsoft Bot Framework...Dec 05, 2017  · Core Concepts •Bot Application •Channel •Activity •Message / System •FormFlow •Dialog •State •Rich Cards

May 21, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Programming the Microsoft Bot Framework...Dec 05, 2017  · Core Concepts •Bot Application •Channel •Activity •Message / System •FormFlow •Dialog •State •Rich Cards

Programming theMicrosoft Bot Framework

Stefano Tempesta, Microsoft MVP

Page 2: Programming the Microsoft Bot Framework...Dec 05, 2017  · Core Concepts •Bot Application •Channel •Activity •Message / System •FormFlow •Dialog •State •Rich Cards

Bot Framework Components

Bot Framework Portal & Channelshttps://dev.botframework.com

Bot Builder SDKhttps://aka.ms/bf-bc-vstemplate

Bot Framework Channel Emulatorhttps://emulator.botframework.com

Bot Framework Channel Inspectorhttps://aka.ms/bf-channel-inspector-learnmore

Page 3: Programming the Microsoft Bot Framework...Dec 05, 2017  · Core Concepts •Bot Application •Channel •Activity •Message / System •FormFlow •Dialog •State •Rich Cards

Programming Bot Framework

Programming Languages

• Bot Builder SDK for .NET https://github.com/stefanotempesta/botframework

• Bot Builder SDK for Node.js

• REST API (Azure Bot Service)

Programming Approaches

• FormFlow

• Dialogs

• JSON Schema

• Q&A Maker https://qnamaker.ai• LUIS https://www.luis.ai

Page 4: Programming the Microsoft Bot Framework...Dec 05, 2017  · Core Concepts •Bot Application •Channel •Activity •Message / System •FormFlow •Dialog •State •Rich Cards

Core Concepts

• Bot Application

• Channel

• Activity

• Message / System

• FormFlow

• Dialog

• State

• Rich Cards

• Entities

• Global Handlers

• Security

Page 5: Programming the Microsoft Bot Framework...Dec 05, 2017  · Core Concepts •Bot Application •Channel •Activity •Message / System •FormFlow •Dialog •State •Rich Cards
Page 6: Programming the Microsoft Bot Framework...Dec 05, 2017  · Core Concepts •Bot Application •Channel •Activity •Message / System •FormFlow •Dialog •State •Rich Cards

Interactions

Page 7: Programming the Microsoft Bot Framework...Dec 05, 2017  · Core Concepts •Bot Application •Channel •Activity •Message / System •FormFlow •Dialog •State •Rich Cards

FormFlow

• Chain From Do

• Properties

• Enumerations

• (Optionally) Fluent BuildForm• Add custom messages

• Dynamic values

• Field Validation

• Confirmations

Page 8: Programming the Microsoft Bot Framework...Dec 05, 2017  · Core Concepts •Bot Application •Channel •Activity •Message / System •FormFlow •Dialog •State •Rich Cards

Dialogs

public class RootDialog : IDialog<object>

Activity DialogAnotherDialog

WAIT

CALL

ReplyActivity

POST

Page 9: Programming the Microsoft Bot Framework...Dec 05, 2017  · Core Concepts •Bot Application •Channel •Activity •Message / System •FormFlow •Dialog •State •Rich Cards

Rich Cards

• Suggested Actions

• Attachments

• Hero card

• Thumbnail card

• Video / Audio / Animation card

• Receipt card

• SignIn card

• Adaptive card

Page 10: Programming the Microsoft Bot Framework...Dec 05, 2017  · Core Concepts •Bot Application •Channel •Activity •Message / System •FormFlow •Dialog •State •Rich Cards

Adaptive Cards

http://adaptivecards.io/

• Body

• Actions

• Speak

• BackgroundImage

Page 11: Programming the Microsoft Bot Framework...Dec 05, 2017  · Core Concepts •Bot Application •Channel •Activity •Message / System •FormFlow •Dialog •State •Rich Cards

Dialog Flow

Call

ForwardWait Done

Page 12: Programming the Microsoft Bot Framework...Dec 05, 2017  · Core Concepts •Bot Application •Channel •Activity •Message / System •FormFlow •Dialog •State •Rich Cards

State Management

• User Data

• Conversation Data

• Private Conversation Data

StateClient

• Dialogs automatically store state• Bot Connector State Service

• CosmosDB or Azure Table Storage

Page 13: Programming the Microsoft Bot Framework...Dec 05, 2017  · Core Concepts •Bot Application •Channel •Activity •Message / System •FormFlow •Dialog •State •Rich Cards

JSON Schema

http://json-schema.org/

• JSON FormFlow

• References & Imports

• Templates

• Properties

Page 14: Programming the Microsoft Bot Framework...Dec 05, 2017  · Core Concepts •Bot Application •Channel •Activity •Message / System •FormFlow •Dialog •State •Rich Cards

Smarter Bots

• Q&A Maker

• LUIS (Language Understanding Intelligent Service)

• Cognitive Services• Image and video understanding

• Speech recognition and conversion

• Text Analytics

• Bing Spell Check

• Web Search

Page 15: Programming the Microsoft Bot Framework...Dec 05, 2017  · Core Concepts •Bot Application •Channel •Activity •Message / System •FormFlow •Dialog •State •Rich Cards

Q&A Maker

https://qnamaker.ai

• Knowledge Base (Q&A)

• Train & Publish

• Alternative phrasing

• Best match

• No need to use Bot Framework!

Page 16: Programming the Microsoft Bot Framework...Dec 05, 2017  · Core Concepts •Bot Application •Channel •Activity •Message / System •FormFlow •Dialog •State •Rich Cards

LUIS

https://www.luis.ai

• Intent

• Utterance

• Entity (Custom and Prebuilt)

• Domain

• Train & Publish

Page 17: Programming the Microsoft Bot Framework...Dec 05, 2017  · Core Concepts •Bot Application •Channel •Activity •Message / System •FormFlow •Dialog •State •Rich Cards

Security

• Registration

• Authentication[BotAuthentication]

public class MessagesController : ApiController