+ Start a Discussion
Jeff Hutchinson 17Jeff Hutchinson 17 

How to customize pre-chat form for snap-in chat

Is it possible to create a custom pre-chat form for snap-ins chat without using Lightning Components, Aura Components, or Visualforce? Ideally, this would be done in HTML similar to how the pre-chat is customized using liveagent.prechat methods similar to the following.
First Name: <input type="text" name="liveagent.prechat:firstName" id='firstName' /><br /> 
Last Name: <input type="text" name="liveagent.prechat:lastName" /><br />
Email Address: <input type="text" name="liveagent.prechat:leadEmail" /><br />
While HTML is ideal, examples for any of the above methods would be appreciated. 
Raj VakatiRaj Vakati
You can customize the pre-chat form without code also 

Please refer this link 


https://help.salesforce.com/articleView?id=snapins_chat_customize_prechat_form.htm&type=5

with code  please refer this link 

https://rajvakati.com/2018/11/13/lightning-custom-pre-chat-component-using-javascript/

 
Jeff Hutchinson 17Jeff Hutchinson 17
Thank you Raj. I was aware of the first link. Unfortunately, it seems to limit you on what records you can search and/or create. I need to create both leads and cases, which is not an option there. The second link seems very informative and I will be looking at it in more detail. I noticed it uses lightning components rather than HTML. Are you aware of any HTML solutions?
Raj VakatiRaj Vakati
My vote goes to lightning component rather than HTML .. let me know if you are looking HTML approach 
Jeff Hutchinson 17Jeff Hutchinson 17
Ultimately, we would prefer to use snap-ins because it appears to offer a better user experience but one of the requirements for the project is the ability to create both leads and cases based on the pre-chat form. Snap-ins does not appear to be able to do that, but I wanted to be sure, which is the reason for my question.

Why do you prefer lightning components to HTML? I felt HTML would be a better approach because the button, pre-chat, and chat need to have design elements added by our web developers to match the theme of the company website. (It's not being hosted in a salesforce community.) I thought could be done easier in HTML. That said, we are not committed to HTML and are open to any solution that meets the requirements and offers a good user experience.
Varun SuraganiVarun Suragani
Hi Jeff and Raj,

Can we customize pre-chat window? we can to reply with custom CSS from our website.
If you have any sample pre chat form please provde it to me. or please send us the link Raj