Corporate messengers

icon picker
Microsoft Teams

Microsoft Teams is an enterprise platform that integrates chat, meetings, notes, and attachments into a workspace. The
@Agent
can be displayed as a
@Bot
, which will be available inside the company’s space.

Connection

1. Bot configuration on Microsoft Teams side

First of all, you need to configure on the Microsoft Teams side.

Bot connection

Log in to Microsoft Teams.
Go to the Apps section. ​
image.png
In the search, find the Developer Portal application and go to it. ​
image.png
Go to Tools → Bot Management and add a new
@Bot
. ​
image.png
Enter the
@Bot
's name and click Add. ​
image.png
In the Endpoint Address field, specify the webhook of the
@Project Channel
(Chatbot webhook: URL field), which you can receive when setting up the
@Project Channel
on the
@Platform
. ​
image.png
Go to the Client Secrets section, click the Add client secret for the bot button, and copy the value from the field somewhere. You will need it when setting up an
@Project Channel
on the
@Platform
. ​
image.png
Screenshot_11.png
Return to the Tools → Bot Management section and save the
@Bot
ID. You will need it when setting up an
@Project Channel
on the
@Platform
. ​
image.png
Prepare a zip archive with the application. It should contain icons for the
@Bot
and a manifest.json file with the
@Bot
settings. In the manifest.json file you need to specify the ID of the created
@Bot
, the name and description of the
@Bot
in Teams. You can also set commands. More details are described in .
Go to Applications → Manage your apps. ​
image.png
Click on Upload an app and upwnload the prepared manifest.zip archive. ​
image.png
After the application is approved by the administrator of your space, the application (
@Bot
) will be available to space users in the Applications tab.

Preparing an archive with an application

Archive type: zip ​Archive contents:
manifest.json — a JSON file containing information about the
@Bot
, commands and permissions.
icon.png — application icon.
Example of manifest.json:
Important: be sure to indicate your Bot ID in the id and bots.botId fields.
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.14/MicrosoftTeams.schema.json",
"manifestVersion": "1.14", //app manifest version for Microsoft Teams
"version": "1.0.0", //app version
"id": "93b81ba4-4572-4387-8568-37a4a76675f7", //Bot ID obtained from "Manage Bots"
"packageName": "com.teams.sample.teamsconversationbot", //application package name
//information about the app developer, including name, website URL, privacy policy, and user agreement
"developer": {
"name": "teamsConversationBot",
"websiteUrl": "https://www.microsoft.com",
"privacyUrl": "https://www.teams.com/privacy",
"termsOfUseUrl": "https://www.teams.com/termsofuser"
},
"icons": {
"outline": "icon-outline.png", //icon with black outline
"color": "icon-color.png" //color icon
},
"name": {
"short": "TeamsConversationBot", //short name of the bot
"full": "TeamsConversationBot" //bot's full name
},
"description": {
"short": "TeamsConversationBot", //brief description of the bot
"full": "TeamsConversationBot" //full description of the bot
},
"accentColor": "#FFFFFF", //main application color
"bots": [
{
"botId": "93b81ba4-4572-4387-8568-37a4a76675f7", //Bot ID obtained from "Manage Bots"
"scopes": [
"personal",
"groupchat",
"team"
],
"isNotificationOnly": false, //indicates whether the bot is notification only or can send messages
"supportsCalling": false, //indicates whether the bot supports calls
"supportsVideo": false, //indicates whether the bot supports video
"supportsFiles": false, //indicates whether the bot supports files
//список доступных команд
"commandLists": [
{
"scopes": [
"personal",
"groupchat",
"team"
],
"commands": [
{
"title": "MentionMe",
"description": "Sends message with @mention of the sender"
},
{
"title": "Show Welcome",
"description": "Shows the welcome card"
},
{
"title": "MessageAllMembers",
"description": "Send 1 to 1 message to all members of the current conversation"
}
]
}
]
}
],
//permissions requested by the application
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": []
}

2. Agent channel configuration in the Platform

