Pushing data from Pre-chat form to Live Agent console/Querying data in console using Prechat form's value/Saving values directly from Prechat form
|Knowledge Article Number||000159850|
|Description||Customer can perform several operation from Prechat form like Push data to console, Query data in console with a Prechat field value , save directly in chat transcript field|
If customer wants to send any data/value which is on Prechat form to live Agent console so that Agent can see , they just need to add extra parameters in their Page's elements.
Refer the below mentioned syntax to know how to add parameter:
<input type='hidden' name='liveagent.prechat:subject' id='subject' /><br />
Suppose you want to send any value which website Visitor fills in input field, so just need to give name as "liveagent.prechat:subject". This will send the value to console in "Subject" variable.
"liveagent.prechat:subject" : This Syntax will create a console variable and store the value in it so that Agent can see at thier end.
If customer wants to search any data/record in Org on the basis of value entered by Website Visitor. they can use following syntax:
<input type="hidden" name="liveagent.prechat.query:Casenumber" value="Case,Case.Casenumber" />
Here "liveagent.prechat.query:Casenumber" will store the data of input field in "Casenumber" object and tries to search record related to this. This syntax "Case,Case.Casenumber" will let the console know that you need to search that value in which object's field.
"Case,Case.Casenumber": Here First value is for object and second value is for object's field
As soon website visitor, fill all the information and click on start chat, record related to casenumber/value will pop up directly into console , so Agent don't need to find it manually in the Org
If customer wants to save a value to a field of chat transcript object through Pre-chat form , they can do this using the syntax mentioned below:
Email Address: <input type='text' name='liveagent.prechat:Email' /><br />
<input type="hidden" name="liveagent.prechat.save:Email" value="Email__c" />
"liveagent.prechat.save:Email" will pick up the value from above text box and store the value automatically at "email__c" custom field at chat end
value="Email__c" is specifying to which field value should store.
Note : If you want to see the sample code for this you can go to below mentioned link: