Microsoft Teams


How can you send/receive Microsoft Teams Messages from XCALLY?


 XCALLY Motion Open Channel offers the integration of Microsoft Teams messenger as a New Channel, allowing:

  • the Customers to interact with your Agents sending direct messages to your Microsoft Teams Account;
  • your Agents to receive the incoming messages on a special Teams Queue and to reply from the XCALLY Motion standard GUI;

  • the Customers to receive the messages back on Microsoft Teams client.


Compatibility

The minimum required version of XCALLY Motion is 2.0.70

The integration allows you to exchange text or attachments. To send both text and attachments, you must send more messages




On this page:

How to install Microsoft Teams plugin and use it with Open Channel:

In order to use the Microsoft Teams plugin for your Open Channel account you need to:

  1. Get the Microsoft Teams plugin from AppZone
  2. Install the plugin in XCALLY Motion
  3. Create an Open Channel account and link it to Microsoft Teams
  4. Create a Microsoft Teams App
  5. Create the Azure Bot
  6. Enable the Developer Preview for your Microsoft account
  7. Setup the Microsoft Teams Plugin configuration 



Microsoft Teams Plugin

Download and install the Microsoft Teams Plugin: 

https://repository.xenialab.com/repository/plugins-legacy/teams-plugin/teams-plugin-v1.0.2.zip



Installing the Plugin to XCALLY Motion

Inside XCALLY Motion, Login as admin:

  • Goto AppZone > Plugins section from the sidebar and upload the plugin zip file:


After the installation, it will be visible in the list of plugins:

and also in the list of Plugins on sidebar:


Open Channel account

  • Create a new Open Channel Account in your XCALLY Motion in the Openchannel Section:


The Reply URL should be http://localhost:{PORT}/sendMessage, where {PORT} is the one you have defined in your Microsoft Teams Plugin settings inside XCALLY Motion.

Complete the Open Channel account configuration (Disposition, Action, etc).

Please do not forget to select teams as the mapKey and to add the relevant Agents to your account.


  • Create a new Open Channel Queue:


  • Add Agents to the Queue

Open Channel

For more info on this step please refer to the Configure a new OpenChannel account section of documentation.



Microsoft Teams App Creation

You can use the Web App available here https://teams.microsoft.com/_#/discover or download the desktop client at https://teams.microsoft.com/downloads.

  • Login using your Microsoft Office 365 account



  • Open the App Studio app by clicking on the Apps menu (the three dots on the sidebar)
    Note: if it is not present, you can get it from the store by clicking on "Go to Store" and search for "App Studio" app


  • Go to the Manifest editor tab, click on "Create a new app" and fill all the required fields of the App details


Create the Azure Bot

In the Manifest editor tab of the App Studio, click on Bots under the Capabilities section and click Set up


  • Choose a name for your bot
  • Check the "My bot supports downloading and uploading files" option
  • Check bot "Personal" and "Team" options for the scope
  • Click on Create bot
  • Store the newly generated Microsoft App Id for later (it's the alphanumeric code under you bot name)



  • Generate a new password for your bot application by clicking on Generate new password and save it for later 
    Note: In case you didn't save the password you can simply generate a new one
  • Insert the messaging endpoint 

The messaging endpoint should follow the format: https://{HOSTNAME}/api/plugins/webhook?port={PORT}&path=/api/messages

  • where {HOSTNAME} is usually your XCALLY hostname or IP address, or the hostname of another server in case you would like to host your integration/application separately.
  •  {PORT} is the one you have defined in your Microsoft Teams Plugin settings inside XCALLY Motion.


Add your Teams app to your domain

In the App Studio's Manifest editor tab, go to the Finish section:

  • Click on Test and distribute
  • Click on Download to download the .zip package of the newly created app



  • Go back to the Teams app store and click on Upload a custom app
  • Click Upload for {YOUR_ORGANIZATION_NAME} and select the app package you downloaded before

If the upload was successful, you should now see your organization name in the store sidebar and your Teams application in the Apps menu.


Enable the Developer Preview

In order for your bot to send and receive attachments you need to enable the Developer Preview as described in the official documentation:

https://docs.microsoft.com/en-us/microsoftteams/platform/resources/dev-preview/developer-preview



Connecting the Plugin with XCALLY Motion

  • Configure the Plugin for Microsoft Teams by selecting Microsoft Teams Integration from the list of Plugins in the sidebar and fill all the fields
    • Insert Microsoft App ID (obtained during the Bot creation)
    • Insert Microsoft App Password (obtained during the Bot creation)
    • Select your Open Channel account from the list (as created in the previous step)
    • Insert the Username and Password for XCALLY Admin user
  • After saving the changes, Reload the Plugin from: App Zone > Plugins > Microsoft Teams Integration (three dots menu) > Restart Plugin



Additional Information

Configuring your firewall

If your XCALLY service is hosted behind a firewall then please make sure that the HTTPS port is able to accept incoming requests from Microsoft Teams server.

A few suggestions in this regard:

  • Try to find the IP address for Microsoft Teams server, that is sending webhook requests to XCALLY, using your preferable network analysis tool.
  • Add the rule to allow incoming traffic from Microsoft Teams's IP address, on Port 443, in your firewall policy.

                       -- OR --

Modify the file /etc/sysconfig/iptables and add the following line:

-A INPUT -s 0.0.0.0/0 -p tcp --dport 443 -j ACCEPT


Disclaimer: This method will open port 443 of your XCALLY server for all IP addresses.


Debugging/Troubleshooting

All of the log files for Microsoft Teams Integration plugin events are available at /var/log/xcally/ directory under openchannel-teams- naming convention.