Skip to main content
Skip table of contents

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. Create a Record Triggered flow 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


Create a custom field on the Waitlist object

This new field will allow you to set entry conditions that reference the user’s profile in the Record-Triggered Flow.

  1. From Setup, Navigate to the Object Manager.
  2. Search for the Waitlist Object.
  3. Choose Fields & Relationships from the menu.
  4. Use the New Button to create a new field.
  1. Choose the Formula field type.
  2. Label your field “Created By Profile”.
  3. Choose Text as the Formula Return Type.
  4. Enter “CreatedBy.Profile.Name” as your formula.
  5. Follow the prompts and save your field.


Configure a Record-Triggered Flow to trigger the Email Template.

  1. From Setup, search for Flows and select it.
  2. From the flow list, use the New Flow button.
  1. Choose Record Triggered Flow.
  2. Click Create.
  • Select your Object
  1. Choose the Waitlist Object from the dropdown.
  2. Trigger the flow when a record is created.


    Figure 4. Screenshot of the radio button to select


  • Set Entry Conditionsto check that the Waitlist record created is NOT by the staff user profile.
    1. Select the All Conditions Are Met (AND) option from the Condition Requirements drop-down
  • Set the Condition
    1. Condition 1
      1. Field: NU__Email__c
      2. Operator: Is Null
      3. Value: False
    2. Condition 2
      1. Field: NU__Email__c
      2. Operator: Does Not Equal
      3. Value: Empty String (Not Null)
    3. Condition 3
      1. Field: CreatedByProfile__c (or Field name created in the 1st step)
      2. Operator: Does Not Equal
      3. Value: ‘Standard’



  • Add an Action Element to the flow

    1. Search for the Send Emails invocable action apex-NU__SendEmailInvAct
    2. Label: <ENTER_LABEL>
    3. Set Input Values:
      1. Toggle on Contact Id.
        1. {!$Record.NU__Account__r.PersonContactId}
      2. Toggle on Org Wide Email Address Id
        1. Enter your Org Wide Email Address Id.
      3. Toggle on Template Id
        1. Enter the Template Id of the email template that you created in the above steps.
      4. Toggle on Template Related Record Id
        1. {!$Record.Id}
      5. Click Done
  •                 


                     Figure 6. Screenshot of Apex Values

  • Save the Flow.

                     

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

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.