Proactive Message/Notifications C#
I've read a few issues on this forum and nothing has fully answered my question.
We have a bot that runs on Skype. If the user has been inactive for a certain amount of time we want to send a proactive message. The idea would be to use the directline to send the bot a trigger message after which the bot would reply with the notification.
In the past we've used the direct line for automated testing of the bot. In essence we thought that instead of starting a new conversation everytime, we'd take a conversation id from an active conversation in skype and then send the message along the direct line using that conversation id. This turned out to not work as the direct line would always return json saying the conversation could not be found. As I've read in Microsoft's documentation, when using skype the conversation id will be the same as the user id which might cause problems.
What I'm trying to find out is if it's possible to do this? I get the feeling it might not be because if a message is sent from direct line it would probably have the incorrect "replyTo" id but I'm not sure about that obviously?
I found this link (https://www.codeproject.com/Articles/1176637/How-to-create-Proactive-Bot-with-Microsoft-Bot-Fra) that describes another way to send proactive messages but it seems like a lot of effort for a relatively small feature
@OBrien1510 thank you for opening the issue. I've added our support team to the issue to help you, but in the future for product behavior, how-to, or general understanding questions, please use Stackoverflow. https://stackoverflow.com/search?q=bot+framework
This helps us build our how to knowledge in a place more easily searchable than GitHub Issues. We want to keep our GitHub Issues for tracking defects, or product enhancement requests.
Support team, can we get him some help and also move this over to SO? Thanks
@OBrien1510
As I've read in Microsoft's documentation, when using skype the conversation id will be the same as the user id which might cause problems.
Correct, although I don't believe it will cause problems.
What I'm trying to find out is if it's possible to do this?...I found this link (https://www.codeproject.com/Articles/1176637/How-to-create-Proactive-Bot-with-Microsoft-Bot-Fra) that describes another way to send proactive messages but it seems like a lot of effort for a relatively small feature
That uses some very old code and the SDK has changed a lot since then. Please review the Proactive Sample and the Proactive Docs - I tested the sample on Skype and it works as-is. They show a much easier method of sending proactive messages. If you'd like to send them after some time, adding TrustServiceUrl will likely be required (this may actually fix your current issue, alone).
Basically, to send a Proactive Message, you need a valid ConversationReference. It's easiest to do it all within the bot, like the sample does, instead of going through Directline.
I'm going to close this ticket as it's more of a how-to and like @sgellock said, it belongs on StackOverflow. If you have trouble implementing this, feel free to open a question there.