Page MenuHomePhabricator

Currency code/currency symbol in Thank You emails received by Donors issues
Closed, ResolvedPublic8 Estimated Story Points

Assigned To
Authored By
TomaszGorski
May 26 2022, 7:39 PM
Referenced Files
Unknown Object (File)
Jul 12 2023, 2:23 PM
Unknown Object (File)
Jul 12 2023, 2:23 PM
Unknown Object (File)
Jul 12 2023, 2:23 PM
Unknown Object (File)
Jul 12 2023, 2:23 PM
Unknown Object (File)
Jul 12 2023, 2:23 PM
Unknown Object (File)
Jul 12 2023, 2:09 PM
Unknown Object (File)
Jul 12 2023, 2:09 PM
Unknown Object (File)
Jul 12 2023, 2:09 PM

Description

Hello @Eileenmcnaughton,

This is based on Donor Relations feedback on multiple donors across different countries, currencies and languages for the Thank You emails:

1. What is excepted to be seen in the Thank You emails is:

  • In the First sentence for Recurring donors and One Time donors: currency symbol (with clarifying letter(s) if that is possible technically):

"{if $recurring} </p>Thank you for committing to give {if $currency === 'USD'}{$currency} {/if}{$amount} to support Wikipedia every month - that is real dedication and I am endlessly grateful. You make a world where knowledge is free for everyone possible.</p>"

"<p>Thank you so much for donating {if $currency === 'USD'}{$currency} {/if}{$amount} to support Wikipedia and a world where knowledge is free for everyone.</p>"

  • Footer: the currency code/ISO code (three letters), this will be helpful for reporting needs as well as avoid DR agents confusion, and can avoid possible donors' confusion

"<p>For your records: Your donation, number {$transaction_id}, on {$receive_date} was {if $currency === 'USD'}{$currency} {/if}{$amount}.</p>"

  • Confirming that across all template languages in CiviCRM, it is everywhere put in the same exact format: {if $currency === 'USD'}{$currency} {/if}{$amount}

2. What is currently being seen:

  • India - English - (CID 1064183): the currency symbol is appearing as ₹ in both sentence and footer instead of ₹/INR;
  • Brazil - Portuguese Brazil - (CID 21087028): the currency symbol is appearing as R$ in both sentence and footer instead of R$/BRL;
  • Brazil - Portuguese Brazil - (CID 28002679): the currency is displayed twice "USD US$" in both sentence and footer instead of $/USD;
  • Chile - Spanish LATAM - (CID 20659495): the currency is displayed as CLP in both sentence and footer instead of CL$/CLP;
  • Colombia - Spanish LATAM - (CID 15411397): the currency is displayed as COP in both sentence and footer instead of CO$/COP;
  • Mexico - Spanish LATAM - (CID 54993189): the currency is displayed as $ in both sentence and footer instead of MX$/MXN;
  • Argentina - Spanish LATAM - (CID 51076588): the currency is displayed as ARS in both sentence and footer instead of AR$/ARS;
  • Canada - English - (CID 4085850): the currency is displayed as $ in both sentence and footer instead of CA$/CAD;
  • Canada 2nd example - French - (CID 48212245): the currency is displayed as $ in both sentence and footer instead of CA$/CAD;
  • Australia - English - : the currency is displayed as A$ (CID 39113005) OR $ (CID 54984126) in both sentence and footer instead of AU$/AUD;
  • South Africa - English - : the currency is displayed as R (CID 54987469) with the amount format 1.455,90 OR the currency is displayed as ZAR (CID 54986573) with the amount format 1,455.90 (wrong amount format) in both sentence and footer instead of R/ZAR;

Can you please advise?

Event Timeline

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

@tomasz I'll look more carefully next week but on a general level

  • if there are cases where you ALWAYS want the iso code then you can add {$currencyCode}
  • if there are cases where you want it UNLESS you can do {if $currency !== 'USD'}{$currency} {/if}{$amount}
  • if there are cases where you want it IF you can do {if $currency === 'USD'}{$currency} {/if}{$amount}

