+ Start a Discussion
John Ligda 2John Ligda 2 

Should I automate this in Salesforce

We have a business need to send and email to new lead leads in certain cases. I've organized those cases by 'campaign 1'. This is on a trial enterprise org. We are using First Contact to capture business cards for this case. There are two custom fields entered at the time of busines card scan and the user associates the new lead to 'campaign 1'.


Now I have the following workflow I'm doing manually once I see the lead in Salesforce. 

  • leads ->'Campaign 1'(custom view) -> go

  • Click on first lead with status of Entered Contest

  • Under the Activity History related list click Send an Email -> Select Template -> campaign 1 email template

  • Cut and paste the URL link(generated by the template merge feature using custom fields) into a browser, test and save positive result as a pdf.

    • Ad leads initials to the default pdf name file_name.pdf -> file_name_cg.pdf

  • Attach the newly created pdf to the email. Attach file

  • Send

  • Under Campaign History linked list click edit next to the IFP iPad Mini Give Away

  • Change campaign 1 status from Entered Contest to Email Sent

    Another requirement not listed here is that we want the email to go out n hours after the lead enteres the system (not immediately)

 A couple of questions. Can this be automated in Salesforce?

Most of the workflow is straight forward: Send the email, select a template, change a status. Where does this automation happend? Can you point me on hwere to learn about automating vanila Salesforce activities? Is this a 'trigger' a 'worlflow'?

What about generating the pdf? Is this something I should not expect to do with Salesforce? Right now I'm using the cut and pasted the URL into google chrome and print pdf. Should I make an executable that does this and call it from Salesforce?

Thanks for taking the time to read this for a new user. I apprecatiate the kindness I've received so far in the community.

Crystal Rochlitz 4Crystal Rochlitz 4

On the outside, this sounds like it would be a fairly simple requirement, but as you probably have figured out by now, it really is quite complicated. Workflow can automate some of this process by creating a task for you (or whomever is sending the e-mails) instead of having to constantly check a list view for new, qualifying leads. Workflow processes only send e-mail to users, but you could possibly create a trigger on the Lead object to create and send e-mails to the leads. This again is a double edge sword because the limitations on apex generated e-mail is quite low (imho) so you would only be able to run the trigger 10 times (I think?) before it starts rejecting the sent e-mail. Another, better option would be to create a scheduled apex class that collects all qualified leads and sends the e-mail template out once a day/week/etc.  Hope these options help you decide how to go about handling this.