Conversations API - resetting the chatflow on page reload or closed conversation

Regular Contributor | Diamond Partner

I am attempting to to make use of the conversations API on this HubSpot page:


I am loading a JS file in which contains some Conversations API logic:


Essentially I am trying to ensure that the chatbot is completely cleared and refreshed upon page load and when the user closes the chat.  I feel like the code I have written in the above file should do this according to the Conversations API documentation.  However I am finding two problems:


  1. The conversation history is kept on page load (though if I refresh the page more than once, then the conversation history does dissappeear)
  2. The conversationClosed event never seems to fire.  (I am assuming it should fire when a user clicks the X to close the chat window).

Please could someone provide some advice?


2 Replies 2
Community Manager

Hey @rowan-reid 


I will tag a few of our experts Emoticono feliz     


Hey @himanshurauthan @sanka could you please share your knowledge with @rowan-reid   ?


Thank you


¿Sabías que la Comunidad está disponible en Español?
¡Participa hoy en conversaciones en el idioma de tu preferencia,cambiando el idioma en tus configuraciones!

Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !

Occasional Contributor | Partner

I'm sorry couldn't help you here as i'm tied up.