+ Start a Discussion
Shiva VenuShiva Venu 

Send Email Alert When Lead is created for specific Campaign

We need a email notification to be sent when a new lead is created for specific campaign.
I could not build a workflow on lead object as there is no campaign field, also campaign history is a related field. Please suggest
Best Answer chosen by Shiva Venu
Suraj Tripathi 47Suraj Tripathi 47

Hi Shiva,

Please find the solution.

 there is no direct relationship between a Salesforce Campaign and a Lead/Contact; this is why Salesforce is designed to use Campaign Members instead.

Campaign Member has leadId and CampaignId

You can also write a trigger to fulfill your requirement.

Please mark it as the Best Answer if it helps you.

Thank You

All Answers

Suraj Tripathi 47Suraj Tripathi 47

Hi Shiva,

Please find the solution.

 there is no direct relationship between a Salesforce Campaign and a Lead/Contact; this is why Salesforce is designed to use Campaign Members instead.

Campaign Member has leadId and CampaignId

You can also write a trigger to fulfill your requirement.

Please mark it as the Best Answer if it helps you.

Thank You

This was selected as the best answer
SwethaSwetha (Salesforce Developers) 
HI Shiva,
The ability to select the related campaign when creating a new lead is not available in LEX. See related post 
https://salesforce.stackexchange.com/questions/251158/the-campaign-field-is-missing-from-lead-layout-in-lightning

The workaround suggested in above post is to create a custom 'campaign' look up field and add it to the lead page layout. Then set up a process builder to assign leads to the campaign as campaign members on lead creation.

You can make use of this field to send the email alert.

Related: https://help.salesforce.com/articleView?id=000327365&type=1&mode=1

If this information helps, please mark the answer as best. Thank you