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.
In the search, find the Developer Portal application and go to it.
Go to Tools → Bot Management and add a new
@Bot
.
Enter the
@Bot
's name and click Add.
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
.
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
.
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
.
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
"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.
Click the Add channel button.
The
@End Channel
selection panel will open.
Select
@Microsoft Teams
.
The
@Project Channel
creation panel will open.
Optionally, enter a title for this
@Project Channel
in the Name field with the placeholder New channel.
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.
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.
To save the
@Project Channel
without activating it, click the CREATE button.
To save and activate the
@Project Channel
, click the CREATE & ACTIVATE button.
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.
Editing and Deleting Agent Channel
To edit an
@Project Channel
, click on its icon on the
@Agent
card.
To edit any field, click the field and enter a new value.
To apply changes to an activated
@Project Channel
, click the APPLY button.
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.
To apply changes to a non-activated
@Project Channel
, click the SAVE button.
To apply changes and activate the
@Project Channel
, click the SAVE & ACTIVATE button.
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.
To delete the
@Project Channel
, click the DELETE button.
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
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
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