Send Tables in Email in Flow – NPSP Example #2 Memorial Gifts

This is the second in a series on sending email with an embedded table of records of NPSP objects. The first post was a list of payments.

“Here is the use case: sending a family of a deceased relative one letter with all the names of people who have donated in memoriam. So, one letter to the family for many people who gave. Client is a large hospice so this is happening weekly. Open to different options — apps? exports & merge? other? Thanks!”

Rob asked in the Power of Us Hub, back in April

Well, I’m a few months late, but here you go, Rob. I made a Flow that sends out an email like the one below. I see now that you said “letter”…oops. Hopefully you figured out a solution by now, anyway!

Install this unmanaged package to try it out.

How It Works

Watch the video to see how it works and/or read the explanation below.
  • This requires that all honorees and notification recipient contacts are entered as contact records.
  • A screen flow shows up conditionally on an opportunity that has Tribute Type = Honor or Memorial. (Example: So let’s say in memory of Hildegard Potatomash.)
  • That screen flow shows you how many total opportunities there are in honor or memory of the same person and where the custom field Notification_Date__c is blank. This field is part of the package. (There are 8 opportunities in honor or in memory of Hildegard Potatomash to let Wendy Potatomash know about. )
    • The idea is that you’d enter a bunch of these gifts before you send out the email once or twice.
    • Confirm that all the gifts are in honor or memory. That’s easier than me building something that looks through all the gifts for discrepancies. Thanks.
  • After hitting next you see a preview of the email that will be sent to the Notification Recipient Contact. It pulls in different text based on three conditions:
    • Gift in memory – We are so sorry for your loss. The following people have sent gifts in memory of Hildegard Potatomash. We are honored to have been thought of in this difficult time.
    • Gift in honor where notification recipient is the same person – The following people have sent gifts in your honor. Thank you very much for encouraging others to support our work!
    • and gift in honor notifying a different person. – The following people have sent gifts in honor of Jameela James. We are delighted to be the recipient of this generosity!
  • The email is sent and all opportunities are marked with today’s date in the Notification_Date__c field.
Salesforce Opportunity record page with the flow element in the top right corner. It says There are 8 opportunities in memory or in honor of Hildegaard Potatomash that Wendy Potatomash has not been told about. Confirm the tribute type of the gifts: Memorial. Click next to preview the email to Wendy Potatomash.

Optional: Modify the Flow

  • Open the Flow: Tribute or Memorial NotificationEmail.
  • Under Manager, open the formula EmailPart1 and modify away.
  • Open the formula EmailPart2 to modify whether it closes with “With deepest sympathy” or “With our sincere thanks.”
  • The name of your organization is pulled in from the Company information in Salesforce.
  • Modify the greeting, order of the email and email signature in the text template emailBody.
  • To modify the columns that show up, which are Primary Contact First and Last Name, Primary Contact Household Name, Primary Contact Email, and Notification Message, open the text template tableRow. Replace the merge fields that are in the template.
  • The column headers are in the variable table.
  • Learn more about how to add columns or remove columns in the previous post.

Add the Flow to Your Opportunity Lightning Page

Modify the Lightning page layout to add a Flow Component that is visible conditionally if the Tribute Type is Honor or Memorial.

Criteria on the right for a conditionally visible Flow component.

Thanks again to ForcePanda for the blog post about tables in Flow which got me so excited about how to utilize this for nonprofit customers!

Published by

JessieRymph

Jessie joined Salesforce.org in 2018 to give introductory webinars to nonprofit customers. She now is a Senior Solution Developer supporting nonprofits and education customers at Salesforce. All opinions expressed on this blog are her own or those of the contributors. She's spent 17 years more or less in CRMs and databases, but didn't meet Salesforce until 2011. Jessie co-led the Seattle Salesforce Nonprofit User Group in 2015-2016. She wrote a sh*tty first draft of a novel and hopes to turn it into a screenplay!

2 thoughts on “Send Tables in Email in Flow – NPSP Example #2 Memorial Gifts”

  1. Interesting idea, how would you see this working with GDPR, surely you would need some form of consent marker on the donation that you were happy to have your detailed shared?

    1. Great question. Fortunately, I haven’t had to deal with GDPR yet, so I don’t know! That sounds very reasonable.

Leave a Reply