Page MenuHomePhabricator

Annual totals receipt thank you email for recurring donors
Closed, ResolvedPublic4 Story Points

Description

This is a custom email for recurring donors. Previous conversations are here: T112966

official copy for email is here:
https://docs.google.com/document/d/1iKbwcCMIqHgpJfNSluC0yMgASLL090uQp1tE81p38Tc/edit

Updated notes from @CCogdill_WMF & @MBeat33:

We want to change the Thank You email functionality for monthly recurring donors. Currently, they get the same email every month as they got on their first donation. We would like to change that so that they:

  • Receive the same TY email they are receiving now at the time of their first donation
  • Do not automatically receive TY emails on the date of their subsequent donations
  • Receive a summary TY email in January of every year showing sum or list of all the donations made in the previous year (i.e. “Your 2018 contributions to Wikipedia). Ideally, we could stagger this throughout the month of January, so not all recurring donors are contacted on the same day

We will want to make a slight change to the special recurring copy in the current TY email, and are working on copy for the January email. More to come, but let us know when you need the updated copy, especially if it's needed sooner than later.

Details

Related Gerrit Patches:
wikimedia/fundraising/crm : masterEOY summary: use Hawaii time zone
wikimedia/fundraising/crm : masterEOY summary: update text to match final copy
wikimedia/fundraising/crm : masterEOY summary: independent from name/address from normal TY
wikimedia/fundraising/crm : masterEnd of year summary: add Civi activity
wikimedia/fundraising/crm : masterEnd of year summary: Fix 'batch' param name
wikimedia/fundraising/crm : masterEnd of year summary: remove test mode
wikimedia/fundraising/crm : masterEnd of year summary: align templates with DS proposal
wikimedia/fundraising/crm : masterPrint Job ID when calculating summaries
wikimedia/fundraising/crm : masterEnd of year summary: output job ID after calculate
wikimedia/fundraising/crm : masterEOY summary: split calculation, include more donations
wikimedia/fundraising/crm : masterdb_switcher - don't call get_prefix statically
wikimedia/fundraising/crm : masterEnd of year summary: add fn visibility
wikimedia/fundraising/crm : masterEOY summary: fix string extraction & test data
wikimedia/fundraising/crm : masterEnd of year summary: fix calculation
wikimedia/fundraising/crm : masterEOY summary: check later for missing config
wikimedia/fundraising/crm : masterRewrite unused get_prefix fn for EOY email
wikimedia/fundraising/crm : masterEnd of year summary template fixes
wikimedia/fundraising/crm : masterEOY summary: Quit filtering big query with function
wikimedia/fundraising/crm : masterEnd of year summary: declare implicit properties
wikimedia/fundraising/crm : masterEnd of year summary: code formatting
wikimedia/fundraising/crm : masterEnd of year template fixes

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

@spatton and @CCogdill_WMF any feedback on the last comment?

DStrine set the point value for this task to 4.
Ejegg added a subscriber: Ejegg.Sep 18 2019, 9:38 PM

I just reviewed the CDN Tax receipts extension to see if it would be suitable for this purpose. Looks like it's a bit too narrowly focused on Canada for our purposes, and seems to generate the receipts as PDFs.

@Ejegg this is what I use for the HAC project - however the structure of the extension is a bit incomplete - it was intended to permit the creation of smarty-template blocks that could be inserted into other templates.

https://github.com/eileenmcnaughton/nz.co.fuzion.entitymessages/blob/master/templates/Messages/all_contributions_last_fy_summary_block.tpl

Ejegg added a comment.Sep 19 2019, 8:17 PM

Cool, that will be helpful for generating the text-based emails. There's a German 'donation receipts' extension that has a bunch of other useful functionality, like automatically sending batches of receipts. Unfortunately, it's also focused on generating file attachments (PDF or CSV) rather than sending the receipt in the text of the email.

@MNoor and @CCogdill_WMF : Do we need to omit endowment donations from these roll-up totals, if a recurring donor has also given to the endowment in the same year?

Change 538712 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/crm@master] End of year template fixes

https://gerrit.wikimedia.org/r/538712

Change 538713 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/crm@master] End of year summary: code formatting

https://gerrit.wikimedia.org/r/538713

