Answered by:
UCMA 3.0 How to listen for "Send an IM" or "Send an Instant Message" Event

Question
-
Hello, does UCMA 3 get notified at the event where looking through the contact list, choosing a contact and using one of the many ways and versions an Instant Messaging session is initiated where the empty Instant Messaging contact UI dialog window is opened?
I understand that the end point (user) registers for an incoming message. However it possible to hook up to an event that precedes the caller typing something in and sending? It would be nice if a bot could "reach out" immediately upon the dialog window opening.
Thanks!
Jeff
Monday, April 1, 2013 7:16 PM
Answers
-
Kai's answer is probably the only way to do this. You would have to use two SDK's to achieve this. UCMA would be the bot, but it can't be aware that a conversation window was opened by a user until a invite is generated, which does not occur until the user actually types and sends something.
By using the Lync SDK you could monitor for the creation of a new conversation window, and then utilize some back channel communication (ie call to a webservice running as a part of your UCMA app) to tell UCMA to initiate an outbound chat session to that user.
- Marked as answer by Kai Strandskov [Msft] Tuesday, April 9, 2013 12:35 AM
Wednesday, April 3, 2013 8:24 PM
All replies
-
No there is not an event for that in UCMA.
The event would need to be triggered on the client side, but also the Lync client API does not have an event that early in the scenario. I believe the event is not triggered until the IM is sent.
You could use Windows UI Automation to listen for a conversation window being opened, or perhaps others may have better suggestions...
-- How To Ask a Question: http://support.microsoft.com/kb/555375 -- This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm
Tuesday, April 2, 2013 1:11 AM -
Thanks Kai, it seems to me that there should be an event at some level!? However your suggestion is helpful and it may be a possible way to solve this situation. Just brainstorming here, without knowing too many of UCMA 3 mechanisms, so if the Win UI Automation could listen for this event, could a shadow conversation window be running behind the scenes that sends an IM message and impersonates the actual caller to make it seem like the intentioned caller actually started the conversation, to trick UCMA bot into thinking it should reply back to actual caller...??? thanks for your suggestion!Tuesday, April 2, 2013 5:06 PM
-
With your Lync SDK application, you could use a variety of ways to contact the UCMA application and tell it to start a conversation with the originating user. The Lync SDK application is like any managed app so, for example, you could communicate with the UCMA bot via web service.
-- How To Ask a Question: http://support.microsoft.com/kb/555375 -- This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm
- Proposed as answer by Chris TartMicrosoft employee Wednesday, April 3, 2013 8:24 PM
Tuesday, April 2, 2013 11:22 PM -
I won't give up hope that there is a practical way or more answers will emerge! Good idea Kai to look into the Lync SDK.
To have a bot that waits for "hello" seems unnecessary when it could reach out and present a menu at first step of the request.
Thanks for your thoughts!
Wednesday, April 3, 2013 1:15 PM -
Kai's answer is probably the only way to do this. You would have to use two SDK's to achieve this. UCMA would be the bot, but it can't be aware that a conversation window was opened by a user until a invite is generated, which does not occur until the user actually types and sends something.
By using the Lync SDK you could monitor for the creation of a new conversation window, and then utilize some back channel communication (ie call to a webservice running as a part of your UCMA app) to tell UCMA to initiate an outbound chat session to that user.
- Marked as answer by Kai Strandskov [Msft] Tuesday, April 9, 2013 12:35 AM
Wednesday, April 3, 2013 8:24 PM -
Thanks for the additional clarity on this. Still fuzzy on what the Lync SDK portion looks like. Would that be a windows service deployed to each client machine? Or sounds more like a custom version of the client that replaces the standard install, one with augmented features for the particular needs of the org.
Would this feature ever be available in a future version, 2013 and beyond? I do see that it is possible to capture an event on a contact list add request. Although that is hitting the server where simply opening a new conversation to someone in the list of possible contacts is not.
Thursday, April 4, 2013 2:43 PM -
Take a look at the documentation for the Lync SDK for more information about that, and feel free to ask specific follow-up questions in the Lync SDK forum. But the client side would be a managed app that is deployed to every client that either augments the Lync client or replaces it--depending on your solution. However, it sounds like conversations are strongly managed by policy, and so I would recommend using UI Suppression to replace the Lync client with your own custom solution.
-- How To Ask a Question: http://support.microsoft.com/kb/555375 -- This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm
Tuesday, April 9, 2013 12:35 AM