Create a bot using Bot Framework Composer and that I integrate with qnA Maker works without any problem, but when integrating it into my website every time I update the page, or perform certain actions, the bot runs the greeting again, how can I validate that my Bot only say hello once, and when refresh the page or perform other options only show me the conversation history without saying hello again?

Web chat- Javascript

 <script>
 
            var ctoken ='xxxxxx';
            var cconversationId ='xxxxx';
            window.WebChat.renderWebChat({
                directLine: window.WebChat.createDirectLine({
                    token: ctoken,
                    conversationId : cconversationId, 
                    watermark: 10
                }),
            styleOptions: {
                hideUploadButton: true
            }
            }, document.getElementById('webchat'));
            document.querySelector('#webchat>*').focus();
</script>
1

There are 1 answers

0
Sanjeevi Subramani On

You should create the conversation id token on the first time of bot load and store that conversation id somewhere and generate token for the same conversation id with same user details, so that it will load the same conversation history second time you load page which contains the webchat.