Generate an email when an association member joins a waitlist

Recipe Overview

As an administrator, you can set up Salesforce automation tools to send an email notification to a member when he or she successfully joins a waitlist.

In this recipe you will:

  1. Configure Email Service in the org’s communication settings.

If you already have it configured, then skip this step.

       2. Create an email template that you would like your members to see when they are added to the waitlist.

       3. Configure the process builder to trigger the email notification.


Recipe Directions

Follow the directions for each phase of the process below. It should take one hour to set this up.

Configure SendGrid in the Org's communication settings

If you're going to send out emails that exceed the Salesforce limit, then it is best to use SendGrid as your email service. If the email service is already configured for your org, then you can skip this step.

From Setup, search for Installed Packages.

  1. Click on Configure next to the Nimble AMS package.

           

            Figure 1. Configure tab

       2. Scroll down to the Communication Settings section of the page.

    1. Change the Email Service dropdown to SendGridEmailService

    2. Set the Email Service From Address to <YOUR_SENDER_EMAIL_ADDRESS>

    3. Set the Email Service API Key to <YOUR_API_KEY>

    4. Set the Email Service From Name to <YOUR_SENDER_NAME>
       

                    Figure 2. Fields to select in the Communication Settings

        3. Click Save.

Create an email template

This template is only an example. Your association can create your own email template that reflects your brand elements.

  1. From the Setup Home tab, search for Classic Email Templates and select it.

  2. Click on New Template button.

  3. Select Text for the Template Type.

  4. Click Next.

  5. Check Available for Use.

  6. Enter the Email Template Name

    1. Template Unique Name will auto-populate

  7. Enter text for Description

  8. Enter text for Subject

    1. You have been added to the waitlist for the {!znu__Waitlist__c.znu__Event__c} event

  9. Enter text for the Email Body

    1. Dear {!NullValue(znu__Waitlist__c.znu__FirstName__c, "Sir or Madam")}

      Thank you for your interest in attending the {!znu__Waitlist__c.znu__Event__c} event and joining the waitlist.

      Once a spot for registration opens up and is available, we will contact you for confirming the registration.

      If you have any questions in the meantime, please do not hesitate to contact us.

      Best regards,
      The {!znu__Waitlist__c.znu__Event__c} Event Team

  10. Click Save.

           

           Figure 3. Sample email template

Configure the process builder to trigger the email notification

  1. From Setup, search for Process Builder and select it.

  2. Create New.

    1. Add a Name and Description.

    2. Change The process starts when dropdown to A record changes.

    3. Click Save

  3. Click Add Object

    1. Choose the Waitlist for the Object dropdown.

    2. Select only when a record is created.

                     

                     Figure 4. Screenshot of the radio button to select

                 c. Click on Save.

       4Add Criteria to check that the Waitlist record created is NOT by the staff user profile

       5. Enter text for Criteria Name

       6. Set the condition

    1. Condition 1

      1. Field: znu__Waitlist__c.CreatedBy.Profile.UserType.

      2. Operator: Does not equal

      3. Type: Picklist.

      4. Value: Standard

    2. Condition 2

      1. Field: znu__Waitlist__c.znu__Email__c.

      2. Operator: Does not equal

      3. Type: Global Constant.

      4. Value: $GlobalConstant.null

    3. Condition 3

      1. Field: znu__Waitlist__c.znu__Email__c.

      2. Operator: Does not equal

      3. Type: Global Constant.

      4. Value: $GlobalConstant.EmptyString

                 

                  Figure 5. Screenshot of condition parameters

         7. Click Save

         8. Immediate Actions → Add Action

            a. Action Type: Apex

            b. Action Name: <ENTER_NAME>

            c. Apex Class: Send Emails

            d. Apex Variables:

                Variable 1

      1. Field: Template Unique Name

      2. Type: String

    1. Value: <Enter the name of the email template that you created in the previous step>

                 Variable 2

      1. Field: To Addresses .

      2. Type: Field Reference.

      3. Value: znu__Waitlist__c.znu__Email__c

                  Variable 3

      1. Field: Template Related Record Id . (used for setting the merge fields)

      2. Type: Field Reference.

    1. Value: znu__Waitlist__c.Id

      Variable 4 (optional)

      1. Field: From Name .

      2. Type: String.

      3. Value: <SENDER_NAME>. If this is not set, it will use the email address of the sender.

                     

                     Figure 6. Screenshot of Apex Variables

                  c. Click Save

            9. Activate the process builder.

Recipe Results

After Association members successfully join an Event Waitlist, they will receive an email notification to the address that they specified.


Figure 7. Screenshot example of how the email notification will read