How to use context session in Welcome Message

Hi swathi, Welcome message option not appearing in my settings page. Please give me the solution.IMG-20181124-WA0010

@rajinisiva93 Welcome message is now under Extensions - Events. With new release(6.3) in place, we have made changes to our BOT kit. You can learn about our release highlights here https://developer.kore.ai/docs/bots/whats-new-in-this-release-bot-builder/

Thanks
Swathi

1 Like

Hi Swathi,

I tried this way but why its not showing the welcome message in chat box

@chenchukishore.thath Welcome event only gets triggered the first time user sends the message. The consecutive conversations wouldn’t have the event triggered to the user.

Also, if in case you requirement is to show message when user is connected, then you could use the On connect event. Else if, the requirement is to send welcome message on first message from user, welcome event can be configured.

In case, both welcome event and on connect event are configured, then for websdk as a channel, the on connect event would take precedence.

1 Like

Okay thanks I will try that as well. One more thing like is there any way we could clear the chat bot history?

@chenchukishore.thath You could configure the chat history to load or not load at webSDK channel. In the index.html file at the variable chatConfig, you should see the parameter “loadHistory”. On setting it to “false” , the chatHistory wouldn’t be loaded to the user.
image

Hey! really thanks man that "on connect " thing worked. I will check this as well.

Could you please tell me from where I will get this index.html file I’m not able to find it

@chenchukishore.thath Glad we could help you with the “onconnect” event. You couldn’t disable the chathistory when you are testing the bot on the bot builder itself. If you have configured the webSDK channel which is available at https://github.com/Koredotcom/web-kore-sdk , then you should find it inside the UI folders as shown below:
image

@Subrahmanyam Could you please tell me how can i set context Ssersession in index.html and how do get usersession from welcome event or on connect

Hi @rajinisiva93,
Both the events on connect and welcome have the options to invoke a dialog, run a script or send a message.

Data available in the session context can be utilized in all three ways. The only way you could add some data to the context from webSDK is by adding the needed information in the customData at botinfo of index.html.

The added information should be available under BotUserSession. Detailed steps on how to add the customData and where the data is accessible are mentioned at the below post.

1 Like

Hi @Subrahmanyam
How do show multiple welcome message at a time.
1.Hi
2.i am your assistant.
3.How can i help you.

i want to show separate message at same time.

@rajinisiva93 Please follow below steps to achieve this.

  1. Add a hidden dialog in your bot. Say “Welcome Event”

image
2. Add two message nodes in the dialog as shown below
image
3. Link the welcome event at the extensions of the bot to the above dialog.
image
4. Publish the bot with extensions for making the changes available to end users
5. Run the bot via webSDK as an end user.
image

Thanks @Subrahmanyam Is it possible to show those message without user intraction.

Yes, use the on connect event instead of welcome event.

The rest of the configuration should mostly be the same.

Thanks a lot @Subrahmanyam its working.

hi @Subrahmanyam how can i change the bot icon and color in websdk. i am useing latest version of kore.ai

Hello @Subrahmanyam kindly solve the above problem.

Hi @rajinisiva93, You could change the bot icon from the bot settings as shown in the below snip.

image
If you need to change other configurations like color etc of the chat window, you will need to modify the supporting CSS files of webSDK.

Also, could you please raise your queries as different topics? If you raise questions in unrelated topics, they might deviate and confuse other developers from the main thread.

@Subrahmanyam

I created a hidden task for the Welcome message. There, I asked for the user´s name with the answer “Hello USER, how can I help you?” but I´m getting a message that there´s a loop limit for the node where I ask the name. Didn´t unserstand why.