Recent searches


No recent searches

Clear Chat History After Page Refresh



Posted Feb 07, 2022

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

 


0

4

4 comments

image avatar

Tipene Hughes

Zendesk Developer Advocacy

Hi Pius John

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

0


Yes thanks for reaching out Tipene Hughes

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

 

0


image avatar

Tipene Hughes

Zendesk Developer Advocacy

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

0


Tipene Hughes

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');

 

2


Please sign in to leave a comment.

Didn't find what you're looking for?

New post