function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
hylim12hylim12 

How can I get Live Agent Pre-chat form in HTML to my website?

Hi i have a website and would like implement Salesfoce live chat into it.

 

I have configured everything and able to click a button and chat window will prompt.

 

now i wanted the vistor to enter their email & phone before starting the chat so our agent will able to see thier profile. i found the sample code online is using apex. will it possible to be put in HTML?

 

this is button code.

 

<img id="liveagent_button_online_57390000000PN1b" style="display: none; border: 0px none; cursor: pointer" onclick="liveagent.startChat('57390000000PN1b')" src="https://testitapps.force.com/support/resource/1381204692000/pkb_search_icon" /><img id="liveagent_button_offline_57390000000PN1b" style="display: none; border: 0px none; " src="https://testitapps.force.com/support/resource/1381204692000/pkb_close_icon" />
<script type="text/javascript">
if (!window._laq) { window._laq = []; }
window._laq.push(function(){liveagent.showWhenOnline('57390000000PN1b', document.getElementById('liveagent_button_online_57390000000PN1b'));
liveagent.showWhenOffline('57390000000PN1b', document.getElementById('liveagent_button_offline_57390000000PN1b'));
});</script>


<script type='text/javascript' src='https://c.la1t1.salesforceliveagent.com/content/g/js/29.0/deployment.js'></script>
<script type='text/javascript'>
liveagent.init('https://d.la1t1.salesforceliveagent.com/chat', '57290000000PMpr', '00D90000000nI1C');
</script>

 thanks

sunny522sunny522
Hi hylim12,
  Go through the link below
http://salesforce.stackexchange.com/questions/21547/how-to-setup-pre-chat-form-in-html-to-embed-in-customer-website.

if u face issues again let me know


Ariel ReemAriel Reem

Hi sunny522  Thanks for the link.

I'm still having a problem though.  When posting my own prechat-html page as a

liveagent.init('http://dev.casinocruise.com/sites/all/modules/casino_cruise_salesforce/test2.html', 'XXX', 'XXX');
It throws a 404 error.

Any thoughts..?

Anil JAdhav 14Anil JAdhav 14
Hi hylim12,

Here is the perfect solution for your query.
You can use this - http://learnsforce.blogspot.in/2017/06/creating-account-and-case-with-live.html

regards,
Anil