You need to create and configure an
@Project Channel
with the “Microsoft Teams” connector.
Click on the agent settings button. ​
image.png
Click the Add channel button. ​
image.png
The
@End Channel
selection panel will open. ​
image.png
Select
@Microsoft Teams
.
The
@Project Channel
creation panel will open. ​
image.png
Optionally, enter a title for this
@Project Channel
in the Name field with the placeholder New channel. ​
image.png
Specify the webhook of the
@Project Channel
(Chatbot webhook URL field) as the Endpoint Address in the bot settings in Microsoft Teams. You can copy the entire URL by clicking the Copy this webhook button. ​
image.png
Set the
@Bot
ID received in the Microsoft Teams
@Bot
settings in the Microsoft Teams Token field in the
@Agent
settings window.
Specify the client secret for the
@Bot
in the Microsoft Teams webhook URL field. ​
image.png
To save the
@Project Channel
without activating it, click the CREATE button. ​
image.png
To save and activate the
@Project Channel
, click the CREATE & ACTIVATE button. ​
image.png
The
@Project Channel
will be saved and activated if:
The
@Agent
is trained;
The token in the Microsoft Teams Token field is unique (there are no active channels of the same type with the same token);
The channel address is accessible;
The channel webhook is registered succesfully.
The
@Project Channel
will be saved but not activated if one or more conditions are not met.
To cancel
@Project Channel
creation, click the CANCEL button. ​
image.png

Editing and Deleting Agent Channel

To edit an
@Project Channel
, click on its icon on the
@Agent
card. ​
image.png
To edit any field, click the field and enter a new value.
To apply changes to an activated
@Project Channel
, click the APPLY button. ​
image.png
Changes will be applied if:
The
@Agent
is trained;
The token in the Microsoft Teams Tokenfield is unique (there are no active channels of the same type with the same token);
The channel address is accessible;
The channel webhook is registered succesfully.
Changes will not be applied if one or more conditions are not met.
To deactivate the
@Project Channel
, click the DEACTIVATE button. ​
image.png
To apply changes to a non-activated
@Project Channel
, click the SAVE button. ​
image.png
To apply changes and activate the
@Project Channel
, click the SAVE & ACTIVATE button. ​
image.png
Changes will be applied and the
@Project Channel
will be activated if:
The
@Agent
is trained;
The token in the Microsoft Teams Token field is unique (there are no active channels of the same type with the same token);
The channel address is accessible;
The channel webhook can be registered.
Changes will be applied but the
@Project Channel
will not be activated if one or more conditions are not met.
To cancel making changes, click the CANCEL button. ​
image.png
To delete the
@Project Channel
, click the DELETE button. ​
image.png

Communication

Mapping of Channel variables from Microsoft Teams
18
Channel variable
End channel
Variable in the body of an incoming request from a channel
Peculiarities
1
channel_visitor_id
Microsoft Teams
from.id
2
channel_conversation_id
Microsoft Teams
conversation.id
3
channel_visitor_firstname
Microsoft Teams
No
4
channel_visitor_lastname
Microsoft Teams
No
5
channel_visitor_account
Microsoft Teams
from.name
6
channel_visitor_phone
Microsoft Teams
No
7
channel_visitor_email
Microsoft Teams
No
8
channel_visitor_source
Microsoft Teams
No
9
channel_visitor_auth
Microsoft Teams
No
10
channel_visitor_location
Microsoft Teams
No
11
channel_message_id
Microsoft Teams
No
12
channel_message_recipient
Microsoft Teams
No
13
channel_webhook_url
Microsoft Teams
serviceUrl
14
channel_reply_to
Microsoft Teams
no
No results from filter
Communication in Microsoft Teams
20
Functionality
Channel
Availability
Description
1
channel_chat_id
Microsoft Teams
Yes
Format: channel_visitor_id|teams
2
Messages will reach the Bot User if the Agent writes first in an existing chat
Microsoft Teams
Yes
3
Buttons
Microsoft Teams
Yes
4
Transfer to operator
Microsoft Teams
No
Microsoft Teams does not have such functionality
5
Transferring files as files from the Agent
Microsoft Teams
Yes
6
Transferring files as links from the Agent
Microsoft Teams
Yes
7
Receiving a file from the Bot User into a script
Microsoft Teams
Yes
8
Receiving geolocation from an Bot User in a Script
Microsoft Teams
No
9
Delivery of messages over 1000 characters from Agent to Bot User
Microsoft Teams
Yes
10
Get a link to the lead source
Microsoft Teams
No
11
Markdown usage
Microsoft Teams
Yes
12
Mailing with Notification
Microsoft Teams
No
No results from filter
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.