Clear Chat History After Page Refresh

5 Comments

  • 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
  • Pius John

    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
  • 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
  • Tatiana Christensen

    How is the chat ended exactly?

    0
  • Ilja Cvetkovs

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

     

    1

Please sign in to leave a comment.

Powered by Zendesk