How to show the chat history


(Abhijit Naik) #1

We want to show the chat history of user in chatbot, How can it be achieved ?


(Subrahmanyam Donepudi) #2

Hi @abhijitna, If you were referring to chat history at webSDK channel, this can be configured in the index.html file at chatconfig.

Please refer to the below post for more details:


(Vandana Agarwal) #3

Hi Subrahmanyam,

In my scenario, Bot is showing me welcome message repetitively as history in the chain of multiple welcome messages together if bot get idle for time. I want to restrict it to show only one message till user has not reply anything in the bot window.

How can i achieve that?

link :Screenshot


(Subrahmanyam Donepudi) #4

@vandana.agrawal Could you use the welcome event instead of onconnect event?
The action configured at onconnect event (Can be a message or script) is triggered every time the web socket is connected/ reconnected and this should have been the reason for your to see multiple onconnect messages.

A welcome event message is displayed only once per user per life. So probably for your use case, the welcome event fits better.

The event handlers can be configured at Natural Language > Default conversation> Event handlers on the bot builder


(Vandana Agarwal) #5

Thanks Subrahmanyam

i give try to the answer you suggested.

But in my case, if i select only ‘Welcome Event’ and deselect ‘On Connect’ for the bot it is not going to show ‘Welcome Message’ in the bot window.


(Subrahmanyam Donepudi) #6

Yah, Welcome Event only comes once and so it wouldn’t appear the next time the same user is communicating to the bot.

Is your bot of type consumer and if yes, are you generating a UDID every time user is connecting to web/mobile client?

If Yes, the welcome event should be suffice your requirement. If you pass the same user Identity via the , then maybe I could check out for an alternative


(Vandana Agarwal) #7

Hi Subrahmanyam,

Welcome Event is not appearing even at once for me. Does it appear on receiving first message from the user ?

I want it to appear only once but on connecting the bot for the first time before receiving message from the user.

I could not understand that my bot is of type consumer or not? I have created standard bot from the bot builder. and also don’t know about how it generates UDID .


(Subrahmanyam Donepudi) #8

Yes, the welcome event appears only once per user and when the first message is received from the user

Please try Onconnect event by using the option to run a task and display message by configuring the logic at a script node (at the invoked dialog). Further, add conditions to transition to a message based on the logic at script node.