I am setting up a Live Agent for my customer and I am very new to Salesforce. I able to setup a chat button upon clicking it will launch chat window.
Now I wanted to have pre-chat window, I search all online found that sample is in Apex Visualforce page but my customer wanted to embed this Live Agent in their website.
So can anyone guide me how to do this live agent pre-chat form in HTML? So that I could embed it in my customer website.
Best Answer
You should be able to follow the steps in the Live Agent's Developers Guide and the Service Cloud Workbook's section on Live Agent for the main steps and various configurations of Live Agent. For specifically setting up a Pre-Chat form on an external site vs. on a Force.com Site page, there is not much of a difference. I've supplied sample code and other considerations, specific for configuring it for a non Force.com site.
Here is the code from the Live Agent Developer's Guide for the Pre-Chat Form with modifications to remove Visualforce functionality.
Here is the code that combines the Deployment and Button Configuration with modifications to remove Visualforce functionality (I swapped out IDs with XXXXXXs). I apologize for the formatting as it is mostly a copy and paste of the SFDC generated button and deployment code. The thing to make sure you do is supply some sort of text or something in the online and offline links so that something can be clicked.
Some other considerations / reminders:
I have all of this code set up in a Developer Edition and working on an external (non SFDC) site that I use for playing around, so I can vouch for it.