Home > Lync 2013, Office 365, Skype For Business > Skype for Business Chat Bot

Skype for Business Chat Bot

Skype for Business is one of the collaboration tool in corporate to enable enterprise instant messaging platform to millions of users. The BOT framework is not yet supported in Skype for Business on_prem version but it could be developed by playing around UCWA component which is part of Skype for business web component.

To Enable the chat bot in Skype environment, you may have below 3 scenarios.  So let us find out what is available in all this scenario.

  • Skype for Business Online – Go here for more details

In case, your SFB environment is purely located in online, you can leverage the Skype for Business Bot Framework channel.

  • Skype for Business hybrid – Go here for more details

Skype for Business bots can be connected to Skype for Business Server users if Hybrid connectivity has been deployed in the environment.

  • Skype for Business On_Prem

Skype for Business On-Premise has a set of APIs called Unified Communications Web API(UCWA) which can be leveraged to integrate with the Bot framework.

We are only going to cover scenario 3,” How can be used UCWA API to integrate with BOT” – The architecture of the application will look like below.

 

UCWA 2.0 is a REST API that exposes Skype for Business Server 2015 instant messaging (IM) and presence capabilities. For a bot to send and receive message using UCWA, the following steps are required to be performed.

  1. UCWA URL
  2. Discovery
  3. Authentication
  4. Registration

UCWA URL

If your application would perfor auto discovery using SFB credential then step 1, is optional, otherwise you can use the UCWA URL to query to Skype for Business UCWA server (Which is SFB Pool frond end server)

Internal
HTTPS https://LyncDiscoverInternal.<domain&gt;
HTTP http://LyncDiscoverInternal.<domain&gt;

 

External
HTTPS https://LyncDiscover.<domain&gt;
HTTP http://LyncDiscover.<domain&gt;

 

Discovery

UCWA always runs in the home pool of the authenticated user account used in application for chat bot. The purpose of the autodiscovery flow that is described here is to find the location of UCWA.

Authentication

This below step will be executed for the first sign-in and succeeds when the client application retrieves the UCWA URL. This URL can be cached until a failure occurs.

  1. The application queries the discovery URL (lyncdiscoverinternal.domain.com (If UCWA URL is not hardcoded) once application supply SIP URI format user@domain.com
  2. If response of above URL failed then it will try another URL (lyncdiscover.domain.com)
  3. The security check step consists of making sure that the client is not spoofed
  4. The client can follow the redirect link in case multiple pool in skype server
  5. The response from Autodiscover is a response with a link to the user
  6. The final response contains a link to the applications This is the link that is used to create the application.

Registration

The application will now poll the Skype server for incoming messages. When a message is received by the application, we bootstrap our bot and pass the text as properly formatted Activity message. The bot then follows usual flow of sending the text to LUIS and determining the intent. Based on the context, it will then send the response back to the user. The end to end architecture of the bot can be seen below.

Now, We are only left left to build the application. As I am not from programming background, below link is written in very nice way !!!

Skype for Business bot using UCWA development – Go Here

  1. Dhaval
    September 11, 2018 at 2:30 pm

    Very nice article with detailed info.

  1. No trackbacks yet.

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 )

Connecting to %s

%d bloggers like this: