We are taking web as channel of the bot and it will be placed on the dashboard page of the Internal portal , where end user has to login with their credentials to enter into the Internal portal. After login user can access the bot, but the authentication of user is not required as user already been authenticated. How can we get the use session details in this case ? So that when the user opens the bot , The bot should welcome with the username of the person who has logged in (Internal Portal) . Please assist me how this can be achieved .
Note : We have developed the bot as Enterprise bot. And developed the widget using web-sdk.
@dushyantk2 Enterprise bots needs explicit assignment of tasks to the employees accessing the bot. If the bot is already assigned to all users of the enterprise, then the bot validates the user connecting to the bot based on the user identity passed as part of webSDK.
So in your case, the developer needs to pass the email id of the user as user identity in the index.html file of webSDK and bot works based on the assignment of tasks to the user specified in webSDK.
If you were to show the welcome msg to the user when the chatbot is invoked, configure the onconnect/welcome events on bot builder. The user details will be part of UserContext and BotUserSession. You could even pass customData to the bot in case webSDK which can be accessed via the BotUserSession.
Please refer to the below topics for more details on using the customData:
Thanks for the assist. One thing which i am quite not clear " the developer needs to pass the email id of the user as user identity in the index.html file " .
Currently, i have hardcoded this with my email. How this needs to be passed dynamically into index.html file ?
@dushyantk2 If you have the email id of the users logged in to the internal portal, pass the same as user identity at webSDK instead of hardcoding in the index.html file.
Since i have the bot inside the internal portal. How will i get the email ID from the internal portal. Could you please suggest some steps to extract out the email id from the internal portal.( I mean through session details).
Since single sign on is enabled , will that help us out to get the email id and pass the same to index.html of chatbot
Could you please help me with the above points. If you have any suggestion . Please let us know.