Page MenuHomePhabricator

Donor Portal Operational Emails
Closed, ResolvedPublic

Description

To improve supporter experience, the Donor Portal needs to trigger several operational emails to affirm to a supporter that an action has taken place, and provide them an email record.

image.png (672×1 px, 134 KB)

[the above map and associated email copy in English can be found here]

FR-Tech had reservations about the volume of emails and translations that would be required to maintain. Since then, the Donor Portal team has tried to:
a) limit the number and types of transactional emails required and
b) slow down the localization rollout plan to focus on English for this year.

In our conversation, we talked about the Message Templates UI and admin - could we build out a skeleton of message templates that the Fundraising team could use and administer? As per @Lars, we could potentially categorize the messages and then make it possible to filter by category (so only show donor portal messages, etc).

Lars also mentioned a discussion in Tech Talk with Coleman for future work by the Civi Core team. If they could functionality to group by searchdisplay, then we can convert the message templates admin page to searchkit and it would be a lot less overwhelming with only one entry per message instead of one per translation.

Noting these messages would have to live and be maintained within the ecosystem of our operational emails: Message Template Emails h/t @Cstone

We tested downgrading our recurring donations and did not receive an email. Are these in production? Live? We are entering QA for this on the portal and would like to be able to test it.

Related Objects

Event Timeline

Scoping work/reassessed need: transactional messaging without any marketing/solicitation message, one email per session, not per action, and text-first, low-design, low-change templates so we have optimized for So we optimize for few templates, reusable variables and stable phrasing.

Template Architecture (future-proofing for translation and reducing variables)
Email Structure (locked)

Subject line (fully standardized) "Your Wikimedia preferences have been changed."

Single-paragraph confirmation

Bullet summary of the change

Support link (no solicitation)

Footer (static, reused across all ops emails)

No greetings. No closings. Just facts.

EXAMPLE “Donation Change” (English source)

Subject: Your Wikimedia preference has been updated

This email confirms that you updated your preferences through the Wikimedia donor portal.

Summary of changes

Previous amount: {{old_amount}}

New amount: {{new_amount}}

Effective date: {{effective_date}}

No further action is required.

If you did not make this change (support link)

AKanji-WMF added a subscriber: Ejegg.

@Ejegg proposes a skeleton of a message template - that can pull in variables depending on type of update. Give it examples of token data for before and after to enable testing + logic.

If we are doing a conditional for the content already, it would add minimal additional complexity to also make the subject conditional (Your Wikimedia donation has been paused / cancelled / restarted / updated, where updated covers all the other cases). Feels a lot more donor friendly.

If it is a light lift, I love this feature

Ejegg triaged this task as Medium priority.
Ejegg moved this task from Backlog to Doing on the Fundraising Sprint: Dami's Crib 😀 board.

Change #1244138 had a related patch set uploaded (by Ejegg; author: Ejegg):

[wikimedia/fundraising/crm@master] WIP All-purpose Donor Portal message template

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

@PPenloglou-WMF and @RLopez-WMF are coordinating on the template build and it is expected before 03/02

Change #1244138 merged by Ejegg:

[wikimedia/fundraising/crm@master] All-purpose Donor Portal message template

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

@ppenloglou and @RLopez-WMF - I've deployed a skeleton template with some sample data sets at https://civicrm.wikimedia.org/civicrm/admin/messageTemplates?reset=1#/edit?id=573

There's an example of switching on the action in the subject template. The full list of actions is:

  • 'Cancel Recurring Contribution'
  • 'Recurring Annual Conversion'
  • 'Recurring Paused'
  • 'Recurring Downgrade'

Note that 'Recurring Upgrade' is handled by the existing recurring upgrade TY message at https://civicrm.wikimedia.org/civicrm/admin/messageTemplates#/edit?id=420&lang=en_US

Thank you @Ejegg! I've taken a stab at this, viewable in the template you shared https://civicrm.wikimedia.org/civicrm/admin/messageTemplates?reset=1#/edit?id=573 .
Regarding frequency, I've seen this variable available in other templates contribution_recur.frequency_unit so I figured I could also use contribution_recur_old.frequency_unit and contribution_recur_new.frequency_unit. The latter two don't seem to be available though.

Attaching a preview screenshot

image.png (1×1 px, 186 KB)


@RLopez-WMF I've built a simple, operational type email for this phab. You'll find the FR.E.D template here in case you have to continue work on this while I'm OOO.

Few small details to make this a little more user-friendly:

Can we change "Next charge date" to "Next donation"? More positive, less words. And we could lose the time from the next charge date, no one cares about the exact time.
I think we could lose all the other labels (Amount, Status, Type). These are clear from the data itself and removing them will make it more easily scanned).
I think it would make more sense to put the current gift first and the previous gift below, since people are most interested in the status now.

@Ejegg is the frequency_unit missing from the real data or just from the example data?

@ppenloglou oops, I thought I had added the frequency_unit to the example data. I'll try to figure out why that's not working.

@ppenloglou for these emails we need the $ before the contribution_recur_old and _new - when I add this locally it renders 'month'

{$contribution_recur_old.frequency_unit}

After some experimenting I figured out the syntax for using it in a conditional

New {if {$contribution_recur_new.frequency_unit} == 'month'}monthly{else}annual{/if} donation:

Thanks @Ejegg for the clarification! We do use that syntax in other templates so we're comfortable with it ;) e.g.

{if '{contribution_recur.frequency_unit}' && '{contribution_recur.frequency_unit}'==='month'}
  {capture assign=txtMonthYear}month{/capture}
  {capture assign=txtMonthlyAnnual}monthly{/capture}
  {capture assign=txtMonthlyAnnualUpper}Monthly{/capture}
{elseif '{contribution_recur.frequency_unit}' && '{contribution_recur.frequency_unit}'==='year'}
  {capture assign=txtMonthYear}year{/capture}
  {capture assign=txtMonthlyAnnual}annual{/capture}
  {capture assign=txtMonthlyAnnualUpper}Annual{/capture}
{/if}

Cool cool. Just this one gotcha to note here: it looks like the $ variables don't need quotes around them (and weren't working with quotes around them) when used in the conditional.

Oh I see now! I was too hasty when I read your syntax example. Thanks for flagging!

Ejegg renamed this task from Scoping Donor Portal Operational Emails to Donor Portal Operational Emails.Mar 4 2026, 6:58 PM

Change #1248114 had a related patch set uploaded (by Ejegg; author: Ejegg):

[wikimedia/fundraising/crm@master] WIP generic WorkflowMessage\Send action

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

Change #1248115 had a related patch set uploaded (by Ejegg; author: Ejegg):

[wikimedia/fundraising/crm@master] WIP Send Donor Portal email on annual conversion

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

Change #1248114 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Generic WorkflowMessage send actions

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

Change #1248575 had a related patch set uploaded (by Ejegg; author: Ejegg):

[wikimedia/fundraising/crm@master] Updated content for donor portal emails

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

Patch chain in review will send the messages

Change #1248575 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Updated content for donor portal emails

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

Change #1248115 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Send Donor Portal emails

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

XenoRyet set Final Story Points to 4.