The last 2 can also use an array - ie {if in_array($currency, array('USD', 'CAD'))} {/if}

Side note - on Australia the Wikipedia page says that either $A or $Au is standard - https://en.wikipedia.org/wiki/Australian_dollar#:~:text=Within%20Australia%2C%20it%20is%20almost,is%20subdivided%20into%20100%20cents.&text=Reserve%20Bank%20of%20Australia%2C%20March%202022.

Thanks for opening this one up, Tomasz!

@Eileenmcnaughton thank you for the tips.

Just to underscore urgency, could we please prioritise this as high, as we are having to reconfirm donation amounts to Mexican donors in particular who are worried the donation processed in USD, and looking each of these up in Civi doesn't really scale.

Ideally DR agents (and donors) need to be able to know at a glance at the TY receipt what currency the donation processed in, and this is leading to a lot of extra work for my team. Thank you!

Hello @Eileenmcnaughton, thank you so much for looking into it. If I understand your advice, there seems to be several things here:

1. Footer with currency ISO code (seems like the most urgent part as it would help making sure of the currency):

Do we understand correctly that we should replace what is in the footer "<p>For your records: Your donation, number {$transaction_id}, on {$receive_date} was {if $currency === 'USD'}{$currency} {/if}{$amount}.</p>" with "<p>For your records: Your donation, number {$transaction_id}, on {$receive_date} was {$currencyCode}{$amount}.</p>" across all languages if we want to have the three digits ISO code displayed systematically in the footer;

Can you please advise?

2. First Sentence when currency symbol can be $: so the currency symbol $ on its own can be commonly shared between different currencies that can also have several standard accepted alternatives (ie. standard currency symbol for AUD can be $, A$ or AU$ like you mentioned in the sidenote, for MXN it can be $ , MX$, or Mex$, for CAD it can be $, Can$, C$, CA$ or CAD, Wikipedia article on Currency Symbol where the full list can be found),

From what I understood from this phabtask, the currency symbol/amount have their formatting based on Civi Brick Money. This formatting might vary based on language_country (per your currency formatting spreadsheet).

So, if I understand correctly, we would expect to see one type of formatting per language_country. However, this doesn't seem to be happening based off this below example (maybe DR have encountered other examples with COP being displayed C$ or COP, CLP being displayed C$ or CLP, ARS being displayed A$ or ARS, for different donors, etc.):

  • Australia - English - : the currency is displayed as A$ (CID 39113005) OR $ (CID 54984126);

3. Currency R/ZAR displayed as currency symbol or currency code with different amount format:

  • South Africa - English - : the currency is displayed as R (CID 54987469) with the amount format 1.455,90 OR the currency is displayed as ZAR (CID 54986573) with the amount format 1,455.90 (wrong amount format);

4. Currency displayed twice for USD donation in Brazil:

  • Brazil - Portuguese Brazil - (CID 28002679): the currency is displayed twice "USD US$" in both sentence and footer;

Thank you!

Assuming this is about FR-AutoTY-Email - please set project tags so tasks show up on workboards; thanks!

-So on 1 - yes the currency code will ALWAYS be there if you replace

{if $currency === 'USD'}{$currency} {/if}

with {$currency}

In some cases that will result in the double code you mention - but, at least in the footer, that seems less bad than it not being there in some cases when you need it

So, if I understand correctly, we would expect to see one type of formatting per language_country.

Yes - that should be correct - I will dig into those

3 - seems the same - I'm wondering if there is some currency leakage with that example & in above - I will look to see if that is what is happening

Currency displayed twice for USD donation in Brazil:

So this is where it makes less sense to include {if $currency === 'USD'}{$currency} {/if} in some languages - because it has already added if for the Portugeuse-US combo

I will pull this into the sprint now so I can work on it tomorrow

Hi there, jumping in on this ticket. We would like to make sure that the opening line of TY emails include the currency ISO code alongside the $ sign, to avoid confusion between currencies that use the same symbol. I believe this is related to item 2. in Tomasz' comment from May 27.

