After logging in to our website, is it required for the user to log in again into the chatbot while initiating a conversation?
Subrahmanyam
(Subrahmanyam Donepudi)
February 19, 2019, 11:50am
2
No, the users need not have to login again.
In the webSDK, developer could configure the index.html to pass to customData along with botinfo which will be available under BotUserSession. If the services used at chatbot, need any information of the user to hit the endpoint, developer could configure the service request to take user information from customData passed from webSDK.
Below is an example to demonstrate on how to use the customData from webSDK at fields of Simple Task.
We are setting up a webService alert which would send notifications to the user based on Category (available at the customData present in web SDK).
Follow the below syntax to add customData to web SDK at index.html.
botOptions.botInfo={
name: "Ambiguous choice",
"_id": "st-108853be-d963-5d46-ac33-08a19f2fbfd2",
customData: {
"category": "rssfeedstopstories"
}
};
Now create a webser…
Adding custom data at botInfo inside index.html of webSDK allows developers to pass additional information of the user accessing the channel.
The details like phone number, address or even the access token if in case the webSDK is hosted on the site which needs authorization are examples of data which can be passed inside the customData .
[image]
customData can be accessed from lastMessage under the BotUserSession of the context object.
This data will be specific to the user using webSDK and…