Page MenuHomePhabricator

Civi "thank you letter summary" feature request
Closed, ResolvedPublic

Assigned To
Authored By
SHust
Jan 12 2022, 9:00 PM
Referenced Files
F58028558: image.png
Dec 18 2024, 8:03 PM
F57662372: image.png
Oct 31 2024, 6:32 AM
Restricted File
Oct 31 2024, 6:06 AM
F57660687: image.png
Oct 30 2024, 8:28 PM
F57660691: image.png
Oct 30 2024, 8:28 PM
F57519991: image.png
Sep 17 2024, 11:28 PM
F57519977: image.png
Sep 17 2024, 11:28 PM
F57519979: image.png
Sep 17 2024, 11:28 PM

Description

Is it possible for Civi to allow us any or all suggestions below, under actions ---> send annual thank you letter:

  1. Choose the entire donation history to be sent under one email.
  1. The ability to choose which months/year to send the donation summary (AU fiscal year is similar to the Foundation's so they request a certain date)
  1. The ability to add the full name to the summary receipt or maybe to choose the "full name" as an option before sending it to a donor?
  1. PDF receipt (Similar to the CDN Tax receipts extension in CiviCRM)

This would allow the DR team to send the various summary receipts donors request, from Civi, instead of having to do it manually which is extremely time-consuming. We currently find ourselves having to send the same donor multiple annual summaries since we can’t combine the years or choose them by month/year. In the US, as an additional example, donors request to have their full name in the receipt for tax purposes, and not having the ability to edit that in the actual summary email in Civi, makes us default to the ancient delegated inbox we hope to close soon. There's no rush and please let me know if additional information is needed. Thank you.

Event Timeline

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

Resurfacing this as a current DR ask - Asana thread copied below:

{F54247668}

We discussed this on a hangout just now - notes. For background we send out an email in the first week of January every year listing all donations made by recurring donors. (it includes all donations by those donors, recurring or otherwise). In the past we have made it possible for DR to send this out at any point during the year, on request, and to select the year to cover (but as of now each generated letter covers only one calendar year). This phab covers the request to make this ad hoc receipting feature more flexible but in the conversation we also discussed the main send.

At a high level

  1. @RLopez-WMF & @nisrael indicated that they could schedule improving the End Of Year email early November. This would generally bring the styling in line with the thank you email
  2. at this stage we are not aware of any intention to update the wording this year - @CDenes_WMF - may know more. But these ad hoc requests are low-volume so for the purposes of this phab we only need to focus on English iniitially and can probably simply omit the first paragraph and the reference to 'year' and the last 2 words in the second paragraph (see below) if being sent outside the context of the annual email run.

image.png (442×1 px, 127 KB)

  1. Given that the emails will be re-worked before the main send and will only be sent by DR until then I think we can add the full name into the last paragraph

ie this is now

image.png (426×1 px, 132 KB)

I have updated it to the below - note the sample contact has some weird characters in their name - hence it looks odd

image.png (442×1 px, 133 KB)

  1. some consideration needs to be given to how the pdf should look.
  1. this didn't come up as a priority but just noting that since Australians seem to ask for these receipts at the end of their financial year the summing up in totals by calendar year feels a bit odd. Perhaps it makes sense to note the fiscal year

Fr-tech todo

  1. update it to show the full name if present as an interim - @SHust - I made this change - for English only - using this code
{if '{contact.first_name|boolean}' && '{contact.last_name|boolean}'}{contact.first_name} {contact.last_name}, this{else}This{/if}
  1. update the UI to accept date ranges, develop a template variable for when this is enabled & add those if's to the English template
  1. investigate sending pdfs - I think there is a bit of a gotcha on the fr-tech side in that we use a mail library different to the one that ships with core to send the smtp server headers as a list rather than a single (ie with fall back) whereas the core one has the attachment handling so some under the hood work there.
  1. I might take a look at why that demo data renders oddly

Thank you Eileen. Just to be clear-- no action is needed from Localization for non-English versions?

@CDenes_WMF assuming you are not planning on changing the text this year I don't think we need any localization at this point

Change #1083908 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Latest eoy text from prod

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

Change #1083927 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Formatting only

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

Change #1083928 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Superficial clean up

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

Change #1083929 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Superficial clean up

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

Change #1083930 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Superficial clean up

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

Change #1083927 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Formatting only

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

Change #1083928 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Superficial clean up

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

Change #1083929 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Superficial clean up

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

Change #1083930 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Superficial clean up

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

Change #1083908 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Latest eoy text from prod

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

Change #1084305 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Update form to support flexible date ranges

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

OK - we have code ready to push out very soon - we do need to check in on translation

@SHust initially indicated that they have enough in-house translation to deal with the languages DR

Here is the original text - note the start of the first paragraph & the end of the second paragraph never worked well except for the previous year

image.png (576×556 px, 110 KB)

It only really worked

Here is the updated text in English when the date range is anything other than last year

image.png (558×473 px, 108 KB)

These are the 2 relevant bits of code

{if $year}This past year, we’ve {else}We've {/if}
{if $year}in {$year}
{elseif isShowStartAndEndDates}
  {* Using the format 'full' gives the 'full' date but not the default DateTime - which could be time-zone-confusing *}
  {if $startDateTime && $endDateTime}
  between {$startDateTime|crmDate:"Full"} and {$endDateTime|crmDate:"Full"}
  {elseif $startDateTime}
  since {$startDateTime|crmDate:"Full"}
  {elseif $endDateTime}
  before {$endDateTime|crmDate:"Full"}
  {/if}
{/if}

Contact: Preferred Language (Count) Activity ID
Catalan; Valencian 1
Czech 2
Dutch (Belgium) 6
Dutch (Netherlands) 6
English (Australia) 26
English (Canada) 61
English (India) 6
English (New Zealand) 8
English (United Kingdom) 11
English (United States) 248
French (Canada) 4
French (France) 50
German (Germany) 2
Hebrew (modern) 9
Italian (Italy) 15
Japanese 7
Polish (Poland) 3
Spanish; Spain 2
Zulu 5

@CDenes_WMF I discussed handling translation with @SHust and we have a short-term fix that will unblock this but there is a medium term consideration for you.

The current text was written specifically for the situation when we send out a receipt in early January for the donations in the previous year. However, DR currently on occasion send out emails that cover the current year, or a year prior to the previous year. This list shows the break down of these by country since Feb this year.

Paragraph 1
The first few words of the paragraph 1 don't make sense in this on-request context when the year is not the current year- ie

"This past year, we've kept track of"

For the context of this ticket we have changed the English version only - as this clunkiness is not really made worse by the change in this phab - ie this shows how it looks if sending a letter today for 2023 or 2022

Before this phab 2023"This past year, we've kept track of"
Before this phab - 2022"This past year, we've kept track of"
Post phab changes 2023)"This past year, we've kept track of"
Post phab changes 2022"We've kept track of"