Change 538714 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/crm@master] End of year summary: declare implicit properties

https://gerrit.wikimedia.org/r/538714

Change 538727 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/crm@master] EOY receipt: Quit filtering big query with function

https://gerrit.wikimedia.org/r/538727

Yes, omit endowment donations @Ejegg!

And @MBeat33 's suggestion above is fine for me, though I am skeptical as to how much sense it makes to support the annual totals in multiple currencies. Is that easy enough to do, or should we scrap the annual total?

Okay, from meeting with Elliott, it sounds like the multi-currency
formatting is not a concern. I'm down with Michael's suggestion! Noting as
well that Michael confirmed it's good to remove endowment donations.

Ejegg added a comment.Sep 24 2019, 5:16 PM

Here are the language statistics for people with a recurring donation active this year (only including languages with at least 100):

en152101
ja10156
fr5410
it4033
sv3259
es1819
nl1751
pl1714
de1358
nb955
he844
da731
hu666
ro433
ru336
pt317
sk191
zh126
uk100

Change 538974 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/crm@master] End of year template fixes

https://gerrit.wikimedia.org/r/538974

Change 538712 abandoned by Ejegg:
End of year template fixes

Reason:
superseded by Ic02ae06e33406eb17bc841425

https://gerrit.wikimedia.org/r/538712

Ejegg claimed this task.Sep 25 2019, 3:24 PM
Ejegg triaged this task as High priority.

Change 538713 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] End of year summary: code formatting

https://gerrit.wikimedia.org/r/538713

Change 538714 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] End of year summary: declare implicit properties

https://gerrit.wikimedia.org/r/538714

Change 538727 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] EOY summary: Quit filtering big query with function

https://gerrit.wikimedia.org/r/538727

Change 539157 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/crm@master] End of year summary: fix calculation

https://gerrit.wikimedia.org/r/539157

Change 538974 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] End of year summary template fixes

https://gerrit.wikimedia.org/r/538974

Change 539615 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/crm@master] End of year summary: add fn visibility

https://gerrit.wikimedia.org/r/539615

Change 539627 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/crm@master] Rewrite unused get_prefix fn for EOY email

https://gerrit.wikimedia.org/r/539627

Change 539639 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/crm@master] EOY summary: check later for missing config

https://gerrit.wikimedia.org/r/539639

Change 539640 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/crm@master] EOY summary: fix string extraction & test data

https://gerrit.wikimedia.org/r/539640

Change 539627 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Rewrite unused get_prefix fn for EOY email

https://gerrit.wikimedia.org/r/539627

Change 539639 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] EOY summary: check later for missing config

https://gerrit.wikimedia.org/r/539639

Change 539157 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] End of year summary: fix calculation

https://gerrit.wikimedia.org/r/539157

Change 539640 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] EOY summary: fix string extraction & test data

https://gerrit.wikimedia.org/r/539640

Change 539615 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] End of year summary: add fn visibility

https://gerrit.wikimedia.org/r/539615

Change 539940 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/crm@master] EOY summary: split calculation into two steps

https://gerrit.wikimedia.org/r/539940

Change 539971 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/crm@master] db_switcher - don't call get_prefix statically

https://gerrit.wikimedia.org/r/539971

Change 539971 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] db_switcher - don't call get_prefix statically

https://gerrit.wikimedia.org/r/539971

Change 540170 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/crm@master] End of year summary: output job ID after calculate

https://gerrit.wikimedia.org/r/540170

Change 539940 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] EOY summary: split calculation, include more donations

https://gerrit.wikimedia.org/r/539940

Change 540170 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] End of year summary: output job ID after calculate

https://gerrit.wikimedia.org/r/540170

Change 540468 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/crm@master] WIP End of year summary: add Civi activity

https://gerrit.wikimedia.org/r/540468

Hi @MBeat33 am I correct in understanding we will need translations for the languages listed in the table above?

That would be fantastic, @TSkaff. I do not know where the current TY email translations reside, but translators might be able to use them as starting points? If I can do anything to facilitate, please let me know.

Ejegg added a comment.Oct 15 2019, 1:57 PM

