• James Boutel 10
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Hi everyone,

I have implemented Live Agent but mapping custom details to the Lead object fields doesn't seem to be working.
When I accept a chat it displays the "Details" tab with all the custom details on it. Then it opens a Lead tab asking me to select the Record type. After doing that it presents me with a "New Lead" page - but all the fields are blank.. none of them have been populated with the custom detail values.

Any help is greatly appreciated!
Code Below:- 
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Untitled</title>
</head>
<body>

<img id="liveagent_button_online_5733E0000008Of4" style="display: none; border: 0px none; cursor: pointer" onclick="liveagent.startChat('5733E0000008Of4')" src="https://livechat-jbrcapital.cs82.force.com/chattest/resource/1476268469000/OnlineButton" />
<img id="liveagent_button_offline_5733E0000008Of4" style="display: none; border: 0px none; " src="https://livechat-jbrcapital.cs82.force.com/chattest/resource/1476268469000/OfflineButton" />
<script type="text/javascript">
if (!window._laq) { window._laq = []; }
window._laq.push(function(){liveagent.showWhenOnline('5733E0000008Of4', document.getElementById('liveagent_button_online_5733E0000008Of4'));
liveagent.showWhenOffline('5733E0000008Of4', document.getElementById('liveagent_button_offline_5733E0000008Of4'));
});</script>


<script type='text/javascript' src='https://c.la1-c2cs-frf.salesforceliveagent.com/content/g/js/37.0/deployment.js'></script>
<script type='text/javascript'>
liveagent.addCustomDetail("Campaign_ID", "XXXX");
liveagent.addCustomDetail("RecordTypeDetail", "End user prospects");
liveagent.addCustomDetail("enquiry_method", "XXXX");
liveagent.addCustomDetail("member_status", "XXXX");
liveagent.addCustomDetail("traffic_source_original", "XXXX");
liveagent.addCustomDetail("channel_original", "XXXX");
liveagent.addCustomDetail("sub_channel_original", "XXXX");
liveagent.addCustomDetail("traffic_source_session", "XXXX");;
liveagent.addCustomDetail("channel_session", "XXXX");
liveagent.addCustomDetail("sub_channel_session", "XXXX");
liveagent.addCustomDetail("arrived_from_url", "XXXX");
liveagent.addCustomDetail("arrived_from_session", "XXXX");
liveagent.addCustomDetail("gclid_original", "XXXX");
liveagent.addCustomDetail("gclid_session", "XXXX");
liveagent.addCustomDetail("date_enquiry", "XXXX");
liveagent.addCustomDetail("date_original", "XXXX");
liveagent.addCustomDetail("landing_page_session", "XXXX");
liveagent.addCustomDetail("landing_page_original", "XXXX");
liveagent.addCustomDetail("named_referrer", "XXXX");

liveagent.findOrCreate("Lead").map("Campaign", "Campaign_ID", false,false,true)
.map("RecordType", "RecordTypeDetail", false,false,true)
.map("Enquiry_Method__c", "enquiry_method", false,false,true)
.map("Status", "member_status", false,false,true)
.map("trafficSourceForOriginalVisit__c", "traffic_source_original", false,false,true)
.map("campaignDetailsForOriginalVisit__c", "channel_original", false,false,true)
.map("Sub_Channel_Original__c", "sub_channel_original", false,false,true)
.map("trafficSourceForEnquiryVisit__c", "traffic_source_session", false,false,true)
.map("campaignDetailsForEnquiryVisit__c", "channel_session", false,false,true)
.map("Sub_Channel_Enquiry__c", "sub_channel_session", false, false, true)
.map("arrivedFromURL__c", "arrived_from_url", false,false,true)
.map("Arrived_from_URL_Session__c", "arrived_from_session", false,false,true)
.map("gclid_original__c", "gclid_original", false,false,true)
.map("gclid_session__c", "gclid_session", false,false,true)
.map("dateOfEnquiryVisit__c", "date_enquiry", false,false,true)
.map("dateOfOriginalVisit__c", "date_original", false,false,true)
.map("Landing_Page_Session__c", "landing_page_session", false,false,true)
.map("Landing_Page_Original__c", "landing_page_original", false,false,true)
.map("namedReferrer__c", "named_referrer", false,false,true).saveToTranscript("LeadId").showOnCreate();