Currently, the first line of the email only shows the currency symbol and not the ISO code, while the footer contains the ISO code but is easily missed by donors.

Examples below:
Donor CID 12448774 / ZD 1184054 donated in NZD but in the TY email first line it just shows as $.
First line: Thank you so much for the one-time gift of $26.00 to support Wikipedia and a world where knowledge is free for everyone.
Footer: For your records: Your donation, number CNTCT-12448774, on 2022-10-04 was $26.00 (NZD)

CID 53977571 / ZD 1184079
First line: Thank you so much for the one-time gift of $15.60 to support Wikipedia and a world where knowledge is free for everyone.
Footer: For your records: Your donation, number CNTCT-53977571, on 2022-10-04 was $15.60 (AUD)

greg lowered the priority of this task from High to Medium.Feb 14 2023, 9:22 PM
greg moved this task from DRI Backlog to Triage on the Fundraising-Backlog board.

Hi there! I believe this task is currently in a sprint. As this is related we just wanted to add a few notes on similar currency issues on the endowment receipts as well that we have noticed this week. We didn't review all countries but below are a few we noted.

Donations in CAD doesn't include an ISO code at the top or bottom of the receipt. Below is Zendesk ticket #1303431/CID 39185242:
First line: Thank you for donating $50.00 to support Wikipedia and a future where knowledge is free for everyone.
Footer: For your records: Your donation, number CNTCT-39185242, on 2023-04-17 was $50.00

Donations in AUD doesn't include an ISO code at the top or bottom of the receipt. Below is Zendesk ticket #1303553/CID 17462756:
First line: Thank you for donating $5.35 to support Wikipedia and a future where knowledge is free for everyone.
Footer: For your records: Your donation, number CNTCT-17462756, on 2023-04-17 was $5.35

Donations in NZD doesn't include an ISO code at the top or bottom of the receipt. Below is Zendesk ticket #1303559/CID 30451387:
First line: Thank you for donating $20.80 to support Wikipedia and a future where knowledge is free for everyone.
Footer: For your records: Your donation, number CNTCT-1360973, on 2023-04-17 was $20.80

Donations in USD does include an ISO code at the bottom of the receipt. Below is Zendesk ticket #1303681/CID 53168009:
First line: Thank you for donating $10.00 to support Wikipedia and a future where knowledge is free for everyone.
Footer: For your records: Your donation, number CNTCT-53168009, on 2023-04-17 was USD $10.00

Thanks!

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

[wikimedia/fundraising/crm@master] Copy live template back to our local

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

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

[wikimedia/fundraising/crm@master] Add test for Render code

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

Change 917429 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Copy live template back to our local

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

Change 917961 abandoned by Eileen:

[wikimedia/fundraising/crm@master] Add test for Render code

Reason:

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

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

[wikimedia/fundraising/crm@master] Thank you preview - do not assign trxn_id

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

Hi all, @Eileenmcnaughton and I met earlier for a briefing. 

I have examined all receipts today and can confirm every receipt currently now has the ISO currency code contained in the footer. If an ISO code was missing from the footer before, as raised above in this Phab, I can confirm it is now appearing in receipts. Thanks for your recent efforts here, Eileen. I know it has been tricky to attain receipt consistency with the templates, libraries, and the like.

From a DR perspective, having the ISO code in every footer now is helpful and is enough for us to solve a ticket. Over the past year when it has not been in either the footer nor in the top line, lookup in Civi has been required in order for us to solve the compulsory 'Country' field of a Zendesk ticket which can slow us down. ISO codes previously appearing in the top line of the receipt were always a bonus when solving tickets, and I note other teams here in this Phab would be keen to see their return, if possible.

Along with some random European currency spot checking, I can confirm this is what I am seeing in receipts today:

ENDOWMENT receipts - 'A thank you note from Lisa, President of the Wikimedia Endowment'

CurrencyTopFooter
USDN Y
CADN Y
GBPN Y
AUDY
NZDN Y
EURNY

ANNUAL FUND receipts (one-time) - 'Thank you for your gift'

