Clear Chat History After Page Refresh | Community
Skip to main content

Clear Chat History After Page Refresh

  • February 7, 2022
  • 4 replies
  • 0 views

Pius

How can i clear the chat history when the chat is closed and revisited ?

 

4 replies

Tipene
  • February 14, 2022

Hi @pius

Thanks for reaching out!

Could clarify your use-case in a bit more detail? I.e are you wanting to clear the chat history when the widget is closed, or when the chat session is ended completely?

Look forward to hearing from you! 

Tipene


Pius
  • Author
  • February 14, 2022

Yes thanks for reaching out @tipene

i want to clear the chat or cache when the user session has ended. i.e When the use logs out of the application.

 


Tipene
  • February 16, 2022
Hi Pius,
 
Something like this might be what you're looking for:
 
zE("webWidget:on", "chat:end", () => {
    zE("webWidget", "logout");
});
 
This will clear the user session when the chat has been ended. Here's a couple of links which go in to a bit more detail:
I hope this helps! Feel free to reach out with any questions.
 
Tipene

Iļja12
  • February 22, 2024

@tipene

How can `clear the chat history` in a meaning that new conversation will be new ticket in Zendesk, and not added to the one was closed? 

P.S We use messaging channel, not the live chat API

But, i clound't find functionality for webWidget that exist in Web Widget (Classic) as: 

Chat Rating Good -> zE('webWidget', 'reset');