Page MenuHomePhabricator

2nd Recurring Failure Email in Civi
Open, Needs TriagePublic4 Estimated Story Points

Description

  • a reminder follow up email to recurring failures, sent via Civi
  • Rules, Copy

Fr-tech:

  • Make new activity type for the 1st failure email
  • change it to that new activity type, this happens in drupal/sites/default/civicrm/extensions/org.wikimedia.smashpig/Civi/Api4/Action/FailureEmail/Send.php
  • Create a new activity type for the 2nd failure email
  • Create a script to actually send the email
    • We have a script that cancels inactive recurrings drupal/sites/default/civicrm/extensions/wmf-civicrm/Civi/Api4/Action/ContributionRecur/CancelInactives.php which is run by cancel_inactive_recurrings.yaml
    • We could also do it like any of the other actions if there's a newer way that makes more sense
    • Check that they have the 1st activity but not the 2nd activity
    • Check that they haven't started a new recurring otherwise
  • Make sure the new message template is there in English

Testing

Bugs to fix:

  • When sending from the UI, the activity type is 1st for both of them

Event Timeline

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

Update here, and sorry I missed your message @KHill-WMF but we have a bug fix in review to make sure all the first recurring emails send, then this work will be put ontop of that

Change #1203196 had a related patch set uploaded (by Cstone; author: Cstone):

[wikimedia/fundraising/crm@master] Add failure email type activity and tracking field

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

Change #1218867 had a related patch set uploaded (by Cstone; author: Cstone):

[wikimedia/fundraising/crm@master] Add activites for first and second recurring failure email

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

Change #1218867 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Add activites for first and second recurring failure email

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

Change #1219239 had a related patch set uploaded (by Cstone; author: Cstone):

[wikimedia/fundraising/crm@master] Switch failure email to new type

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

Change #1219239 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Switch failure email to new type, remove text from activity subject

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

Change #1224849 had a related patch set uploaded (by Cstone; author: Cstone):

[wikimedia/fundraising/crm@master] WIP: Add templates for second recurring failure message

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

Per https://phabricator.wikimedia.org/T405619 do we have a version of this email for annual donations? And is the signature matching the new one for the first email ("Wikimedia Foundation Fundraising Team")?

Thanks for confirming!

@krobinson it looks like there is a version for annual donations here. When I open the Preview, and select from the Example dropdown "Recurring Failure - annual" there is an annual version coded in Civi. Confirming that the signature is "Wikimedia Foundation Fundraising Team" too.

