+ Start a Discussion
Jonny SimmoJonny Simmo 

Can you save a custom value to the Live Agent Transcript object?


Is it possible to save a custom value from within the Live Agent chat to the Transcript object?

I can add a new field to the Transcript object. But how would I save a value to it during the chat so it is included when the Transcript record is created after the chat?

 
Best Answer chosen by Jonny Simmo
Jonny SimmoJonny Simmo

Sorry to answer my own question but I figured if anybody else has this issue they would like to know how I resolved it.

Firstly I add a new field to the Live Agent Transcript object. This field was called Customer_Email__c.

Then within my pre-chat form I created a new prechat value called custemail, I have hardcoded the value in this example but you can obviously set the value to what you like.
You then use the last line here to set the value of custemail to the new fiels on the Transcript object.

<!-- Save the Email Address to the Transcript record -->
<input type="text" name="liveagent.prechat:custemail" id="prechat_custemail" value="dummy@emailvalue.co.uk"/>
<input type="hidden" name="liveagent.prechat.save:custemail" value="Customer_Email__c" />
 

All Answers

Jonny SimmoJonny Simmo

Sorry to answer my own question but I figured if anybody else has this issue they would like to know how I resolved it.

Firstly I add a new field to the Live Agent Transcript object. This field was called Customer_Email__c.

Then within my pre-chat form I created a new prechat value called custemail, I have hardcoded the value in this example but you can obviously set the value to what you like.
You then use the last line here to set the value of custemail to the new fiels on the Transcript object.

<!-- Save the Email Address to the Transcript record -->
<input type="text" name="liveagent.prechat:custemail" id="prechat_custemail" value="dummy@emailvalue.co.uk"/>
<input type="hidden" name="liveagent.prechat.save:custemail" value="Customer_Email__c" />
 
This was selected as the best answer
BagyoBagyo
Thanks for the your own answer, its works great.

 <!-- Save the Pre Chat form Data to the Transcript layout record -->
        <input type="hidden" name="liveagent.prechat.save:ContactFirstName" value="Pre_Chat_First_Name__c" />
        <input type="hidden" name="liveagent.prechat.save:ContactLastName" value="Pre_Chat_Last_Name__c" />
        <input type="hidden" name="liveagent.prechat.save:ContactPhone" value="Pre_Chat_Phone__c" />
        <input type="hidden" name="liveagent.prechat.save:ContactEmail" value="Pre_Chat_Email__c" />
t j 5t j 5
Pls tell me what is "ContactFirstName" in  name="liveagent.prechat.save:ContactFirstName". 
ErikNelke1ErikNelke1
@Jonny Simmo - After viewing many other posts, this one had it is a way that actually worked! thank you!

@TJ5 - ContactFirstName is FirstName in the back end. you can see the API name on the object.