@TSkaff Maybe we could start with the languages with >1000 recurring donors first, then if time permits do another batch? 100 was a totally arbitrary choice to cut off that table of stats.

@MBeat33 @Ejegg I leave to you what you think the best way forward is--just a reminder that our current TY email tells donors:

"We will send you a summary each January of your contributions for the previous year."

... and that's translated in these languages.

I want to make sure we get this into Camille's work pipeline so she has time ... what do you think?

This comment was removed by DStrine.

@TSkaff @CDenes_WMF this should definitely be queued up for translation in all necessary languages. We're doing the work to put this out right now and the lack of translations shouldn't block that... but emails will start rolling out in January.

@spatton @Pcoombe @CCogdill_WMF @TSkaff

We got direction to start this while the email text was being drafted. Is that being worked on?

Yes. @CCogdill_WMF and I drafted copy today. We'll review, revise, share with a relevant group and finalize asap.

TSkaff added a comment.EditedOct 22 2019, 2:09 PM

@Ejegg @MBeat33 @spatton @CDenes_WMF @CCogdill_WMF

Hi all, can we confirm exactly what the format of the summary email will look like so we can alert Camille to add this the list of translation asks? Per your notes doc https://docs.google.com/document/d/1nLyIhGqRnQ8iOXCUWWvo0Socc_m_q9pdAEZ7gmC15Ns/edit , I see:

"Annual total at top, list each currency they gave in, separately

  • List gifts chronologically, irrespective of currency. Always show native amounts"

In this Phab ticket (toward the top) I see the following suggested format, but it doesn't seem to match the ^ notes--so could someone clarify for us how it will appear for the donor?

Summary of total "Your [YEAR] total was [CURRENCY] [AMOUNT]"
(blank line)
Donation 1 [AMOUNT] [CURRENCY] [DONATION DATE]
Donation 2 [AMOUNT] [CURRENCY] [DONATION DATE]
...

Many thanks,
Thea

Change 545668 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/crm@master] WIP align EOY template with DS proposal

https://gerrit.wikimedia.org/r/545668

Change 546286 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/crm@master] End of year summary: remove test mode

https://gerrit.wikimedia.org/r/546286

Change 546287 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/crm@master] End of year summary: Fix 'batch' param name

https://gerrit.wikimedia.org/r/546287

@Ejegg @CDenes_WMF @MBeat33 @DStrine

Hey all, pinging this--can anyone confirm for me/Camille whether it appear like so, so we can give her the green light on translations?

Summary of total "Your [YEAR] total was [CURRENCY] [AMOUNT]"
(blank line)
Donation 1 [AMOUNT] [CURRENCY] [DONATION DATE]
Donation 2 [AMOUNT] [CURRENCY] [DONATION DATE]

And will this appear like:
"Your 2018 total was USD $20"
or
"Your 2018 total was $20"

and

Donation 1 $20 1/1/2018

Thanks! Thea

Ejegg added a comment.Oct 28 2019, 4:52 PM

I interpreted @MBeat33's suggested text as using the 3 letter currency code and not the currency symbol. So here's an example of how it would render for someone who donated in two different currencies:

Dear Bob,
Thank you for your donations during 2018.

Your 2018 total was USD 70.
Your 2018 total was CAD 850.

Donation 1: 50 USD 2019-02-01
Donation 2: 800 CAD 2019-03-02
Donation 3: 20 USD 2019-05-03
Donation 4: 50 CAD 2019-10-20

DStrine updated the task description. (Show Details)Oct 28 2019, 5:06 PM

Official email copy is here:
https://docs.google.com/document/d/1iKbwcCMIqHgpJfNSluC0yMgASLL090uQp1tE81p38Tc/edit

I have also updated the description at the top to include this.

Change 546693 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/crm@master] Print Job ID when calculating summaries

https://gerrit.wikimedia.org/r/546693

Change 546693 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Print Job ID when calculating summaries

https://gerrit.wikimedia.org/r/546693

jgleeson added a subscriber: jgleeson.EditedOct 29 2019, 4:38 PM

Testing notes:

EOY Processing Range
For vagrant users please browse to http://crm.local.wmftest.net:8080/admin/config/wmf_eoy_receipt and set the Year To Process to 2019 which should pick up any test recurring donations recently made.

