botbuilder-timeout for Typescript Virtual assistant - timeout

We have Microsoft Virtual Assistant built it Typescript and we are planning to add Timeout capability. What this means is VA should end the conversation with its Skill if user is not engaged for certain amount of time.
There is botbuilder-timeout module to do this in V3 SDK which says,
"Module for Microsoft Bot Framework to enable your bot to prompt the user if the bot detects inactivity and ultimately end the conversation if no user activity after a defined period of time."
Is there anything in V4 or Virtual Assistant that offers similar capability ? If yes any ideas/pointers to document is appreciated.

There isn't anything official for V4 bots like this. I don't believe I've seen anything unofficial, either.
That being said, we generally recommend something like:
On each message, start a synchronous timer. You can do this in the bot, but it would be better to do outside of the bot, like with Azure Functions or something. The rest of this answer will assume the timer is outside of the bot. Ensure the timer also keeps track of the conversationReference related to the timer.
Restart the timer each time the user matching that conversationReference sends a message
Once the timer expires, send an event to the bot with the user and conversation information (maybe through ChannelData), letting the bot know the timer has expired. You could also create a separate endpoint and monitor there, so you don't need the activity scheme; instead of /api/messages, you could use something like /api/expiredTimers.
Once the expired timer event is received, send a proactive message to the user to either 1) see if they're still there, or 2) end the conversation.

Related

How to send user identification when a user interacts with an adaptive card in a Teams Message

We are using the graph API to send a message to the General channel of a Microsoft Team, which has a number of members.
We would like to allow any members to interact with the message via an adaptive card.
This is doable using say Action.OpenUrl or .Submit, however we need to know which user it is which is interacting. I imagine this must be a fairly common thing to do.
What solutions and options are available to do this?
For example, is it possible to obtain the user's Team id at the time an action is invoked ?
Every activity sent to the bot has a from property that identifies the user that sent the activity. You can see the full activity schema here. I advise you to run your bot in debug mode so that you can see all the data your bot receives. If you want to run your bot in debug mode and talk to the bot using Teams instead of Emulator, you can use tunneling: https://learn.microsoft.com/azure/bot-service/bot-service-debug-channel-ngrok

Displaying popup messages/modals with Microsoft Graph

I am currently developing an Outlook Add-In that receives a notification whenever a change in the user's calendar is recorded. The thing is that, there are some occasions where we would change an event's date from the backend by calling PATCH /events/eventId.
It would be very nice if there was any way to notify the user immediately, other than sending an email. Something like a popup modal with a warning message would work very well.
Currently the feature you requested is not a part of the product. We track Outlook add-in feature requests on our user-voice page. Please add your request there. Feature requests on user-voice are considered, when we go through our planning process.

Audit logs retrieval in slack

I need to check audit logs for activities done between a timeperiod on my slack account. I couldn't find any API/methods which can help me with audit logs retrieval. I need to see what all users have been added, removed or invited between a given timeframe. Any help on how this can be done?
There are of course methods to download login (team.accessLogs) and integration activity (team.integrationLogs), but they only provide a part of the functionality you asked for and the first is only available on paid tier.
However you could develop a small custom app for logging all required activity using the new Event API. With the Event API your app can subscribe to any event type you like to log. Whenever an event of that type occures Slack will send a request to your app, with detailed context information. Your app can then store this info in a file for later retrieval and analysis.
e.g. users added: https://api.slack.com/events/team_join

Creating private messages

I'm writing a simple mini-chat with custom User model and authentication via omniauth. The chat uses web-socket faye-rails to send and display messages instantly without refreshing the page. The matter is that I'd like to add private messages - I mean, that I can choose an user and start our own dialog in a secondary chat window. I've looked for the solutions, but everything I found was about e-mailing - with inbox messages, trash cans and so on. So I wonder if there's any solution easy to implement.
The source code of my chat is here
Welcome to push technology and active web design!
When someone logs in, present them with a list of friended accounts and logged in state. For logged in friends, they can select a friend from the list and start a chat session in a new window. For logged out friends, they can send a message that's delivered the next time the recipient logs in.
You'll then have to create a friending mechanism that allows a user to request a connection to a prospective friend, be notified of pending connection requests, approve friend requests, and an unfriend feature. Hopefully that one won't be used too often.
I've worked with Faye & I like Faye but also take a quick look at the beta release of Rails 5. Action Cable will do the same thing and the framework support is better.

Twilio Task Router , Reservation Changing Status

Following the tutorials to creation of a task router (Workspace,queue,worker,task) and task creation via a Phone Call.
I am able to successfully land the call and create the task via my node.js app.
After adding the Agent UI via tutorial #
Agent UI Add Project
Here is the application flow:
Customer calls Twilio number
Twilio Voice Posts to a Node.js Rest API
Twilio Voice Posts to a Node.js Rest API
Twiml generated and user gets Prompts
User chooses an option
Response is Posted to a Node.js API and task is created
The above steps are success
On the client
Agent launches the node.js app with taskrouter.min.js and agent.js as provided in the sample above.
Customer gets the default hold noise, on the agent browser a series of events "reservation created, update and reservation cancels" are observed. Posting the console logs towards the end.
Observation 1, customer gets the default Hold noise confirms that Task is created successfully via the App. Task also seen on the Twilio Admin GUI
Observation 2, Getting a sequence of Reservation,Update,Cancel events multiple times.Also Observed that the dateCreated, dateUpdated and dateStatusChangedare year1970 , 1970-01-17T17:52:39.413Z.
Any pointers would be greatly appreciated.
[Edit:]
I do see similar issues with the PHP Sample code as well. Found that the Date is not an issue.
[Edit:]
Reached out to Twilio Support, hoping to hear from them, no luck so far
[RESOLVED]
Heard back from twilio support, thanks twilio. Issue was with the Assignment Callback URL on the Workflow. My API was /Get. Changed it from Get to Post, to make it work. As the assignment URL was not reachable (via POST), task router was trying to cancel the reservation.
Twilio employee here.
This is result of TaskRouter being able to hit your AssignmentCallbackUrl with an HTTP POST request. We've noticed that on your Account there's this notification message:
Cannot POST /assignment
Please enable POST for your AssignmentCallback endpoint.
TaskRouter will actively cancel the reservation if it cannot hit your AssignmentCallbackUrl or there is an error when issuing an Assignment Instruction.
The several updates in the console are due to the fact that TaskRouter cancels the reservation due to not hitting the AssignmentCallbackUrl, moving the Worker back to the previous state (Available), and then trying to assign the Task again, and thus generating another Reservation for the Worker for the same Task (repeat 15x until the Max Task Assignment is hit).
Heard back from twilio support, thanks twilio. Issue was with the Assignment Callback URL on the Workflow. My API was /Get. Changed it from Get to Post, to make it work. As the assignment URL was not reachable (via POST), task router was trying to cancel the reservation.

Resources