Talking to a Q&A bot from a teams channel

Following the steps outline in my 3 part post on building a Q&A bot for Microsoft Teams posts you will get a nice functional bot that works well via the chat section of Microsoft Teams.

However when you try side load in into a channel you will often get a response No Match ! Try changing the query terms! or a custom message if you have changed the code.

The reason is very simple , when you use the 1:1 chat it does not prefix the message it just sends the text but in the channel you type @<botname> and this is passed through to the Q&A library.

However it is escaped into a format of <at> botname <at>, hence all that is required is to add an alternative response for each item that includes that.

The below image shows where to Add an alternative phrasing and on the first line shows the syntax for adding a response for Hi when the bot is called VBBot1

Bot alt

Of course an alternative approach to this would be to alter the code for the bot to remove this prior to sending the message over to Q&A maker which is also a possible but more complex approach.

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s