+ Start a Discussion

PHP POST data from my website to salesforce

I have a website where I POST data from a form to salesforce.  The purpose is for a newsletter so I save the guys name and email address.  The problem I have is that they are being transfered as "Leads" and we have to manually convert them to "Contacts" in salesforce which is easy, but a pain.  Is there a way to automatically send the POST as a Contact rather than a Lead?  Here is my code:


	$lead['Lead Source']='Front Page Email List';
	do_post_request("http://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8", $lead);

 What do I do? Do I need to include another key/value pair in the data to signal that it should be a Contact rather than a Lead?  Is there another address that I need to POST the data to?


Any help in this matter would be appreciated.


A way i can think to accomplish this is to write a trigger on Lead object with a Lead source  that would then convert the Lead that was created to a contact.

Let me know if this helps you.




I am sorry I do not understand your suggestion.  I think you are mentioning sales force specific development ideas with which I am not very familiar.  Is there a PHP solution for this? How can I edit my code snippet to get the desired outcome?


Or, rather, could you point me in the right direction to learn how to "write a trigger"? I not sure what exactly that is or what that means.