Skip to main content

Microsoft Teams

Microsoft Teams (MS Teams) is a collaboration platform that provides a digital workspace for various teams within the organisation to communicate and work together. The team members can have conversations, share files, images, video, audio, and schedule meetings. It includes chat, video meetings, file storage, and application integration to provide a secure, collaborative environment for teams to work together.

MS Teams channel integration helps businesses to automate customer support, send campaigns, and collect user feedback.

This channel enables the following key features:

  • Automated Replies: Provides the ability to automatically respond to user messages.
  • Multi-message type support: You can use various message types that are supported by the platform to enhance the communication experience.

Setting up MS Teams on Yellow.ai platform

To set up MS Teams

Prerequisite

To set up MS Teams chatbot, create a MS Teams account.

Set up MS Teams chatbot using Developer portal

To set up MS teams using Developer portal, follow these steps:

Create a bot on MS Teams

  1. Open MS Teams.

  2. Navigate to Apps and search for Developer Portal.

  3. Open Developer Portal.

  4. Navigate to Tools > Bot Management.

  5. Click + New Bot to set up a bot.

  6. Enter the bot's name and click Add.

  7. Click Configure to establish a messaging endpoint.

  8. Enter the URL as per your region (to deploy the bot) and click Save to save your settings.

note
  • You can input your preferred profile ID name in the URL provided below, specific to your region. Ensure that you specify the same profile ID when connecting the MS Teams bot to the Yellow.ai platform.
  • To establish a secure connection with the bot and enable interaction, it is essential to enter a valid endpoint URL.
Region CodeRegionURL
R0Indiahttps://r0.cloud.yellow.ai/integrations/botframework/${botId}?profileId=${profileId}
R1MEA-UAE Northhttps://r1.cloud.yellow.ai/integrations/botframework/${botId}?profileId=${profileId}
R2Jakartahttps://r2.cloud.yellow.ai/integrations/botframework/${botId}?profileId=${profileId}
R3Singaporehttps://r3.cloud.yellow.ai/integrations/botframework/${botId}?profileId=${profileId}
R4USAhttps://r4.cloud.yellow.ai/integrations/botframework/${botId}?profileId=${profileId}
R5Europehttps://r5.cloud.yellow.ai/integrations/botframework/${botId}?profileId=${profileId}

  1. Go to Client secrets and click Add a client secret for your bot.

  2. Copy the Client secret and save it for future reference.

  3. Go to Developer portal > Tools > Bot management and copy the Bot ID. This is required to connect MS Teams app to Yellow.ai platform.

Create an app on MS Teams

You need to create an app in MS Teams and connect your bot.

  1. Navigate to Apps to create a + New app. Click + New app.

  2. Enter a name for the app.

  1. Enter the following details that are required for your app and click Save to save your settings:
OptionDescription
Short NameEnter a name (30 characters or less) for your bot app.
Full NameEnter a full name (up to 100 characters) for your bot app. It can be the same as the short name. This is optional.
App IDThis is the unique identifier generated by Microsoft for your app.
Short DescriptionEnter a brief description (80 characters or less) for your bot app.
Long DescriptionEnter a detailed description (80 characters or less) for your bot app.
VersionEnter the version number as 1.0.0 (for developer reference).
Developer or Company NameEnter your organization's name.
WebsiteEnter your website URL (HTTPS only).
Privacy PolicyAdd the link of your website's privacy policy.
Terms of useAdd the link of your website's terms of use.
Application (client) IDPaste the bot ID (client ID), which you have copied earlier (as mentioned in the Step 11 of Create a bot on MS Teams section).
Microsoft Partner Network IDIf you are part of the Microsoft Partner Network, specify your MPN ID. For more information, refer to this link.
drawing
  1. Navigate to Branding under Configure to change the available branding options.

  2. Navigate to App Features under Configure and select Bot.

  3. Select your bot name from the drop-down.

  4. If you want to enable file sharing, enable the Upload and download files check box.

  5. Select Personal under the scope.

  6. Click Save at the bottom.

