
@mentions) the bot to initiate interaction in the channel. For direct messaging scenarios, where users can interact with the bot in a one-on-one chat without the need for @mentions, use the Azure Bot Service Endpoint.
Prerequisites
- A Microsoft Teams account with permissions to manage Microsoft Teams and create outgoing webhooks.
Restrictions
- The postback functionality, for example
messageBack, isn’t supported by the Microsoft Teams Endpoint. For postback support, use the Azure Bot Service Endpoint instead.
Generic endpoint settings
Override snapshot connections
If you activate the Override Snapshot Connections toggle, the endpoint overrides the connections in the snapshot with connections from the project. If only the snapshot has a connection, the connection isn’t overridden. If necessary, you need to update such connections manually. To override the connection of the agent in production, you can:- Make the necessary changes in a staging environment, create a snapshot of the same agent, and select the snapshot in the endpoint settings. Deactivate the Override Snapshot Connections toggle.
- Import connections from another agent using a package. Activate the Override Snapshot Connections toggle.
Mocking
In the Advanced Settings section, you can toggle on the Enable Mocking setting to activate mocking for the endpoint. Mocking lets you change node behaviors and test how they perform through the endpoint without changing the original node settings. Make sure that you also activate mocking at the node level.Additional endpoint settings
You can use the following additional settings to customize the endpoint:Endpoint-specific settings
How to set up
1. Configure a Microsoft Teams endpoint
1. Configure a Microsoft Teams endpoint
- In the left-side menu of your Project, click Deploy > Endpoints.
- On the Endpoints page, click + New Endpoint.
- In the New Endpoint section, do the following:
- Select the Microsoft Teams Endpoint type.
- Add a unique name.
- Select a relevant Flow from the list. Save changes.
- Copy the URL from the Endpoint URL field and save it for later use.
2. Create a webhook in Microsoft Teams
2. Create a webhook in Microsoft Teams
- Open Microsoft Teams and find the team where you want to add the bot. To do this, in the Chat panel, go to Microsoft Teams and channels > More Options > Your Microsoft Teams and channels.
- Hover over the team, click the menu next to the team name and select Manage team.
- Access the Apps tab, go to Upload an app > Create an outgoing webhook. If the Create an outgoing webhook option isn’t available, follow the Microsoft Outgoing Webhooks guide to configure your Office 365 tenant.
- In the Create an outgoing webhook window, fill in the following fields:
- Name – enter the name for the webhook. This name will be used as the bot’s name in Microsoft Teams.
- Callback URL – enter the Endpoint URL from your Microsoft Teams Endpoint.
- Description - enter a clear and concise description that explains the bot’s purpose and helps users distinguish it from other bots in Microsoft Teams.
- Click Create to generate the webhook. A pop-up will display a security token. Copy and save it for later use. If the token is lost, you’ll need to create a new webhook.
3. Finish the integration
3. Finish the integration
- In the Cognigy interface, go to the Microsoft Teams Endpoint that you configured previously.
- In the Security Token field, paste the security token that you copied and saved previously. Save changes.
- To test the bot, go to the Microsoft Teams channel related to the team for which the bot was created, mention the bot, for example,
@Bot, to send a message. The message will be routed to your Cognigy Flow. Always mention the bot to ensure that messages are sent to the Flow.
Example
Send a response in the Adaptive Card format
- In the Cognigy interface, create a Flow and add a Say Node.
- In the Node editor, select the Microsoft Teams channel, then Adaptive Card from the Output Type list.
-
In the code editor, enter the following script:
Adaptive Card
- Save changes and go to the channel in Microsoft Teams to call your bot.