Upgrade to Pro — share decks privately, control downloads, hide ads and more …

I, For One, Welcome Our New Bot Overlords

I, For One, Welcome Our New Bot Overlords

An Intro to the Microsoft Bot Framework

Matt Soucoup

October 28, 2016
Tweet

More Decks by Matt Soucoup

Other Decks in Programming

Transcript

  1. Headshot optional @codemillmatt codemilltech.com PRINCIPAL Matthew Soucoup I, For One,

    Welcome, Our New Bot Overlords! AN INTRO TO MICROSOFT’S BOT FRAMEWORK
  2. S C H E M A T I C B

    U I L D I N G A B O T
  3. S C H E M A T I C B

    U I L D I N G A B O T
  4. S C H E M A T I C B

    U I L D I N G A B O T
  5. S C H E M A T I C B

    U I L D I N G A B O T
  6. S C H E M A T I C B

    U I L D I N G A B O T
  7. S C H E M A T I C B

    U I L D I N G A B O T
  8. S C H E M A T I C B

    U I L D I N G A B O T
  9. Downloading • dev.botframework.com • node.js or .Net • npm: botbuilder

    • NuGet: Microsoft.Bot.Builder • Emulator • VS2015 Template
  10. S C H E M A T I C B

    U I L D I N G A B O T
  11. S C H E M A T I C B

    U I L D I N G A B O T
  12. Listening – The Message Activity Properties • ServiceUrl • Conversation

    • From • Recipient • Always the bot (ID can change) • Entities • (aka Mentions) • Text
  13. S C H E M A T I C B

    U I L D I N G A B O T
  14. Talking – Activity Methods Creating a Message • Activity.CreateReply •

    Member function • Activity.CreateMessageActivity • Static function Sending a Message ConnectorClient.Conversations • ReplyToActivityAsync • Keeps message thread • SendToConversationAsync • Need to populate metadata • CreateConversationAsync • Email only • Need to manually add all participants
  15. S C H E M A T I C B

    U I L D I N G A B O T
  16. Conversing – IDialogContext Properties • Frames • DialogStack • PrivateConversationData

    • Private data for a user • ConversationData • Private data for entire conversation • UserData • Private data for user across all conversations
  17. Conversing – IDialogContext Methods • Call & Forward • Call

    a child dialog • Done • Complete dialog & return control to parent • Fail • Fail & return control to parent • Wait • Wait for user input • MakeMessage & PostAsync
  18. Headshot optional @codemillmatt codemilltech.com PRINCIPAL Matthew Soucoup I, For One,

    Welcome, Our New Bot Overlords! AN INTRO TO MICROSOFT’S BOT FRAMEWORK