@NNgu-WMF @MSuijkerbuijk_WMF @krobinson for the second recurring failure email we are making a separate template (that's being reviewed right now) It will have the same logic as the first recurring failure email to swap between monthly and annual

@NNgu-WMF @MSuijkerbuijk_WMF could you look at the copy linked above for the second failure email and is it still what you want it to be? It'll be easy to edit too once it's deployed but I can get any changes in on the first pass

The copy looks good to me! @MSuijkerbuijk_WMF this is not a big blocker, but I'm wondering if we should refer to their donation as "annual recurring donation" instead of "annual donation" like it currently says in the second paragraph?

Hi @Cstone and @NNgu-WMF
I'm afraid there's been confusion on what this task included.
The copy briefed for failure email 1 and failure email 2 is here -- I'm afraid I don't see that update in this link.
We will need the monthly / annual logic in there yes AND URLs will need to be amended to FY2526
Can you please review and share test emails for review?
Thank you

Could I please get any test emails too, so I can see what donors will be seeing? Thanks!

Change #1224849 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Add templates for second recurring failure message

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

Change #1139584 abandoned by Cstone:

[wikimedia/fundraising/crm@master] WIP: Add second recurring failure email send

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

Change #1199940 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Add second recurring failure email

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

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

[wikimedia/fundraising/crm@master] WIP FailureEmail::send can sending first or second

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

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

[wikimedia/fundraising/crm@master] Get recurring count in API4 w/o warning

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

Change #1231006 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Get recurring count in API4 w/o warning

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

Change #1230968 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] FailureEmail::send can send first or second

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

Change #1234131 had a related patch set uploaded (by Cstone; author: Cstone):

[wikimedia/fundraising/crm@master] WIP: Add ability to send 2nd recurring failure from the UI

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

Change #1234131 merged by Eileen:

[wikimedia/fundraising/crm@master] Add ability to send 2nd recurring failure from the UI

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

@NNgu-WMF @MSuijkerbuijk_WMF question on the utm for the failure emails

wmf_source=FY2425_FailedRecur
wmf_source=FY2425_FailedRecur_2

is the year here important for tracking? Does it need to be in the link ?

@Cstone Having a YoY view would be good yes. So if we could update that FY even better.

@MSuijkerbuijk_WMF I wonder if it makes sense to include the FY in the source specifically. We know the actual date when the donation was re-started, so maybe we should just work with Analytics to use that date instead of storing the fiscal year in the source. The fiscal year in the source was incorrect before now anyways (I think it was a few years out of date), so the past data is not reliable and we'd be better off not using it.

Is there already a dashboard for these that would need to be changed or would this be a future analysis?

Change #1235864 had a related patch set uploaded (by Cstone; author: Cstone):

[wikimedia/fundraising/crm@master] Try two with less link breaking

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

Change #1235864 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Try two with less link breaking

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

@NNgu-WMF @MSuijkerbuijk_WMF @krobinson

The 2nd failure email template is in civi now and you can test it through the UI by going to a recurring donation you have and clicking on Send 2nd Failure Email for a cancelled recurring donation or select that option in the more area of an active recurring donation. Let me know if you need help getting to this area.

I also renamed this UI from 'Send Failure Notification' for the 1st email to 'Send 1st Failure Email' to distinguish them.

I also updated the copy in the message templates from what had been there to match the footer and automated notice that the 1st failure email has. That template is ready for final editing and any translations needed. It also matches the 1st emails ability to handle monthly vs annual donations.

The last step once everyone is happy will be to turn on the automated job to send this, that will be on our end. The amount of days after the 1st email is configurable too if we want to ever change that.

Thanks @Cstone!

A few thoughts/suggestions from me:

  1. If possible could we move cancel up to be the first item in the dropdown please? I don't see DR sending these failure emails out manually very often, but we use cancel hundreds of times a day.

0203 screenshot 1.png (594×2 px, 188 KB)

  1. I sent the 1st and 2nd failure emails to myself (my CID is 68209875). However, both are labeled as "First failure email" in Activities.

0203 screenshot 2.png (359×2 px, 150 KB)

  1. I could have sworn I saw a specific time when I first previewed the template for the 2nd failure email it said the date and specific time, but now it's not there? I thought it said something like the date and then 9:01 pm and was going to suggest we don't put a specific time. May have just imagined not sure lol.
  2. Related I can see on the second failure email we are including a date. It looks like we don't include this on the first failure email. I wonder if the inclusion of a date has the possibility to cause donor confusion. I think (correct me if wrong 😉) the dates in Civi are specific to Civi and it's timezone which I believe is Hawaii time. If the date that will be generated operates as other things we normally see in Civi I think the date the donor sees on this email may be different than the date they typically see their monthly billing attempt on their end and may not be the same date as what Civi says it is and thus have the possibility to create confusion?

0203 screenshot 3.png (412×1 px, 134 KB)

  1. This one could just be me but the framing of "last payment" in the 2nd failure email stood out to me. It kind of made me think it's the final payment of a monthly donation. If this stands out to anyone else maybe we could consider something like "the most recent processing attempt" or the "most recent billing attempt".

0203 screenshot 4.png (60×1 px, 25 KB)

  1. In our standard fundraising emails in the footer the part that says "Please let us know it" has a mailto link to donate@ as shown in the screenshot below. Currently on both failure emails it also says the "Please let us know it" but there is no link provided.

0203 screenshot 5.png (123×995 px, 29 KB)

Two questions:

  1. I'm not sure if it's been decided yet, but when it is could someone advise how many days after the 1st failure email that the 2nd failure email will be deployed please? :) DR will now need to snooze donors who reach out in response to failure email 1 so they don't get failure email 2 if they have told us to ensure it is cancelled. @krobinson may have thoughts, but I think at least 7 days between the sends would be good for DR to try to give us time to reply to the first email/replies.
  2. Additionally, I assume but if someone could confirm if the 1st recurring reactivation email will now be 1 month from the second failure email?

