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
jd_06jd_06 

Web to Lead - Pass data back to page

Hi All - We have a situation where we have a public website (not a SF Site) where we capture lead information - web to lead.  When the lead gets inserted to SF we are generating a promotion code and emailing that code to the lead...everything works fine.  However, our business partners would like that code sent back to the page and displayed on the thank you.  The thank you is not a VF page.

Does anyone have any experience passing data back to a non VF page using web to lead?

Any information you can share would be greatly appreciated.

Thank you.
Rahul SharmaRahul Sharma
I guess you can specify the return URL while creating the web to lead form, provide absolute URL of your thank you (non visualforce) page and generate the form.
In HTML you would get a hidden input with name as retURL, in value you would have entered URL. For example, I entered google.co.in.
<input type=hidden name="retURL" value="https://google.co.in">

 
jd_06jd_06
Thank you Rahul for the reply.  What is not clear to me is how to pass the Salesforce generated promotion code back to the website.  Here are the steps.

1.  Customer goes to public website and enters personal information including email address and clicks submit.
2.  Information sent to Salesforce via Web to Lead functionality.
3.  Using a combinations of workflow field update and email alert in Salesforce we generate a promotion code and email that to the customer.

We would like that promotion code to also get sent back to the web page (real-time) so that it can be displayed on that page.  Can you explain further how to pass that promotion code value (caputred in custom field on Lead) back to the web page?

Thanks again,
Jason
Rahul SharmaRahul Sharma
Sorry I misunderstood your question :)
I don't think there is a straight forward way to do this.
What I can think of is to have a visualforce page embedded in thank you page, which polls for newly created record until it gets the promo code. But not sure how secure it would be!
 
jd_06jd_06
No worries :)  
Thank you for taking the time to try and help me with this.

Jason
David Garcia 122David Garcia 122
Did anyone ever figure this out?