+ Start a Discussion
Deepak G 9Deepak G 9 

how to implement Pre-chat form URL in chat button

Hi All, 
I have a requirement to implement 
Pre-Chat Form URL. They have provided me an URL, Any idea?

AbhishekAbhishek (Salesforce Developers) 
Hi Deepak,

Two things we need to remember while using the pre-chat form:

1. If you are hosting a Chat button on your site, you cannot use Vf pages as a pre-chat form.
You need to create a pre-chat form on your site and host it and give its direct Url in the chat button configuration

Where: Go to Chat buttons || Write direct URL of your page in "pre-chat Form URL"

After configuring this, Your Chat button (hosted on your site) will open pre-chat form (hosted on our site.)

2. The second way, You can host a Chat button on Force.com Site. Now you can choose VF pages as Pre chat form.

Where: Go to Chat buttons || select your Vf page in the "Pre-chat form" field.

After configuring, You chat button (Hosted on Force.com SIte) will pop up Pre chat form (VF page hosted on Force.com)

Note: Chat button hosted on Force.com Site means a VF page having Chat button code and deployment code in it.

How to configure Force.com Sites?

Go to develop || Sites and create on the new button.

Configure your settings(Name, label, default web address, active site home page).

Inactive Site home page, you need to give your chat button VF page

Please refer below mentioned documentation to know more about sites:

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.