You are using the deployment API which is different to the tags that must be used in the pre-chat form.
Here is an example on how to create a case with some information pre-populated that will also show in the console for the agent, you can do the same without creating a record, this should give you an idea.
<input type='hidden' name='liveagent.prechat:caseorigin' value='Chat'/>
<input type='hidden' name='liveagent.prechat:caseContactId' value='{!$User.ContactId}'/>
<input type="hidden" name="liveagent.prechat.findorcreate.map:Case" value="Origin,caseorigin;ContactId,caseContactId;" />
<input type="hidden" name="liveagent.prechat.findorcreate.map.doCreate:Case" value="Origin,true;ContactId,true;" />
<input type="hidden" name="liveagent.prechat.findorcreate.saveToTranscript:Case" value="Case" />
<input type="hidden" name="liveagent.prechat.findorcreate.showOnCreate:Case" value="true" />
The section you care about if all you want is to show the details on the console would be this
<input type='hidden' name='liveagent.prechat:caseContactId' value='{!$User.ContactId}'/>
in combination with this value
<input type= "hidden" name= "liveagent.prechat.findorcreate.displayToAgent:caseContactId" value= "true" />
With that, you are assigning a value to a custom chat detail that will be shown to the agent that gets the chat assigned.
You can automatically attach the transcript to a record i.e. a case by using the saveToTranscript method. Depending on wheter you are using the pre-chat API or deployment API all you have to do is follow the instructions on the developer guide to automatically related the transcript to the case.
findOrCreate.saveToTranscript
Syntax
<input type="hidden" name= "liveagent.prechat.findorcreate.saveToTranscript: String
entityName" value= "String transcriptFieldName" />
Best Answer
It is possible to do this using prechat.save
where Request_Type__c is custom field on Live Chat transcript object. This is not documented in the developer guide but discussed below, https://help.salesforce.com/articleView?id=000159850&language=en_US&type=1