CurrencyTopFooter
USDYY
CADN Y
GBPN Y
AUDY
NZDN Y
EURNY
RONYY
CZKYY
NOKYY
DKKY

ANNUAL FUND receipts (recurring) - 'Thank you for your gift'

CurrencyTopFooter
USDYY
CADN Y
GBPN Y
AUDY
NZDN Y
EURNY
RONYY
CZKYY
NOKYY
DKKY
HUFYY

ANNUAL FUND receipts (monthly conversion) - 'Your recurring gift helps us achieve so much'

CurrencyTopFooter
USDYY
CADN Y
GBPN Y
AUDY
NZDN Y
EURNY
NOKYY
DKKY
SEKYY

*Please note, this is not an exhaustive assessment. Other currencies and other language receipts will need a review by someone.

Change 928172 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Thank you preview - do not assign trxn_id

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

Current status is as Kristine documented - however it is displaying differently between the message template preview and the thank you preview / send around (e.g NZ$6) - I am going to try to address this when I am with Tim in SF

Just wanted to flag a thank you letter that came in this afternoon. It looks like the thank you letters in Portuguese when donors donate in USD (via PayPal) are displaying the currency a few different times as "USD US$" in the top line of the receipt and the footer is noted as "USD US$ 10,00 (USD)". Example is > CID 31734158 / Zendesk ticket 1318911

Including screenshots of both lines from the receipt too incase I didn't explain well. :)

PT TY letter 1.png (37×745 px, 11 KB)

PT TY letter 2.png (46×810 px, 10 KB)

So the reason the Portuguese is showing USD twice is that advice I gave earlier about how to ensure the USD is rendered in English emails got generalised to all languages. I have added a section to our fr-tech documentation here to cover it - https://wikitech.wikimedia.org/wiki/Fundraising/Internal-facing/CiviCRM#Money_formatting_in_emails

I've also updated the Portuguese from

image.png (175×1 px, 77 KB)

to

image.png (175×1 px, 67 KB)

However, there are many templates with this pattern and I guess I need to connect with @TomaszGorski on this. Which is around about where I'm up to but I have been fixing some inconsistencies in the code that were confusing things. The last of these should be fixed when we deploy the next CiviCRM regular update (T341101) - which fixes the issue were someone with a preferred language of Canadian English would get different currency rendering than someone with US English. Although this seems sensible on one level it makes the template too unpredictable. I went through this with Tim in my pre-offsite CiviSprint & have the fix, I just need to get it deployed

On another note

I know your macros use the iso_code - so if there is a chance it might be missingthere is an option variables for your macros down in the commented section - ie change

<!-- TI_BEGIN["version":1,"name":"thank_you.pt.html","revision":20210319]TI_END -->
<!-- TI_BEGIN["version":1,"name":"thank_you.pt.html","revision":20210319,"currency":"{$currency}"]TI_END -->

Hello Eileen, thank you so much. I've checked with a couple of Thank you emails in Portuguese (Portugal) and got the currency format in a format as per explanations below (my screenshots are not working correctly):

1,40 € in first sentence and footer,
40,00 MX$ in first sentence and footer,
1,75 US$ in first sentence and footer

  1. Question: Do I understand correctly that for all non English CiviCRM templates, those two actions should be taken:

a. Replace {if $currency === 'USD'}{$currency} {/if}{$amount} with {$amount} in both first sentence and footer;
b. Replace <!-- TI_BEGIN["version":1,"name":"thank_you.pt.html","revision":20210319]TI_END --> with <!-- TI_BEGIN["version":1,"name":"thank_you.pt.html","revision":20210319,"currency":"{$currency}"]TI_END -->

  1. Comment: For English (Standard) templates, it is {if $currency === 'USD'}{$currency} {/if}{$amount} in the first sentence and {$amount} ({$currency}) in the footer.

When trying around the Civi records that are in the Description of this phabtask, I could notice that if I change language to Portuguese (Portugal), the currency formatting seemed to be better/fixed.

