You need to sign in to do that
Don't have an account?
How do I set up an Email Service to automatically generate Leads?
I see that there are multiple apps on the app exchange to do this, however, they depend on the email coming from the lead themselves. My situation is that I am getting emails from a lead generating company, from the same email everytime, and the lead information is in the content of the email itself. The emails always come from the same email, and the content is always formatted in the same way.
From what I understand, I need to set up an email service, then use some kind of Apex code to pull the information from the email, then set up an email forwarding rule in my outlook account so that the emails automatically get sent to salesforce where they are then are turned into leads.
Is this correct? If it is, how do I do the Apex coding part? I have a little bit of coding experience (ruby, javascript), but are there any resources besides the apex code devoloper's guide that someone could point me to? Going through that whole guide just to write a simple email service seems a bit overkill; has anyone done something similar that I could look at and adjust to my needs?
Thanks so much in advance,
Benjamin
All Answers
Try this below sample code to get start too generate lead from email. Make sure to include the required fields while creating lead in this email service class
Assuming the email template in the below formate
Here is the link for retrieving information from the email message in the apex class http://developer.force.com/cookbook/recipe/retrieving-information-from-incoming-email-messages
Thanks,
Karan
Error: Compile Error: Invalid initial expression type for field RecordType, expecting: SOBJECT:RecordType (or single row query result of that type) at line 44 column 42
Here is my code: