Is it possible for a single Teams bot to have more than 1 simultaneous chat conversation with the same user? - botframework

For a remote advisor solution, we would like a Teams bot to be able to carry on multiple 1:1 chat conversations with the same user (advisor) in independent chat windows.
Currently of course you can only have one chat widow between 2 participants and it appears only 1 conversation ID. (Using threaded conversations has cognitive overload on the adviser to keep track of multiple threads, so independent chat windows is preferred)
What are some techniques to make this possible, other than to use multiple cooperating bots?

It is not possible, because when you create a conversation with a user you use tenantId + userId, which results in a conversation. There is no way to have multiple ones.. it is like 1-on-1 chat with a person, you cannot have many of them.
As an alternative, you can create public or private group chat and invite there a person and the bot. You can many of them.

It is not possible to have multiple 1:1 chats with the same Bot. Each user will only have a single chat window with one Bot. If you want this bot to be able to interact with many people at once you can add it to teams scope.

Related

I need to get and active users list or active connections who are in chat Bot Framework

I need active users or active connections list who are available to chat, who left from conversation I don't want to retrive those in below code, please help me out on this below is the code of getting all connections list.
var activity = dc.Context.Activity;
IList<ConnectionRequest> connectionRequests =
_messageRouter.RoutingDataManager.GetConnectionRequests();
replyActivity = activity.CreateReply();
if (connectionRequests.Count == 0)
{
replyActivity.Text = "No pending requests";
}
else
{
replyActivity.Attachments = CommandCardFactory.CreateMultipleConnectionRequestCards(
connectionRequests, userService, activity.Recipient?.Name);
}
The way bots built with the Bot Framework work is somewhat different that bots made for a specific service, like a Discord bot or a Slack bot. Since there are a multitude of different channels that you might offer your bot on, some of which don't have the concept of "online users" as such, there is no built-in functionality that gets all online users.
Depending on the channel in which your bot is operating, the concept of "online users" could have different meanings. A Teams bot for example only connects to a new user one time, and persists the conversation, whereas a Direct Line bot does not.
Bots developed with the Bot Framework SDK are inherently stateless, and as such you would need to define and implement your own method for identifying and contacting "online users".
You could for example store the names and user IDs of users who connect to your bot for a period of time. If your users use AAD auth you could make use of Microsoft Graph APIs.
Essentially, there is no standard way to do this, and you would need to define your own custom logic to fit the channel and features of your specific bot.

Microsoft Azure Bot Service Proactive Messaging to Group (Meeting) Chat

I would like to implement the following Scenario:
Within a Meeting that should take place in the real world in a room (not necessarily within MS Teams), I want a Microsoft Azure Chat bot to post a message to the meeting-chat, without someone having to add the bot to that meeting chat.
I noticed, that real proactive messaging to MS Teams is still not possible, a workaround is necessary: Catching a conversation reference including the users teams-chat-id while he adds the bot e.g. via personal teams app. This works good, if the teams app is pushed to all users within an organization via policies.
This workaround however is not possible within a meeting-chat, that might not exist at the time the bot should write to it. So, no possibility to catch a conversation reference to post to.
Also, I noticed that there does not even exist a MS Graph endpoint neither a connector within Logic apps to post a teams message to several users without cannel-context.
Do you see any workaround for this scenario, or is it simply not supported?
To my knowledge, you're right on both accounts - a bot can't proactively message a chat that it's not part of, and I don't think Graph supports messaging to group chats altogether, which is your scenario.
Just on a point of correctness though, a bot can proactively message (a) individual users (1-1), (b) group chats, and (c) Team channels, each separately (i.e. it does not need to be installed by each user, and message each user privately, unless that is the desired scenario. All that's required for each of these is the relevant "conversationid" that represents the specific conversation, and the ServiceUrl.

How to make a bot to message only certain people

I developed a welcome bot using the Microsoft Bot Framework. I want to add it to Teams. In teams I want the bot to send welcome messages to only certain members belonging to a particular team or group. Please provide me advice or steps how to do it.
You can only send a welcome message to a specific user if that user first contacted your bot. This is done purposefully to minimize the possibility of spam bots being created. Once a user has contacted your bot you can capture the user's Id and, coupled with the conversationId, you can send future (proactive) messages.

Include bot in Microsoft Teams personal conversation with other people

Is it possible to add a bot to a personal conversation with other people?
What I would like to provide is the ability to have #bot commands work in a personal conversation with other users.
Today my bot can:
Respond to messages in a team room when called with #bot
Send direct messages and have conversations 1-on-1 with the user.
However I see no way to provide #bot functions in a 1-on-1 chat between two people.
I can add other people to those 1-on-1 chats, but not bots.
We are working on this feature right now - it's not yet possible, but we hope to release it in the next few months.

Can user resume a conversation in a different channel? (Bot Framework)

Let's think of the following example:
1) I have a certain bot deployed on Azure
2) Bot can be talked via Facebook Messenger and via Skype
3) A certain user talks to the bot via Facebook Messenger and then he leaves.
4)A couple of minutes ago the same user resumes the conversation with the bot, but via Skype.
Is this possible? I assume Bot Framework doesn't have anything included for this, hence, that this isn't posible (as conversations are independent and state changes depending on the channel). Is there any way to identify a user (via some authentication method maybe), and then making this logic again?
Do any of you know any workaround for this?
Thanks in advance!
The Bot Framework Connector service is a component which provides a single API for your bot to communicate across multiple client services such as Skype, Email, Slack. Every bot and user has an account within each channel.
The channel account contains an identifier (id) and other informative bot non-structural data, like an optional name.
And there us unique conversation ID created for each conversation of each user for each channel. And you can customize your channel capabilities as described here.
Regards,
Jyo

Resources