After 5+ years of this recipe being around, it's time for an update. As of January 2024 it's being changed to use more modern methods of creating the link to the Contribution Statement, along with various other tweaks.

Because the new method is so superior, I'm choosing not to preserve the old content and only specify the new stuff. Even if you've aleady implemented this recipe before, I encourage you to switch to the new method of creating the link.

Thanks to Ben Murphy for encouraging me to update this to the new method!

Why

Why email your contribution statement? It's 2024 (or later). Unless you're mandated to physically mail contribution statements by your state or jurisdiction, emailing them will save a ton of time and money, and provides an experience users are simply used-to these days.

Our strategy is to send an email that contains a "magic link" to the statement page on our website, to everyone who has contributed more than $1 to one of our applicable funds, rather than send the statement itself as a PDF or whatever (which would be more complicated and a lot less secure). Rock provides an online, printable version of the statement already, so why not just point people there? By sending a special link to each contributor, they will be able to access their statement even if they don't have a login. This dramatically reduces the number of calls/emails we get during tax season because someone contributed (perhaps via check every week), but doesn't have an account on our website, so they can't get to their statement without creating an account, us merging that account with their real profile, blah blah blah. All of that goes away when you send a magic link.

How

First, know that this will only work if you're using the newer Contribution Statement Generator block on your Contribution Statement page vs. the old Contribution Statement Lava (Legacy) block. You can tell which one you're using by visiting that page and looking at the block you have in use.

Second, we need an email template from which to send these emails. I'm not going to give you a complete email template, as you likely already have a standard one and you wouldn't want our branding, anyway. But here's the important part of the email you can just paste into an existing copy of your standard template, and name it Contribution Statement Email or whatever makes sense to you.

<p>You are receiving this email because we have record of your contributions to CHURCH NAME in {% raw %}{{ 'Now' | Date:'yyyy' | Minus:1 }}{% endraw %}. Thank you for contributing to the ministries of CHURCH NAME!</p>
<p>The button below will take you directly to your Giving Statement, which you can use for tax purposes.</p>
<table>
<tr>
      <td style="background-color: #425963;border-color: #dbd4c7;border: 2px solid #dbd4c7;;padding: 10px;text-align: center;">
      <a style="display: block;color: #ffffff;font-size: 12px;text-decoration: none;text-transform: uppercase;" href="{% raw %}{{ 'Global' | Attribute:'PublicApplicationRoot' }}ContributionStatement?StatementYear={{ 'Now' | Date:'yyyy' | Minus:1 }}&rckid={{ Person | PersonActionIdentifier:'contribution-statement' }}{% endraw %}">
            Get My Statement</a>
      </td>
   </tr>
</table>
<p>If you find a problem with your statement, please contact us at <a href="mailto:EMAIL@ADDRRESS.COM">EMAIL@ADDRESS.COM</a> or call PHONE NUMBER.</p>

That might look intimidating, but it's really not as complicated as it seems. Most of it is just a link styled within a HTML table to make it look like a button. You will likely want to change the colors of the button text, background, and border to whatever looks good with your branding... and of course change the text of the email to whatever makes sense for your organization. I just entered some boilerplate here instead of our actual verbiage. If you've got a better/favorite way of making a button, just do that! The only important part of the code above is the link (href) to the statement itself.

The part we really want to notice is the link itself, which (sans the button formatting above) is <a href="{% raw %}{{ 'Global' | Attribute:'PublicApplicationRoot' }}ContributionStatement?StatementYear={{ 'Now' | Date:'yyyy' | Minus:1 }}&rckid={{ Person | PersonActionIdentifier:'contribution-statement' }}{% endraw %}">Get My Statement</a>

What we're doing is constructing a link to your PublicApplicationRoot Global Attribute with a page route of ContributionStatement and tacking on {{ 'Now' | Date:'yyyy' | Minus:1 }} as a querystring parameter. You also need to make sure that whatever page your contribution statement lives on* (page 444 on the default External Site) has a Page Route of ContributionStatement **. Oh, and the reason the link is wrapped in {{ raw }} {{ endraw }} Lava is to make it work in a Email Wizard template. If you're using a Simple Editor template, remove those raw tags.

