• svetrivel1.3964438137403892E12
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Hi,

 

My requirement is to invoke Live Agent web chat from my official website. 

For this sake, I have created a pre-chat page with user information fields and created corresponding Custom Fields in Live Chat Transcript.

But, once the chat got completed with live agent, the updated information values are not stored in the newly created custom fields. 

I have pasted below my Pre-chat form source code for reference.

 

 

 

<apex:page showHeader="false" >

<!-- This script takes the endpoint URL parameter passed from the deployment page and makes

it the action for the form -->

 

 

<script type="text/javascript">

(function() {

function handlePageLoad() {

var endpointMatcher = new RegExp("[\\?\\&]endpoint=([^&#]*)");

document.getElementById('prechatForm').setAttribute('action',

decodeURIComponent(endpointMatcher.exec(document.location.search)[1]));

} if (window.addEventListener) {

window.addEventListener('load', handlePageLoad, false);

} else { window.attachEvent('onload', handlePageLoad, false);

}})();

</script>

 

<form id="prechatForm" method="post">

 

<table align="center" cellspacing="5">

     <tr><td class="labelInput">Nome*:</td><td><input name="liveagent.prechat.name" type="text" maxlength="50" id="prechat_field" style="formTextBox"/></td></tr>

     <tr><td class="labelInput">E-mail*:</td><td> <input name="liveagent.prechat:email" type="text" maxlength="50" id="prechat_email" style="formTextBox"/></td></tr>

      <tr><td class="labelInput">CPF*:</td><td><input name="liveagent.prechat:CPF" type="text" maxlength="14" id="prechat_cpf" style="formTextBox"/></td></tr>

         <tr><td class="labelInput">Telefone*:</td><td><input name="liveagent.prechat:Telefone" type="text" maxlength="15" id="prechat_telefone" style="formTextBox" /></td></tr>

         <tr><td class="labelInput">Assunto:</td>

         <td>

         <select name="liveagent.prechat.Type" style="formComboBox">

            <!-- Values are LiveChatButton IDs. -->

            <option value="Promoções">Promo&#231;&#245;es</option>

            <option value="Reclamações">Reclama&#231;&#245;es</option>

            <option value="Informações">Informa&#231;&#245;es</option>

            <option value="Sugestões">Sugest&#245;es</option>

         </select>

     </td></tr>

     <tr>

     <table cellpadding="0" cellspacing="10" align="center">

     <tr>

         <td width="25%">&nbsp;</td>

         <td> <input type='submit' value='Request Chat' id='prechat_submit' /></td>

      </tr>

</table>

     </tr>

</table>

</tr>

</table>

 

 <!-- Creates an auto-query for a matching Contact record’s Email field based on the

value of the liveagent.prechat:Email field -->

<!--input type="hidden" name="liveagent.prechat.query:Email"

value="Contact,Contact.Email" /-->

<input type="hidden" name="liveagent.prechat.save:name" value="CustomerName__c" />

<input type="hidden" name="liveagent.prechat.save:email" value="customer_Email__c" />

<input type="hidden" name="liveagent.prechat.save:CPF" value="CPF__c" />

<input type="hidden" name="liveagent.prechat.save:Telefone" value="Telephone__c" />

<input type="hidden" name="liveagent.prechat.save:Type" value="Type__c" />

 

</form>

</apex:page>

 

With Regards,

Vetrivel.s