Skip to main content

We are implementing the livechat widget on a Single Page Application. This means Freshdesk widget loads on the application deployment once, and never gain.

Because it's using sockets, us being an Single Page Application or not does not matter and it works perfectly.


Now, we'd like to populate the LiveChat fields for logged in users, so users won't have to type them on opening the widget, but our app does not reload the page on when users login, so even we are populating the array FRESHCHAT_VISITORINFO, the LiveChat Widget never receives the updated information, as it has been already loaded, and, as you guys point out, FRESHCHAT_VISITORINFO should have been set before. Fair enough.


My question is: Is there a way to:


  • get LiveChat Widget to RELOAD the updated array FRESHCHAT_VISITORINFO using javascript, but AFTER the Widget has been loaded?
  • Reload the LiveChat Widget from javascript, re-set it completely, forcing it to reload and this time pick up the variable? 
  • A Method to 'talk' to the widget so we can just feed the values? 

Or should I just be more practical and simply populate the fields via javascript?



Hi Marcellino,


In your case, the array can't be loaded on page load as the action never happens in a single page application. We don't have an active API method to talk to the widget to modify some of the values but as you've mentioned in your post, you can use simple JAVASCRIPT call to populate the field values. 


Also,we've built a more powerful,dedicated chat software with SDK capabilities . You can sign up for a trial version here: https://www.freshworks.com/live-chat-software/


Please give it a spin and we're sure it would amaze you ;) 


Cheers!