Twig template permission errors
I ran into the following when trying to run drush wmf-eoy-receipts -vvv

WD php: RuntimeException: Unable to write in the cache directory (/srv/org.wikimedia.civicrm-files/twig/cache/e0). in Twig_Cache_Filesystem->write() (line 61 [error] of /vagrant/srv/org.wikimedia.civicrm/vendor/twig/twig/lib/Twig/Cache/Filesystem.php)

It looks like www-data couldn't write to that directory so I updated the permissions using sudo chown -R www-data:vagrant /srv/org.wikimedia.civicrm-files/twig/ and it worked.

Change 545668 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] End of year summary: align templates with DS proposal

https://gerrit.wikimedia.org/r/545668

Change 546286 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] End of year summary: remove test mode

https://gerrit.wikimedia.org/r/546286

Change 546287 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] End of year summary: Fix 'batch' param name

https://gerrit.wikimedia.org/r/546287

Change 540468 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] End of year summary: add Civi activity

https://gerrit.wikimedia.org/r/540468

TSkaff added a comment.Nov 1 2019, 5:18 PM

Ok I think we're in agreement on final format, but how about a final sign off? @Ejegg @CDenes_WMF @CCogdill_WMF @MBeat33 @spatton

From:
Katherine Maher, Wikimedia Foundation

Subject line:
This is a receipt, but it's also so much more

Body Copy:
I am thrilled that this email to you is one of the first things on my to-do list in 2020. Granted, that to-do list is long--Wikipedia has so many amazing projects on the horizon--but thanking you is at the very top.

Your hard earned money pays our bills, runs our servers, and helps us recruit the world's smartest people to ensure that Wikipedia will always be a resilient, neutral source for learning.

Outside of those practical details, your donations are deeply meaningful to we who work to serve you. Your donations show us that our work matters, and is worth supporting. Thank you.

Here’s a summary of all the donations you made to the Wikimedia Foundation in 2018.

Summary of total:
Your 2018 total was USD 70.

If they donated in two + currencies, they'd also see something like:
Your 2018 total was CAD 850.

Donation 1 [AMOUNT] [CURRENCY] [DONATION DATE]
Donation 2 [AMOUNT] [CURRENCY] [DONATION DATE]

If for whatever reason you wish to cancel your monthly donation, follow these easy cancellation instructions.


To be extra clear, these will display as follows:
Donation 1: 50 USD 2019-02-01
Donation 2: 800 CAD 2019-03-02
Donation 3: 20 USD 2019-05-03
Donation 4: 50 CAD 2019-10-20

Thank you, @TSkaff this looks great. I like the text, and the chronological list of contributions.

The one loose end I see is making sure that the phrase "follow these easy cancellation instructions." points to https://donate.wikimedia.org/wiki/Cancel_or_change_recurring_giving

Change 548777 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/crm@master] EOY summary: independent from name/address from normal TY

https://gerrit.wikimedia.org/r/548777

Change 548778 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/crm@master] EOY summary: update text to match final copy

https://gerrit.wikimedia.org/r/548778

Change 548777 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] EOY summary: independent from name/address from normal TY

https://gerrit.wikimedia.org/r/548777

Change 548778 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] EOY summary: update text to match final copy

https://gerrit.wikimedia.org/r/548778

Ejegg added a comment.Nov 6 2019, 4:15 PM

OK, we've got the copy all set (including the cancel link). One funky thing we might want to do but haven't yet is to report all the dates in Hawaii time. We actually do this for the normal thank you emails so that people in that time zone who donate at 11 PM on Dec 31 still get credited for a donation in the current year.
@MBeat33 any opposition to us doing that?

Change 549931 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/crm@master] EOY summary: use Hawaii time zone

https://gerrit.wikimedia.org/r/549931

report all the dates in Hawaii time.

That's a cool ideal, @Ejegg and will likely reduce the # of requests we see for New Years donors to manually 'back date' their TY emails.

Change 549931 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] EOY summary: use Hawaii time zone

https://gerrit.wikimedia.org/r/549931

@Ejegg I just deployed the Hawaii time fix - not sure which column this should be in now

Ejegg closed this task as Resolved.Tue, Nov 19, 3:58 PM