"We've kept track of"

{if $year}This past year, we’ve {else}We've {/if}

Paragraph 2
Paragraph 2 looks pretty weird if the date range is not a specific year because the 'in 2023'' doesn't make sense if we are covering 6-Jun-2022-25-April-2023. Hence the changes in this phab make the letter worse, unless we do something.

I agreed with @SHust that as a short term fix we would use the changes for English to express the date range per the screenshot above. But, for all other languages we will just suppress the whole paragraph. This is something I think I can do fairly quickly, even for languages I can't read . However, in the medium term 'someone' needs to either better fix the translations or agree that leaving the paragraph out is a reasonable approach for on-demand email summaries. I think that lives with you or someone you can identify @CDenes_WMF

Nothing in this affects the generated emails we send on the first week in January and with the changes above we are not blocked on implementing this right now for the low volume of these that are going out at this time of the year

Finally - the preview UI has some more examples in the drop down to help coders

{F57662256}

Change #1084305 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Update form to support flexible date ranges

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

@SHust I have deployed the code and made the changes discussed - this should be good to go - with the proviso that there is probably some follow up work on improving the translations in the future

@CDenes_WMF While working through the updates I noted that the Hungarian version of the email is missing some text compared to the others - ie there is only one paragraph, not 2

image.png (661×1 px, 109 KB)

Thanks, @Eileenmcnaughton!
@CDenes_WMF, the DR would be happy to help with PT, SP, JP, FR, DE, and IT translations.

AKanji-WMF added subscribers: ppenloglou, TomaszGorski.

@Eileenmcnaughton: @ppenloglou, @TomaszGorski, @SHust and I met to talk about the localized versions of this on-demand receipt today - a question we had is: is the code you developed to create an on-demand send pulling from the system flow templates, or somewhere else where you have created a custom template?

