Page MenuHomePhabricator

Civi: create annual $ summary TY email button
Closed, ResolvedPublic

Description

This might piggyback on T195907: Annual totals receipt thank you email for recurring donors. Donor Services spends a lot of time manually sending annual donation summaries from a delegated Gmail account.

A button similar to the existing Send Receipt? Automatically email a receipt for this payment to (donor) button that would send a summary email of all a given CID's donations in a specifiable calendar year or date range would be a giant boost to productivity.

Event Timeline

Ideally this would be a list of donations + a summary:

"Your 2018 total was $30.00 USD

June 1, 2018 $15.00 USD
September 1, 2018 $15.00 USD"

If the Civi interface had the capacity to specify start and end dates, with maybe a default for the past calendar year, that would be great, as would the capacity to tally recurrings and one-times.

So I was thinking the format could be like:

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

If the lines itemizing the individual donations could include both recurring and one-time donations, and in chronological order, it would be very helpful. Otherwise Donor Services will get a lot of manual receipt requests for the one-offs.

One complication, it's not unheard of for donors to donate in multiple currencies in a given year. What would the easiest way be to summarize donations in multiple currencies?

a) Maybe the currencies could be stacked in the above format:

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

Line1: Summary of total "Your [YEAR] total was [CURRENCY2] [AMOUNT]"
(blank line)
Line3: Donation 1 [AMOUNT] [CURRENCY2] [DONATION DATE]
Line4: Donation 2 [AMOUNT] [CURRENCY2] [DONATION DATE]

b) If we use a variant that totals all the donations into one summary Line1, and if that currency is USD, we might possibly get pushback as being US-centric. Not sure, just putting it on the radar.

I'll add this to T195907: Annual totals receipt thank you email for recurring donors as well.

In the interests of using the same template for the automated email and the on-demand email, the idea would be to implement this button using the wmf_eoy_receipt code. Once Civi core has better multilingual messaging we can look at moving templates for both into a real Civi extension.

@spatton @CCogdill_WMF could we get final copy for this email? I imagine it should be just like the recurring TY end of year copy.

@Eileenmcnaughton @Ejegg Here are my notes for this task and what I'm working to. Could you sanity check them in case there's an easier way to achieve the same thing? Thanks in advance!

https://etherpad.wikimedia.org/p/adfasdfadsf-notes

Thoughts:

  • Add new CiviCRM extension which adds new link 'Send Annual Thank You Receipt' to Actions on the Contact record
  • Link opens modal webform confirming contact details to receive email and allows selection of target period for EOY receipt to be sent.
  • Display a list of any previously sent EOY emails for contact at the top to avoid duplicates

Notes:

  • Need to edit Drupal wmf_eoy_receipt module to save target_year and allow a contact_id argument to be passed to allow specific eoy_emails to be sent. Add unit tests also.
  • checkout Eileen's email extender thingy for how to add buttons/actions.

19:47 <eileen> jgleeson: if you search for dedupetools_civicrm_summaryActions you will find the code that adds to this drop-down https://usercontent.irccloud-cdn.com/file/ECBibuQd/Screen%20Shot%202019-11-08%20at%208.47.34%20AM.png
19:48 <eileen> since it's a 'contact wide' action I think that makes sense. You can also add to search actions but I'm not sure they do it on sets

@jgleeson so what strikes me is you are thinking about more UI than I had imagined. I really just imagined an option to send last year's summary and a confirm yes/ no modal. I don't know what the requirements are though from @MBeat33 - the code you are hoping to re-use might not give the flexibility of selectable dates without re-work though.

Yeah, for a first version, I think just sending a year rollup will be good enough. I thought we would want a year dropdown, but it would probably be fine just to send the previous year's.

@MBeat33 @DStrine How do we want to handle donors who have not donated in the previous year? We currently have no handling for this because we were only sending to donors who had made a recurring contribution.

@mepps If donors have made neither one time nor recurrings, could Civi just show a 'no contribs in date range' message?

we were only sending to donors who had made a recurring contribution.

I'm not sure I understand, will this feature only work for recurring donations?

Hey all

So the new code we're adding will let users send a yearly receipt to a single donor and the receipt email will contain a summary of all donations made including both one-off and recurring donations.

we were only sending to donors who had made a recurring contribution.

I'm not sure I understand, will this feature only work for recurring donations?

@mepps is pointing out here that the current code only sends end of year receipts to donors who've previously donated via a recurring donation and I guess we want to confirm that you're happy for this behaviour to change only when you trigger an end of year receipt to be sent for a single donor.