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
Lara MarshLara Marsh 

Email alert for custom field on Campaign Member

I created an email alert that uses an HTML template to send an email to the email field on the Campaign Member object. I created a workflow rule that evaluates anytime the record is created or updated. The workflow rule checks to see if a custom checkbox on the Campaign Member is true. If it is true, it sends the email alert with a copy to my admin email.

A couple of questions:
1. The email alert is not sending. It doesn't send to the Contact, it doesn't send to me.
2. When I'm in the email template and I test the merge fields, it finds the Contact First Name but not the custom field on the Campaign Member. This makes sense to me because how would it know which Campaign to look for? So how do I test the Campaign Member merge fields?

Thanks.
Best Answer chosen by Lara Marsh
Balaji Chowdary GarapatiBalaji Chowdary Garapati
Hi Lara,

  Couple of things here:
1)  Salesforce doesnt support mail merge testing on campaign members.
2) I tried the below text based email template and it worked.

Dear {!CampaignMember.Contact},
Our records indicate that the passport we have on file for you expires on {!CampaignMember.Passport_Expiration__c}. Passports must be valid for 6 months after the trip.

I can manually send a test from the email template and it populates name but not passport expiration for the campaign member. But the workflow rule is not causing anything to happen.


3) Cross check the Workflow criteria ., if you can share that, it will help debugging it.

Im pasting my workflow criteria too.,

Rule: ContactId!= Null
Criteria : Evaluate the rule when a record is created, and every time it’s edited
Object : Campaign Member


and here the email i got:

Dear Balaji Garapati,
Our records indicate that the passport we have on file for you expires on 12/25/2014. Passports must be valid for 6 months after the trip.

I can manually send a test from the email template and it populates name but not passport expiration for the campaign member. But the workflow rule is not causing anything to happen.






Thanks,

All Answers

Balaji Chowdary GarapatiBalaji Chowdary Garapati
@Lara Marsh:

Below questions might help you debug that:

1) Is the workflow active?
2) What is the Access Setting For Email Deliverability in your org?
3) Cross check the merge field in the email template.

Thanks,
Lara MarshLara Marsh
Thanks, Balaji. To answer your questions:
1. Yes, the workflow has been activated.
2. The Email Deliverability for my user (admin) is set to All Email.
3. I did...a few times. This is the essential part of the mail template:
Dear {!Contact.FirstName},
Our records indicate that the passport we have on file for you expires on {!CampaignMember.Passport_Expiration__c}. Passports must be valid for 6 months after the trip.

I can manually send a test from the email template and it populates name but not passport expiration for the campaign member. But the workflow rule is not causing anything to happen.

Thanks.
Balaji Chowdary GarapatiBalaji Chowdary Garapati
Hi Lara,

  Couple of things here:
1)  Salesforce doesnt support mail merge testing on campaign members.
2) I tried the below text based email template and it worked.

Dear {!CampaignMember.Contact},
Our records indicate that the passport we have on file for you expires on {!CampaignMember.Passport_Expiration__c}. Passports must be valid for 6 months after the trip.

I can manually send a test from the email template and it populates name but not passport expiration for the campaign member. But the workflow rule is not causing anything to happen.


3) Cross check the Workflow criteria ., if you can share that, it will help debugging it.

Im pasting my workflow criteria too.,

Rule: ContactId!= Null
Criteria : Evaluate the rule when a record is created, and every time it’s edited
Object : Campaign Member


and here the email i got:

Dear Balaji Garapati,
Our records indicate that the passport we have on file for you expires on 12/25/2014. Passports must be valid for 6 months after the trip.

I can manually send a test from the email template and it populates name but not passport expiration for the campaign member. But the workflow rule is not causing anything to happen.






Thanks,
This was selected as the best answer
Naval Sharma4Naval Sharma4
Hi Lara Marsh,


you can not achieve this functionality as Salesforce doesn’t allow this functionality as a Lead can be attached to more than one Campaign and the email template wouldn’t be able to differentiate between this. You have to use triggers.