Skip to content

This is a basic bot that uses the DirectLine backchannel to send and receive event messages to an instance of WebChat

Notifications You must be signed in to change notification settings

nwhitmont/backChannelBot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Back Channel Bot

NOTE: Running this demo requires running the WebChat backchannel sample page which sends events of activity name "buttonClicked" and receives events with activity name "changeBackground.

This is a basic bot that uses the DirectLine backchannel to send and receive event messages to an instance of WebChat.

This highlights the ability for a bot to communicate with a page that embeds the bot through WebChat. In other words, our bot can:

  • Send events to a page that hosts an instance of WebChat - demonstrated by the bot sending an activity of type "event" and of name "changeBackground", which changes the background color of the parent page.
  • Listen for events from the page that hosts an instance of WebChat - demonstrated by the bot responding "I see you clicked that button" when it receives an event named buttonClicked.

Dialog Structure

To run the demo, pull the WebChat repo and follow instructions for running the samples. Create a bot from the bot portal and (for testing) add keys to the connectorSetup.js file. Either deploy the bot to Azure or use ngrok to tunnel back into your machine

About

This is a basic bot that uses the DirectLine backchannel to send and receive event messages to an instance of WebChat

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%