If it's the former, then (I think) we can go ahead and update the required translations.

The on demand receipt uses the same work flow templates as the end of year send - you can see in the preview that there are options for the date range - although only the English one does something with all the variants

image.png (498×881 px, 66 KB)

Hello everyone,

Thank you Anil and Eileen.

I've tried for French-France to incorporate the code in the second paragraph, as indicated by Eileen on "Oct 30 2024, 8:32 PM". The problem is the months are in English and anyways it would take quite a lot of time and effort to translate all dates possibilities across many languages.

May I propose to use this date format instead: "crmDate:"%d-%m-%Y". It has been done this way on the French-France copy that you can check here.

If y'all agree, I can update ALL the existing languages this way for both:

  1. The beginning of the first sentence in the first paragraph: {if $year}This past year, we’ve {else}We've {/if}
  1. And the end of the second paragraph with:

{if $year}in {$year}
{elseif isShowStartAndEndDates}

{* Using the format 'numeric' gives a clearer simpler date across languages *}
{if $startDateTime && $endDateTime}
between {$startDateTime|crmDate:"%d-%m-%Y"} and {$endDateTime|crmDate:"%d-%m-%Y"}
{elseif $startDateTime}
since {$startDateTime|crmDate:"%d-%m-%Y"}
{elseif $endDateTime}
before {$endDateTime|crmDate:"%d-%m-%Y"}
{/if}

{/if}

  1. @SHust, suggestion if you agree: can I reach out to DR for five languages you mentioned during the meeting (Japanese, German, Spanish, Portuguese and Italian) in order to do a quick proofread on the two-three words that need tweaking for the date range template.
  1. @Eileenmcnaughton In regards to your question related to Hungarian, we skipped putting the second paragraph in this language due to strong negative feedback from our contacts in the Hungarian chapter. However, the paragraph is translated and I do have the last sentence that needs tweaking available and can add it to the date range template (not the end of year one so it's gonna be a slightly different "if" statement).

@TomaszGorski, thanks for the simplified solution. I agree with the changes you proposed.
Thank you all for your collaboration on improving the TY letters and enabling summary sending, which will greatly streamline the TY summary process for the DR team!

Hello everyone, all the non English End of Year receipts have been updated accordingly, with Eileen's code, and DR suggestions. Slight change based on @krobinson feedback, the dates format is YYYY-MM-DD (%Y-%m-%d). Should this be adapted in specific languages, let me know. Have a good day y'all, Tomasz

@TomaszGorski - thanks for clarifying re Hungarian - I thought it was an oversight but it was clearly on purpose

Change #1108505 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Remove deprecated unused function

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

Change #1108505 abandoned by Eileen:

[wikimedia/fundraising/crm@master] Remove deprecated unused function

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

Change #1108509 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Remove thank you test function

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

Change #1108517 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Superficial cleanup

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

Change #1108518 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Remove deprecated function

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

Change #1108530 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Type hint fix

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

Change #1108531 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Update Thankyou.send action to require less parameters

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

Change #1108509 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Remove thank you test function

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

Change #1108517 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Superficial cleanup

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

Change #1108518 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Remove deprecated function

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

Change #1108856 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Follow up removal of drush test fn

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

Change #1108857 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Remove phpmailer from composer.json

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

Change #1108856 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Follow up removal of drush test fn

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

Change #1108870 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Simplify thank you code in RecurringQueueConsumer

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

Change #1108871 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Fold thank_you_send back into only caller

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

Change #1108872 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Update function signature to reflect callers

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

Change #1108873 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Consolidate handling of contributionID

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

Change #1108530 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Type hint fix

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

Change #1108531 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Update Thankyou.send action to require less parameters

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

Change #1108857 abandoned by Eileen:

[wikimedia/fundraising/crm@master] Remove phpmailer from composer.json

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

XenoRyet changed Final Story Points from 4 to 8.

Change #1108872 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Update function signature to reflect callers

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

Change #1108870 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Simplify thank you code in RecurringQueueConsumer

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

Change #1108871 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Fold thank_you_send back into only caller

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

Change #1108872 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Update function signature to reflect callers

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

Change #1108873 merged by Eileen:

[wikimedia/fundraising/crm@master] Consolidate handling of contributionID

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