We are trying to develop live agent but not using the pre-chat form at all and we are using deployment API to some extent to transfer some contact information over to salesforce when the chat is initiated. We are also saving the unique id for contact in live chat transcript, the issue is to open a pop up for contact.

  1. How can we identify the session where the live chat transcript is created to open a contact pop up there?

  2. Will a after insert trigger on live chat transcript be useful? to query the contact and open a primary tab?

Below is my live agent button and Deployment code.

<a id="liveagent_button_online_xxxxxxxxxxxxxx" href="javascript://Chat" style="display: none;" onclick="liveagent.startChat('xxxxxxxxxxxxxx')">
 <div id="liveagent_button_offline_xxxxxxxxxxxxxx" style="display:none;">offline</div><script type="text/javascript">
  if (!window._laq) { window._laq = []; }
  window._laq.push(function() {
    liveagent.showWhenOnline('573q00000004CRW', document.getElementById('liveagent_button_online_xxxxxxxxxxxxxx'));
    liveagent.showWhenOffline('573q00000004CRW', document.getElementById('liveagent_button_offline_xxxxxxxxxxxxxx'));
    <script type='text/javascript' src='https://c.la3-c1cs-was.salesforceliveagent.com/content/g/js/38.0/deployment.js'></script>
     <script type='text/javascript'>
     liveagent.init('https://d.la3-c1cs-was.salesforceliveagent.com/chat', 'xxxxxxxxxxxx', 'xxxxxxxxxxx');
     liveagent.addCustomDetail('Firstname', 'Test').saveToTranscript('Name__c');

Name is a custom field on chat transcript to store contact name from deployment api. We will be encrypting the information due to security issues but how do I use the info from a new transcript and open a contact pop up?

  • I tried trigger on chatatranscriptevent and Chatranscript object, but it is useless as these records are created in SF after the chat has ended. Is there any other way I can poop up the contact in the same session as the chat? – apple123 Mar 1 '17 at 16:00
  • I hope someone answers this! – pkamathk Apr 12 '17 at 17:24
  • 1
    @pkamathk I found another way to get it done, I dont have exact code but I can definitely give you instructions on how to achieve it. – apple123 Apr 13 '17 at 13:53
  • Thanks @apple123: I was able to achieve this eventually. Maybe I should be answering my own question. Thanks for the headsup! – pkamathk Aug 2 '17 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.