Forums

V4 - Having trouble integrating Salesforce

FDigital01 22 Nov, 2011
Hi

I have read all of the posts on integrating salesforce, but I cannot understand them. Can anyone give me an example of what code goes where? This is for V4. The other posts seems to be a mixture of previous versions.

Any help would be greatly appreciated.
GreyHead 24 Nov, 2011
Hi FDigital01,

What information does SalesForce need?

Bob
FDigital01 25 Nov, 2011
The code below is from the original html form which worked. I have changed the id values but the structure is correct.

I need to know where I should put the salesforce code into the V4 form.

Thankyou for your help.

<table>
<td width="51%" valign="top" class="content"> <form action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST">
<input type=hidden name="oid" value="00xx0000000xxxx">
<input type="hidden" name="sfga" value="00xx0000000xxxx">
<input type=hidden name="recipient" value="email@sample.com">
<input type=hidden name="subject" value="Enquiry/feedback">
<input type=hidden name="retURL" value="http://www.exampleurl.com">
<table width="200" height="0%" border="0" align="right" cellpadding="1" cellspacing="3" bgcolor="#D5DBE1">
<tr class="content">
<td height="9%" colspan="2"><p align="center" class="contentbold">Contact
Us </p></td>

</tr>
<tr class="content">
<td height="10%"><label for="first_name">First Name<br>
</label></td>
<td><input id="first_name" maxlength="40" name="first_name" size="27" type="text" /></td>
</tr>


<tr class="content">
<td height="10%"><label for="last_name">Last Name<br>

</label></td>
<td><input id="last_name" maxlength="80" name="last_name" size="27" type="text" /></td>
</tr>

<tr class="content">
<td height="10%"><label for="email">Email</label>
<br></td>
<td><input id="email" maxlength="80" name="email" size="27" type="text" /></td>
</tr>

<tr class="content">
<td height="10%">Phone</td>
<td><input id="phone" maxlength="40" name="phone" size="27" type="text" /></td>
</tr>
<tr class="content">
<td height="10%"><label for="company">Company<br>
</label></td>
<td><input id="company" maxlength="40" name="company" size="27" type="text" /></td>

</tr>
<tr class="content">
<td height="10%"><label for="city">City<br>
</label></td>
<td><input id="city" maxlength="40" name="city" size="27" type="text" /></td>
</tr>
<tr class="content">
<td height="38%"><label for="state">State/Province<br>
</label></td>

<td><input id="state" maxlength="20" name="state" size="27" type="text" /></td>
</tr>
<tr class="content">
<td height="13%" colspan="2" align="center"><div align="left">How did you hear about us?
<select id="00xx000000xxxx" name="00xx000000xxxx">
<option value=""> -- Please make a selection -- </option>
<option value="TSWG Telemarketing Call">TSWG Telemarketing Call</option>
<option value="LGC">LGC</option>

<option value="Networking">Networking</option>
<option value="Advertisement">Advertisement</option>
<option value="Employee Referral">Employee Referral</option>
<option value="External Referral">External Referral</option>
<option value="Partner">Partner</option>
<option value="Public Relations">Public Relations</option>

<option value="Seminar - Internal">Seminar - Internal</option>
<option value="Seminar - Partner">Seminar - Partner</option>
<option value="Trade Show">Trade Show</option>
<option value="Web">Web</option>
<option value="Word of mouth">Word of mouth</option>
<option value="Other">Other</option>

</select>
</div>
<label for="00xx000000xxxx"></label></td>
</tr>
<tr class="content">
<td height="13%" colspan="2" align="center" valign="top"><div align="left">Nature of enquiry
<textarea name="00xx000000xxxx" cols="35" rows="5" wrap="soft" id="00xx000000xxxx" type="text"></textarea>
</div> <div align="left"></div></td>

</tr>
<tr class="content">
<td height="13%" colspan="2" align="center"><div align="left">
Subscribe to our e-newsletter

<input id="00xx000000xxxxx" name="00xx000000xxxxx" type="checkbox" value="1" />
</div> <div align="left"></div></td>
</tr>
<tr class="content">
<td height="13%" colspan="2" align="center"><input type="submit" name="Submit" value="Submit"></td>

