microsoft / botframework-sdk

Bot Framework provides the most comprehensive experience for building conversation applications.
MIT License
7.45k stars 2.44k forks source link

Azure botframework integrated with Dynamics customer service Omnichannel generating same user id for different users #6610

Closed nouman937 closed 9 months ago

nouman937 commented 10 months ago

We have integrated Microsoft dynamics Customer service omnichannel with Azure botframework. The bot hosted on Azure and registered as an Agent in Omnichannel application. Omnichannel application is connected with WhatsApp using Twilio

The issue is that one chat initiated with user A from WhatsApp has the same user id for user B although user names are different Below is the snapshot for telemetry logs from Application insights. My understanding is that if these two users are totally different then user ids should be different for each user.

Code TelemetryClient.TrackEvent("ADP:User Id" + turnContext.Activity.From.Id);

TelemetryClient.TrackEvent("ADP:User Name" + turnContext.Activity.From.Name);

User A

User Name:+923454330135

User Id"8:acs:df6c3575-e291-4317-b2ea-917c331ecb4f_00000015-fe0a-ac34-a70b-5748220022b6"

User B

User Name:+923056061475

User Id"8:acs:df6c3575-e291-4317-b2ea-917c331ecb4f_00000015-fe0a-ac34-a70b-5748220022b6"

InfinytRam commented 10 months ago

Thanks @nouman937, I'm looking into this.

InfinytRam commented 9 months ago

Hi @nouman937,

From my understanding turnContext.Activity.From.Id is usually provided by the channel (e.g., Teams, Slack, Direct Line, etc.) through which the user is interacting with the bot. image https://learn.microsoft.com/en-us/azure/bot-service/bot-service-channels-reference?view=azure-bot-service-4.0

To verify, is your issue specific to Omnichannel?

nouman937 commented 9 months ago

Hi @ramfattah Thank you for your response. Yes. This issue is specific to Omnichannel only and I discussed with Microsoft Omnichannel support team too which they confirmed that Omnichannel sends one id for all the users. So, This is omnichannel functionality is in conflict with behavior of bot framework code which expects unique id for each different user.

InfinytRam commented 9 months ago

Thanks for the update @nouman937. Since the issue lies within Omnichannel and not bot framework sdk, it's best to continue engaging with the Omnichannel support team for a resolution.

Feel free to reach out if any further issues arise with the Bot Framework. Closing this now.