Botframework-solutions: Teams Locale OnBoarding is not sent

Created on 27 Jan 2020  路  6Comments  路  Source: microsoft/botframework-solutions

What project is affected?

Both Skill and VA, but mostly VA

What language is this in?

Typescript

What happens?

I'm using Microsoft Teams as channel, when at first I deploy the manifest in Teams it will run the onBoarding. Unfortunately the first time that Teams calls the Bot it doesn't include the locale (I have for example German as locale on Teams). That means that the onboarding or greetings will be run everytime with the default locale (English in my case).

What are the steps to reproduce this issue?

  1. Deploy the VA locally
  2. Run Ngrok and connect the url to the channel setting in Azure
  3. Run in debug mode your VA
  4. Install the application manifest in Teams with the same applicationId of your ChatBot
  5. In the request there's no locale and so in the context obviously
    Screen Shot 2020-01-27 at 12 51 50
  6. When you do a second interaction with the ChatBot the locale is in the request
    Screen Shot 2020-01-27 at 12 57 34

What were you expecting to happen?

To get the locale the first time I install the Teams app, if this is not possible because of limitation on Teams side (which is the case), manage the OnBoarding differently for Teams channels

Bot Services Bug customer-reported

All 6 comments

Hi @tommyJimmy87! Thanks for reporting the issue!

We will be replicating the scenario and back to you later 馃槉.

@tommyJimmy87 - we successfully reproduced the issue in Typescript and C# as well, using the Microsoft Teams and Emulator as channels.

We will check where it's generated the first locale of the activity and get back to you later.

_C#_

image

_TypeScript_

image

Hi @tommyJimmy87,

We looked further into this issue, realizing this is due to how each channel handles the conversationUpdate activity.

We tested this in the webchat, and the same behavior is present.

With Teams and the WebChat, the activity is sent without the locale which causes the _onBoarding_ to be sent in the default language.
In the Bot Framework Emulator it works because the locale is added to the activity as a property before being sent.

This discrepancy between the Emulator and the Teams channel is known and it's not considered a bug.

We found this recommendation. Please take a look at it and let us know if it works for you.

Hey @VictorGrycuk thanks for the recommendation, but for the use case reported by the original poster (it's the same case that I have), teams is used as a channel, so we can't initiate a client-side request to the server as indicated in the example which works for web-chat but not for teams. I understand that this may not be considered a bug for web-chat, because there is a workaround for it, but we can't seem to find a workaround for this in teams.

Is there any way to get to the user's locale in teams before sending this first message? I know that this sounds a bit minute, but the first message is the first contact that a perspective user has with our bot and having his first message shown in english and then everything else in his language would be directly noticeable by any user.

@darrenj do you have any ideas here, related to how you guys are planning to handle the https://github.com/microsoft/botframework-solutions/issues/2856 issue?

@VictorGrycuk the link given in workaround for the sample in GitHub is not found, can you share any sample.

recommended work around
suggested link in above work around not found

Hi @SSanjeevi, the new link to the sample is 04.api/a.welcome-event.

The BF-WebChat team has reorganized the samples in the PR microsoft/BotFramework-WebChat#2762. Also, the old link is 15.d.backchannel-send-welcome-event.

Feel free to create a new issue in the repository if you have a problem 馃槉.

Was this page helpful?
0 / 5 - 0 ratings