How to pass values from Start Chat button to Pre-Chat Form
|Knowledge Article Number||000206551|
|Resolution||To achieve this, liveagent.addCustomDetail() function can be used to set the values. On pre chat form page, liveagent.details.preChatInit() function can be used to access those details.
Sample code (Please make sure to test it for all scenarios):
1. This code will be added to the page where you are adding chat button and deployment code
2. Add following code on the pre chat form page
This will allow you to access the details added on first page. Another benefit of this is, these values will also be added to chat transcript to use later