Example (Canada - English (Canada) - (CID 4085850): the currency is displayed as $ in both sentence and footer instead of CA$/CAD): going in Contributions -> Send Thank you -> Message Preview, the formatting of currency is $ in the first sentence and $5.35 (CAD) in the footer
In the Profile Summary, switching the Preferred Language to Portuguese (Portugal), the formatting is CA$ in the first sentence and the footer (see both screenshots).

$5.35 in first sentence and $5.35 (CAD) in footer in the English Version
5,35 CA$ in first sentence and footer in the Portuguese (Portugal) Version

@TomaszGorski for some reason none of your screenshots display for me :-(

To your later point : ie "Contributions -> Send Thank you -> Message Preview" showing '$ in both sentence and footer instead of CA$/CAD' - this is currently inconsistent, depending on whether the person's language is US English or Canadian English. However once tomorrow's point version goes out it should always treat the language as English (United States) if usint the English (United States) template and show CA$

Once tomorrow's release goes out it should be less confusing!

On your specific points

1a) yes {if $currency === 'USD'}{$currency} {/if}{$amount} with {$amount} is only really applicable to 'English (United States)' template (which is what we use for all English language emails). It might be necessary to use a variant of this for some other languages - eg. in the Norwegian template {if $currency === 'NOK'}{$currency} {/if}{$amount} with {$amount} might be helpful to ensure it is clear what sort of KR it is??

1b) yes - putting currency consistently in the hidden html comment block in the footer will ensure it is always present for DR to filter on but not visible to users. Note there are 2 existing values in that comment block. name & revision. We loosely track which thank you & which revision thank you email donors got. However, I note that the templates have been updated many times without these being updated & no-one noticed .... Up to you if you want to update the revision to a more current value since it's probably more correct to do so but also refer my point about no-one noticing it hasn't been updated in 2 years.

  1. I guess we should check with DR - @KHancock99 & @krobinson - if we are consistently showing $CA for Canadian currency and we have included CAD in the hidden html part for email filtering and matro purposes - do we still want $CA 5.00 (CAD) in the footer or just $CA 5.00 in the footer. If the latter we should use the same code as in the earlier part

Just a note that there is still another patch that needs to go out before the confusion abates

Hello @Eileenmcnaughton,

Thank you, my screenshots seem to be unsharable after multiple attempts, so I updated my previous comment and just literally described what I could see in the Thank you emails.

1a) {$amount} has been updated in all non English languages for the Thank you emails as well as for the Monthly Convert ones.

1b) I've updated the comment block to include "currency":"{$currency}" for the Thank you emails as well as for the Monthly Convert ones.

1b) Comment about the comment block: moving forward, @NNgu-WMF and I will be updating the revision date each time there's a significant change to the thank you and monthly convert templates.

Ok so this is hopefully done - but maybe @KHancock99 can do some review to confirm.

All the patches are now deployed & the updates above are made per @TomaszGorski 's comment

There is still an open question (perhaps for another ticket) as to whehter DR would like country in the comment block too for filtering purposes

Hi @Eileenmcnaughton ,

Thank you for applying the tweaks to the Canada receipt.

I now see CA$10.40 in the topper, and CA$10.40 (CAD) in the footer. Comprehensive!

The footer: We do not view the country in the footer as being imperative here. The three digit CAD currency code in the footer on it's own is ideal. Or, if I am reading this thread correctly and this is not possible, then just $CA 10.40 in the footer as you earlier suggested serves both donor and DR well.

Thank you.

@KHancock99 I think we need some definitions here.....

  • topper = the first place the amount shows
  • footer = the second place the amount shows
  • comment block = a bit of html that is not visible but can include additional information. This can be used for macros / filtering within email.

So the question is about the comment block rather than the footer now.
Tomasz has ensured the comment block now has the ISO code - so regardless of whether (eg.) CAD is visually available it is is available to the email filtering process. On the recurring template we added the preferred language to a bit of text in the footer for donor relations.

So I guess the point is more to surface that we could add additional information to the comment block, if it is useful to you, which would not be visible. It might be more something to think about & create a new phab if you want something added.

XenoRyet set Final Story Points to 8.