Note: If you already have Lava in your default Wizard template that ends up wrapping your new Link code with RAW tags, you'll likely have to remove the RAW tags around the link even when using the Wizard.

The "magic" part of the URL is the PersonActionIdentifier rckid={{ Person | PersonActionIdentifier:'contribution-statement' }}. This is special functionality that allows Rock to grant access to certain Blocks (in this case, the contribution statement block) to a person "as themselves" without actually logging them in. Magic!

Note: In the original version of this recipe we used a "PersonToken" in the link to grant access to the Contribution Statement page. The new method is far superior than a tokenized link, because it
1. Doesn't actually log you in (and only provides access to that specific block), and
2. Works with the new-ish "Security Profiles", even ones like Extreme for which generating tokens is disabled by default. PersonActionIdentifier works regardless of your security profile, because it's not a impersonation token. Win!

Statement Page

Your Contribution Statement page needs a couple of tweaks from its default state.

  • Go to Admin | CMS Configuration | Pages and navigate to the Contribution Statement page on your Public Rock site. (On a default Rock public website this is under External Homepage | Give | Giving History | Contribution Statement)
  • Edit the security on the page by clicking the lock on the far right and give All Users View rights to the page.
  • In the Blocks from Page section, click the cog icon on the right of the Contribution Statement Generator block and set Allow Person Querystring to Yes
  • Also make sure security on the block allows All Users View (normally it inherits the page's rights, but your block may have explicit permissions set.)
  • It may seem freaky and un-secure to open such a page up to "All Users", but because of the way the PersonActionIdenfier works, if even ONE character of the (valid, and unique-to-each-person) rckid is changed, you will see an error instead of a contribution statement.

Recipients

Ok, hopefully now you have a new template that says what you want, with a nice clickable button that takes a recipient to their statement. The only thing we have left is identifying who to send these emails to. You may have a completely different process for identifying who to send a contribution statement email to, but ours is pretty simple:

Contribution Statement Dataview

Here we're simply using a DataView that returns People who 1) Gave within the date range we define, 2) Gave $1 or more to one of our selected funds, 3) Have an email address, and 4. The email address isn't set to Do Not Email. That's it! Now when we need to send the contribution statement, we just run that DataView and click Communication icon on the grid.

Wrapup

Hopefully this recipe is a good starting point for you to start tweaking it to your organization's needs. You might have noticed that we're using {{ 'Now' | Date:'yyyy' | Minus:1 }} to specify the statement year. This is saying "get the year that it is right now, and subtract one." This means that THIS Contribution Statement Email Template is meant to be run after December 31 in any given year, so that you're sending people a link to last year's statement.

At our org, we actually have TWO versions of the email template... one named Contribution Statement - PRIOR YEAR (which uses the date logic above, and another named Contribution Statement - CURRENT YEAR which simply uses {{ 'Now' | Date:'yyyy' }} where the year is calculated. This lets us send out the appropriate statement whether we're doing the "tax season mass email", or just sending one out for the current year to someone who called in asking for theirs.

Finally, please test this with yourself and maybe a few other safe people before you try to use it. It's really easy to mess up the link with a mistyped character or two, and sending out 10,000 emails with links that don't work (or worse, a link that is NOT for them) would be Really Bad (tm).

Gotchas

* I'm mentioning this because a couple of people got confused... the "contribution statement page" is NOT the Giving History page. It's the page you get to when you go to Giving History, THEN click one of the year buttons. THAT is the page you add the ContributionStatement route to (if it doesn't already exist). Also, DO NOT make the mistake of linking to the INTERNAL statement page, which is the page you get to from the Contributions tab on a Person Profile. If you link to that, users won't have rights to see it and will get an error.

** I've seen some people struggling with my direction to add a Page Route of ContributionStatement to their statement page. You do this by using Admin | CMS Configuration | Pages and navigating to the contribution statement page on your public Rock site (likely under Give | Giving History | Contribution Statement), and click EDIT on the page. Then go to the Advanced Settings tab and enter ContributionStatement in the Page Routes box. That's it... don't enter any http:// or https://, etc.