Sorry long comment is long. 😅

Piggybacking off of Amber's feedback here!

  1. I sent myself versions of the failure emails for both monthly and annual recurring. In the annual recurring failure email #2, it tells me the date and time that my last donation was attempted to be processed. I don't think it's necessary to state the time, especially if it's not in the donor's timezone as Amber suggested.
  1. I also agree that "last payment" could be replaced with "most recent billing attempt" or "most recent donation"

Getting answers to your questions regarding cadence of deployment @AMJohnson !

@Cstone Apologies but the test emails that Natalie sent me do not match the email 1 and email 2 content that was briefed. I'm confused on why this is happening. Can you please review?

Replying to the above

  • As noted in the brief, if the date creates an issue, it can be dropped.
  • Failure email 2 should go out 7 days after Failure email 1.
  • Yes, the reactivation series will be adjusted @NNgu-WMF can you sync with the team on this?

Thank you all

Thank you for confirming that 7 day timeframe for the 2nd failure email deployment, @MSuijkerbuijk_WMF!

Apologies one last Q from me. If we're updating the current copy for the failure emails to the copy in the content doc shared above can I confirm who the sender and signee is going to be?

I see on both versions in the copy doc above the "from name" and the signee are both noted as @SHust and the footer indicates from DR team, but I believe in the recent discussion in https://phabricator.wikimedia.org/T405619 regarding failure emails that the sender and signee was decided to be "Wikimedia Foundation Fundraising Team" instead of Donor Relations or one particular person on DR?

Pre-apology if I'm just confused. :)

@MSuijkerbuijk_WMF @AMJohnson sorry to cause confusion with the content. I (wrongly?) thought the current 1st Failure Email had been updated outside of the copy in the linked doc and was matching the 2nd one to parts of that.

I'm going to break out the copy discussion into it's own task: T416435: Content update for 1st? and 2nd recurring failure email

Cstone updated the task description. (Show Details)
Cstone updated the task description. (Show Details)

Change #1236393 had a related patch set uploaded (by Cstone; author: Cstone):

[wikimedia/fundraising/crm@master] Fix where sequence number was lost when sent from the UI

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

@MSuijkerbuijk_WMF Does this mean the currently active Recurring Reactivation program for 6C will need to be deactivated and edited to accommodate for the recurring failure emails? When should donors receive the reactivation email after the second failure email?

@NNgu-WMF No, it means that we might need to adjust the timing of the recurring reactivation first email - the failure emails are sent through Civi, which Christine is currently building.

I'll reply on content in the brief and the phab

@Cstone Mariana has ok-ed removing the year from the source, so that's one less thing to worry about.

@MSuijkerbuijk_WMF I took a look at the Reactivation Journey that has been active since Nov 2024, 20241119_ReactivationJourney_6C_English(en)_RecurringProgram

It looks like once contacts enter the program, there is a 1 month delay anyway - so it should be okay to keep that program running as-is.

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

[wikimedia/fundraising/crm@master] Remove sequenceNumber, find activity by workflow

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

Change #1237582 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Remove sequenceNumber, find activity by workflow

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

Change #1236393 abandoned by Cstone:

[wikimedia/fundraising/crm@master] Fix where sequence number was lost when sent from the UI

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

@AMJohnson the bug with the activity names has been fixed and got deployed today, so the activities will match the email type

Hi @Cstone ! Confirming that the 2nd failure email is programmed to go out 7 days after the first email?

@NNgu-WMF It's configurable once we set it up, its a parameter we pass to the script. So yep it can be 7 and we can change it easily if needed