function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
krispkrisp 

Web-To-Lead form

Hi All,

 

Just a question regarding web-to-lead.  My client has a four (4) step registration process in their website.

 

Step 1 contains Name, Surname, Email Address, Step 2 has address information, Step 3 is custom fields, including Step 4.  Now, they want to create a Lead record in Salesforce immediately after the lead inserts their information and clicks "next" in Step 1.  Should they also fill in Step 2's information, they want to update the Lead in Salesforce with this information (address), etc.

 

So I need a way of querying SF for the inserted record (using email address) and updating this with the new info.  Do I do this in the PHP code, or in Salesforce (query incoming web to Lead records).

 

Any help is very much appreciated.

 

Thanks in advance.

JitendraJitendra

Hi Krisp, You can do in both way, but PHP will be easy.

Approach 1 : Save record on "Next" button in Lead and then using REST API get the id of the Lead and update it.

Approach 2: Rather than saving info on "Next" button, you can store the information on $_SESSION in PHP and save it at the end but there will be risk like if user exits form in Step 2 then record will not be updated.

Approach 3: Save info in Temp Database using PHP and using Crone JOB submit the information on Salesforce using "Web to Lead".

 

I would prefer Approach 3 as it will be reliable and easy to implement.