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?