liveagent.init('https://d.la1-c2cs-frf.salesforceliveagent.com/chat', '5723E0000008Odc', '00D3E0000008qBC');
</script>
			
</body>
</html>

 
Hi everyone!

I've been doing a lot of basic config in a Salesforce Professional Edition Sandbox, now I need to deploy this config to the Production org. Normally I would do this through change sets, but I've just realised Professional Edition doesn't have access to change sets. I am also aware that Professional Edtion orgs don't have access to Metadata API, so I cannot use the Force.com migration tool or Eclipse. How else can I deploy into Production??

Any suggestions would be greatly appreciated!

Thanks.
Hi everyone!

I've been doing a lot of basic config in a Salesforce Professional Edition Sandbox, now I need to deploy this config to the Production org. Normally I would do this through change sets, but I've just realised Professional Edition doesn't have access to change sets. I am also aware that Professional Edtion orgs don't have access to Metadata API, so I cannot use the Force.com migration tool or Eclipse. How else can I deploy into Production??

Any suggestions would be greatly appreciated!

Thanks.
I am trying to create a new lead record when a new chat is initiated after filling in a pre-chat form.
My probleme is that instead of opening a new lead tab with the information filled in by the user, I get a "Select Lead Record Type" tab where the agent has to select the record type for the lead. Once they select the recordtype the lead has none of the information provided.
I can't have a default recordType set since the recordType is going to be definied by user input.
I have seen many questions regarding this issue but none have a working solution.

Here is the visualforce pre-chat form I have:

<form method='post' id='prechatForm'> 
      <label for="liveagent.prechat:FirstNameDetail">First Name:</label>
          <input type='text' name='liveagent.prechat:FirstNameDetail' required='true' /><br />
      <label for="liveagent.prechat:LastNameDetail">Last Name:</label>
          <input type='text' name='liveagent.prechat:LastNameDetail' required='true' /><br />
      <label for="liveagent.prechat:EmailDetail">Email Address:</label>
          <input type='email' name='liveagent.prechat:EmailDetail' required='true' /><br />
      <label for="liveagent.prechat:provider">Are you a provider?:</label>
          <input type="radio" name="liveagent.prechat:provider" value="yes" required='true'/> Yes
          <input type="radio" name="liveagent.prechat:provider" value="no" required='true'/> No
      <div id="zipfield" style="display: none;">
          <label for="liveagent.prechat:ZipDetail">Zip code:</label> <input type='text' name='liveagent.prechat:ZipDetail'/>
      </div>
      
      <input type="hidden" name="liveagent.prechat:leadStatus" value="Open" />
      <input type="hidden" name="liveagent.prechat:Company" value="none" />
      <input type="hidden" name="liveagent.prechat:RecordType" value="01260000000YLBs" />

      <!-- Map input to lead fields -->
      <input type="hidden" name="liveagent.prechat.findorcreate.map:lead"
        value="FirstName,FirstNameDetail;LastName,LastNameDetail;Company,Company;Email,EmailDetail;Status,leadStatus;RecordType,RecordType" />


      <!-- Try to find the Lead by email (exact match) -->
      <input type="hidden" name="liveagent.prechat.findorcreate.map.doFind:Lead"
        value="Email,true" />
      <input type="hidden" name="liveagent.prechat.findorcreate.map.isExactMatch:Lead"
        value="Email,true;" />


      <!-- If the Lead is not found, then create one with the following fields set -->
      <input type="hidden" name="liveagent.prechat.findorcreate.map.doCreate:Lead"
        value="FirstName,true;LastName,true;Email,true;Company,true;Status,true;RecordType,true" />
 

      <!-- If a new Lead record has been created, open it as a subtab -->
      <input type="hidden" name="liveagent.prechat.findorcreate.showOnCreate:Lead"
        value="true" />
        
      <!-- displayToAgent: Hides the lead record type from the agent -->
      <input type="hidden" name="liveagent.prechat.findorcreate.displayToAgent:RecordType" value="false" />

      <!-- Save the Lead id to transcript's field ContactId -->
      <input type="hidden" name="liveagent.prechat.findorcreate.saveToTranscript:Lead"
        value="LeadId" />

     <input type= "hidden" name= "liveagent.prechat.findorcreate.displayToAgent: String detailName" value= "Boolean display" />
      <div id="submit">  
          <input type='submit' value='Request Chat' id='prechat_submit'/>
      </div>
</form>