</tr>
</table>
</form></td>
</tr>
</table>
</td>
</tr>
GreyHead 25 Nov, 2011
Hi FDigital01,

To show how this works here is your code with all the layout HTML removed - just the form inputs remain:
<form action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST">
<input type=hidden name="oid" value="00xx0000000xxxx">
<input type="hidden" name="sfga" value="00xx0000000xxxx">
<input type=hidden name="recipient" value="email@sample.com">
<input type=hidden name="subject" value="Enquiry/feedback">
<input type=hidden name="retURL" value="http://www.exampleurl.com">
<input id="first_name" maxlength="40" name="first_name" size="27" type="text" /></td>
<input id="last_name" maxlength="80" name="last_name" size="27" type="text" /></td>
<input id="email" maxlength="80" name="email" size="27" type="text" /></td>
<input id="phone" maxlength="40" name="phone" size="27" type="text" /></td>
<input id="company" maxlength="40" name="company" size="27" type="text" /></td>
<input id="city" maxlength="40" name="city" size="27" type="text" /></td>
<input id="state" maxlength="20" name="state" size="27" type="text" /></td>
<select id="00xx000000xxxx" name="00xx000000xxxx">
<textarea name="00xx000000xxxx" cols="35" rows="5" wrap="soft" id="00xx000000xxxx" type="text"></textarea>
<input id="00xx000000xxxxx" name="00xx000000xxxxx" type="checkbox" value="1" />

Next we'll strip this down again so that just the names and, for the hidden inputs, the values are left:
action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8"
name="oid" value="00xx0000000xxxx"
name="sfga" value="00xx0000000xxxx"
name="recipient" value="email@sample.com"
name="subject" value="Enquiry/feedback"
name="retURL" value="http://www.exampleurl.com"
name="first_name"
name="last_name"
name="email"
name="phone"
name="company"
name="city"
name="state"
name="00xx000000xxx"
name="00xx000000xxxx
name="00xx000000xxxxx"

Next step - remove the quotes and add the form input names from your ChronoForm inside curly brackets - here I'll assume that they are the same as the SalesForce names e.g. first_name.
action=https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8
oid=00xx0000000xxxx
sfga=00xx0000000xxxx
recipient=email@sample.com
subject=Enquiry/feedback
retURL=http://www.exampleurl.com
first_name={first_name}
last_name={last_name}
email={email}
phone={phone}
company={company}
city={city}
state={state}
00xx000000xxx={00xx000000xxx}
00xx000000xxxx={00xx000000xxxx}
00xx000000xxxxx={00xx000000xxxxx}

The last step is to handle the first line - the action url here. The part up to the ? is the target URL, the query string after the ? needs to be added to the other parameter entries. So we end up with:
Target URL
https://www.salesforce.com/servlet/servlet.WebToLead

Fields/names entries:
encoding=UTF-8
oid=00xx0000000xxxx
sfga=00xx0000000xxxx
recipient=email@sample.com
subject=Enquiry/feedback
retURL=http://www.exampleurl.com
first_name={first_name}
last_name={last_name}
email={email}
phone={phone}
company={company}
city={city}
state={state}
00xx000000xxx={00xx000000xxx}
00xx000000xxxx={00xx000000xxxx}
00xx000000xxxxx={00xx000000xxxxx}

Bob

PS Note to other readers - all the 00xx000000xxx entries here are disguised values - check to see what you need to include here.
FDigital01 25 Nov, 2011
I greatly appreciate the time you have taken to show me how the code should be structured and perhaps I am incredibly thick, but I still do not know where to put the code in the form.

For example do I create a text box called first name and in the field name put in {first_name} and for the hidden input create a hidden text box and call the field name {oid} with the default value being the xx00000xx ?

I hope your patience will extend to helping me get this working. Thankyou
GreyHead 29 Nov, 2011
Hi FDigital01,

Sorry, use a CURL action (or more likely the customised cURL [GH] action as that handles the mixed values better).

Bob
This topic is locked and no more replies can be posted.