Last active
December 29, 2015 15:09
-
-
Save modmedia/7688576 to your computer and use it in GitHub Desktop.
Submit data from a Mura form to Sales Force
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cffunction name="onAfterFormSubmitSave"> | |
<cfargument name="$"> | |
<cfif $.content('title') eq "{content Title}"> | |
<!--- Send Sales Leads to SalesForce ---> | |
<cfhttp method="post" url="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8"> | |
<cfhttpparam type="formfield" name="oid" value="XXXXXXXXXXX"/> | |
<cfhttpparam type="formfield" name="retURL" value="http://www.domain.com"/> | |
<!--- | |
<cfhttpparam type="formfield" name="debug" value="1"/> | |
<cfhttpparam type="formfield" name="debugEmail" value="[email protected]"/> | |
---> | |
<cfhttpparam type="formfield" name="00N60000001olVF" value="#request.SUBMITTERNAME#"/> | |
<cfhttpparam type="formfield" name="00N60000001olVK" value="#request.SUBMITTEREMAIL#"/> | |
<cfhttpparam type="formfield" name="company" value="#request.COMPANYNAME#"/> | |
<cfhttpparam type="formfield" name="first_name" value="#request.COMPANYCONTACT#"/> | |
<cfhttpparam type="formfield" name="phone" value="#request.COMPANYCONTACTPHONE#"/> | |
<cfhttpparam type="formfield" name="email" value="#request.COMPANYCONTACTEMAIL#"/> | |
<cfhttpparam type="formfield" name="street" value="#request.COMPANYADDRESS#"/> | |
<cfhttpparam type="formfield" name="city" value="#request.COMPANYCITY#"/> | |
<cfhttpparam type="formfield" name="state" value="#request.COMPANYSTATE#"/> | |
<cfhttpparam type="formfield" name="zip" value="#request.COMPANYZIPCODE#"/> | |
<cfhttpparam type="formfield" name="description" value="#request.LEADNOTES#"/> | |
<cfhttpparam type="formfield" name="00N60000001olV5" value="#request.SALESMANAGERDISCUSSION#"/> | |
<cfhttpparam type="formfield" name="00N60000001olVA" value="#request.GROSSMARGINAGREEDTOPERCENTAGE#"/> | |
</cfhttp> | |
</cfif> | |
</cffunction> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment