In Blog, Tips & Tricks

Workflow to send Campaign Members an email alert to remind them of an upcoming event.

This is another one of those use cases that was inspired by a question on the Salesforce Community. To paraphrase, the question was basically “how can I send a reminder to all my Campaign Members a few days before an event takes place to keep it fresh in their mind”. This ends up being possible through completely declarative methods, which from my perspective is a good thing. In the below example I will cover the high level overview on how to do this. Keep in mind this is more of a proof of concept and there is plenty of room for tweaks to fit your specific use case. Without further ado, let’s get into it.

The set up:

To make this work you will need to build out the following:

  1. Custom field on the Campaign Members object
  2. Custom field on the Campaign object
  3. Workflow rule to trigger when a member is added to the campaign
  4. E-mail Alert Action for the Workflow Rule
  5. E-mail template to be used when the email is sent

Let’s start with the custom fields.

For this concept we are going to add a reminder date field to the Campaign object. The expectation is that this field will be populated with the date you want the reminder to go out and that this field will be populated before you add campaign members. As with most things in Salesforce you can tweak this as needed. Set up a field with the same parameters as below:

Campaign Reminder field

This field will need to be on the page layout and editable by users who are able to modify the campaign data.

Now on to the field on the Campaign Member object. Set up the field with the same parameters as below.

Campaign remidner formula

This field does not need to be visible or on a page layout. It’s just there to bring the Campaign Reminder field over to the Campaign Member object so you can use it in the Time Dependent criteria on your rule.

Now we can set up our Workflow rule. Create a new rule for the Campaign Member object with the same parameters as below.

Edit Rule WFR Syntax

Save the rule and then add your Time-Dependent Workflow Actions. For the purpose of this test you want your time trigger to be 0 Days After Campaign Member: Campaign Reminder. That way the rule will trigger on the date listed in the Campaign Reminder field.  If you set it up properly your time trigger section will look like this:

Time Dependant Actions

Now, before you go adding your action to the rule let’s do a quick test and make sure the rule is firing properly. First things first, make sure your rule is Activated! All activated now? Awesome. Next go to an existing campaign and add a date to the Campaign Reminder field. Be sure to make it a future date. Save the record and then go to Manage Members>Add Members – Search. Grab some random Contacts and add them to the Campaign. Don’t worry about what Contacts you are adding, after all you are in your sandbox or developer box, right? Once the Contacts have been added go to Setup>Monitor>Time-Based Workflow.  If you have other Time Based Workflows active in your org you may need to filter down so you only get the results for the new rule; if not, just click search.  You should now see something similar to the below screen.

Time Based Queue

In my test I added 4 Contacts and my reminder date was 3/31/2014. Based on what I am seeing there I know it worked. Awesome, right? Now we can finish the setup.

The next step is to create your email template. I am not going to get into setting up a template in this post but you can learn more if need be here.

Once the template is done navigate back to your Workflow rule and add an Action to your Time Based trigger. You will want to set up the email alert similar to the below screenshot.

Email template review

Keep in mind you will need to substitute in your template in the Email Template look up. The key point here is you need to make sure you are searching on Email Field under Recipient Type and that you add the Email Field: Email to the Selected Recipients. This also means that your contacts/leads need to have a valid email for this to work. Of course your data is clean and up to date, right?

That’s it! You have now successfully set up a rule that will remind your campaign members of a pending event or whatever you want to remind them about. Keep in mind there are some limits you need to be aware of but they are mostly generous so you should be okay in most instances.

Recommended Posts
Showing 3 comments
  • Tim Lee

    Hey! I’m trying this out and running into an error when I add a custom field to campaign members. The error is “Field Campaign does not exist. Check Spelling”. I looked back onto the campaign object and I see the Campaign Reminder field.

    I’m not exactly sure what Salesforce means when the campaign field doesn’t exist. I can provide screen shots if that would be helpful via email.

    • akira1224

      Tim, my guess is that you are trying to create a reference to a field and don’t have the name quite right. Are you using the Insert Field look up tool? If not, try that. Also if you continue to have issues throw the question up on the Salesforce community and let me know and I will come there and take a closer look.

      Glad you found a use case for this post though!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.