Publish App on MS Teams

  1. To publish the app, navigate to Publish > App package.

  2. Click Publish your app and select an option based on your enterprise policy.

  1. Click Download the app package. The file will be downloaded to your local folder.

    drawing
  1. Go to https://admin.teams.microsoft.com.

  2. Navigate to Teams Apps > Manage Apps > Upload new app.

  3. Select the downloaded file from your local folder and click Upload.

    drawing
  • A new app will be added to your apps list.

    drawing

Add app to MS Teams workspace

  1. Go back to MS Teams.

  2. Search the App under Apps.

  3. Click Add to start a conversation with the bot.

Set permission on Azure portal

After adding app to MS Teams workspace, you need to set permissions on the Azure portal to execute certain use cases based on the business requirements. Follow these steps:

  1. Login to https://portal.azure.com.

  2. Navigate to App Registration.

  3. Click on the app created with the same name as your MS Teams bot.

  4. Click Authentication > select Multitenant > Click Save.

  5. Click Add a Platform > Web.

  6. Navigate to API Permissions > Add Permission > Microsoft Graph.

  7. To enable app permissions, select the desired permission type and click Add permissions.

    • Application Permissions: This enables the app to use the services without any user’s authorization. The app work with its credentials.

    • Delegated Permissions: This requires users to authorize the app to work on their behalf. Once approved, the app contains the privileges of authorising users for the defined scope. For more detailed information regarding permissions, click here.

Connect MS Teams app to the Yellow.ai platform

  1. On the switcher click Channels > Microsoft Teams.

  2. Copy the Profile ID based on the region where you want to deploy the bot, as mentioned in step 8 of Create a bot on MS Teams.

  3. Copy the Client Secret as mentioned in step 10 of Create a bot on MS Teams.

  4. Copy the Bot ID as mentioned in step 11 of Create a bot on MS Teams paste it under Client ID.

  • Now you are ready to use MS Team with Yellow.ai bot.

Test MS Teams chatbot

Once you have created an app and connected it to the Yellow.AI platform, you need to test the bot to verify whether the bot is able to respond to user messages on MS Teams app.

To test your bot on MS Teams, follow these steps:

  1. Open the MS Teams app on your mobile device or on website.

  2. Navigate to Apps and search for the app name under Apps. Select the app that you have created and click Open.

  3. Go to Chats and start the conversation with the bot. Make sure you have already created an intent and added the utterances to trigger the corresponding flow in your MS Teams chatbot.

  4. If a flow is configured for agent reply using the raise ticket node to start a conversation with an agent, it initiates a conversation with the agent. Once a conversation is initiated, the user can talk to the agent.

  5. To view the entire conversation between the live agent and user, navigate to the Inbox module in the platform and select Bot messages in the My Chats section.

When the conversation between the agent and user ends, the bot takes the conversation forward with the user.

MS Teams user data syncing in User 360/Engage

To sync users in MS Teams, follow these steps:

  1. Copy the existing MS teams credentials from the Channels page.

  2. Disconnect MS Teams.

  3. Use the below API to reconnect Teams. Before calling the API, ensure to update parameters such as BOT_ID, API_KEY, PROFILE_NAME, CLIENT_ID, CLIENT_SECRET, and TENANT_ID with the appropriate values.

curl --location 'https://cloud.yellow.ai/api/data/vault/botframeworkTokens?bot=BOT_ID' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-api-key: API_KEY' \
--data '{
"profileId": "PROFILE_NAME",
"clientId": "CLIENT_ID",
"clientSecret": "CLIENT_SECRET",
"tenantId":"TENANT_ID"
}
  • Verify if the custom properties (teamsConversationId, countryName, jobTitle, officeLocation) are added in your Customer Data Platform (CDP). If any of these properties are missing, manually add them to the user properties.
  1. Execute the below curl command, replacing the placeholders with your specific values such as botId, x-api-key, and profileName. Note that 'Profile name' refers to the name configured on the Channel's page during MS Teams setup.
curl --location 'https://cloud.yellow.ai/api/integrations-worker/integrationCDPUserSync/bulkUserCreate/botframework/yellow_alpha6?botId=x1632218421575&isChannel=true' \ --header 'x-api-key: 67dYPpyWiGXjppnWMHLJQJB6sWsitkWwg0FjCqQY' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer sddd' \ --data '{ "profileName": "yellow_alpha6" }'