Capture CANDDi data direct to Salesforce (Web-to-Lead)

Follow

Summary

Salesforce Web-to-Lead is an excellent way to integrate capture enquiries from your website direcly into CANDDi.  (See https://help.salesforce.com/apex/HTViewHelpDoc?id=setting_up_web-to-lead.htm for Salesforce introduction)

 

By adding this integration code into your Salesforce configuration (and onto your website) then your users can click directly from Salesforce to see the CANDDi profile

 

This summary discusses the changes required to Salesforce and to your website

 

Steps 

1. Add a new field into Salesforce for all Leads

    (We recommend calling this something like CANDDi URL)

    You need to get the API Id for this field

    (See: https://help.salesforce.com/apex/HTViewHelpDoc?id=adding_fields.htm&language=nl)

 

2. Use the web-to-lead form creator to make your web-to-lead form

    Remember to add the new Field into this form so that you can insert data via the web-front-end

 

3. Get the default Web-to-lead code from Salesforce and paste into your website

 

4. Find the field with the API Id this will name the following HTML

 <input name="APIId" ...

  Add an additional attribute id="canddiprofile"

 

5. Add the following code into your website (underneath) the Web-to-lead form

NOTE The strAccount should be your CANDDi Account slug (the first part of the https://[strAccount].canddi.com

This code will query the CANDDi tracker to get the unique BrowserId

 

<script>
 var intCanddiCount = 5;
 function Salesforce_saveBId(){
   if(0 > intCanddiCount) {
    return;
   }
   intCanddiCount--;
   if(!window.canddi || !window.canddi.getBId()) {
    window.setTimeout(Salesforce_saveBId, 1000);
    return;
   }
   var strAccount = "";
   document.getElementById("canddiprofile").value = "https://"+strAccount+".canddi.com/contact/BId/search/"+window.canddi.getBId();
  }
  Salesforce_saveBId();
</script>

 

Have more questions? Submit a request

Comments