4

I want pass some custom details filled on html page to pre chat form by live agent addCustomDetails method. This should be written before iveagent.init method otherwise it gives error: Uncaught Error: You cannot add a detail after page initialization.

Can anyone help on this.

3
  • What details do you want to pass? From where are you taking those details? Are you using a controller on the pre-chat form? There are different ways of doing this so it would be better if you share the code you have created. – PepeFloyd May 18 '15 at 10:22
  • <script type='text/javascript' src='c.la3-c2cs-chi.salesforceliveagent.com/content/g/js/33.0/…> <script type='text/javascript'> liveagent.addCustomDetail('email','pankaj8261@gmail.com'); liveagent.addCustomDetail('name', 'pankaj'); liveagent.init('d.la3-c2cs-chi.salesforceliveagent.com/chat', '5721900000029', '00D19000000FF1xA'); </script> Now I want to add those details in javascript method on clickof button . – gangparia May 19 '15 at 6:21
  • It's an old question, but I would still like an answer if anybody knows. Our use-case is to send what page the user is on while using single-page app. It could also be something that would change based on what user have done while on the given page and then click on Live Agent chat icon – Sherzod Sep 30 '16 at 18:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.