Thursday 6 April 2017

how to automate capture leads in salesforce [ partial answer, but the closest you'll get ]

Here was my dilemma, the need to automate the submission of a SalesForce web to lead form.
Seems simple  right ? But this is for a well known national brand with a highly precious design team.

There were 2 sorts of official answer out there including the salesforce forums.

1. just use the salesforce web to lead form html and restyle it
2. it cant be done - script automation / security errors

Here's the reason why salesforce doesn't want you to automate the submission of the form using javascript - hackability! Basically nasty values can be sent through javascript and denial of service attacks / cracking attacks can happen. Your innocent website could be used by someone to inject and spoil your precious salesforce org.

OK, so given the impossibility factor, I took on the challenge and built the code on my server to act as a gateway. This way I can now send a lead to salesforce using javascript without the need for any design changes or costly use of SalesForce API. My gateway service can also translate values from the website to SalesForce.

Here's how the salesforce lead gateway works

SalesForce Lead Gateway - Javascript and PHP
SalesForce Lead Gateway

So, now the leads come through without having to modify any of the original website
contact mark@hopgood.eu to do this on your website.