October 10, 2020

How to save the custom detail to a custom field on Chat Transcript object(LiveChatTranscript) in Salesforce?

Chat Transcript object have several standard fields. For Example, Chat Button in Chat Transcript object stores the chat button id that the visitor clicked to initiate the chat.
Reference Link:

To save the custom detail to a custom field on LiveChatTranscript at the end of a chat, use the below

liveagent.addCustomDetail( 'Company', 'Acme' ).saveToTranscript( 'Company__c' );
Here Company__c is a custom field in Chat Transcript Object.

Sample Code:
<script type='text/javascript'>
var test = liveagent.addCustomDetail( 'Example', 'Example Value' ).saveToTranscript( 'Source__c' );

No comments:

Post a Comment