Page MenuHomePhabricator

Annual Recurring Statuses implementation in Civi (Audience Framework update)
Closed, ResolvedPublic

Description

Creating a follow up task related to this work https://phabricator.wikimedia.org/T372378

The team is meeting in January (before the next maintenance week) to implement statuses for Annual recurring donors.

Event Timeline

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

@MSuijkerbuijk_WMF confirming we can close this task now?

@AKanji-WMF
There are a few requests and questions open around this (from Slack convo)

  1. Review discrepancies identified by the audience team when applying the framework (e.g. New tag vs first gift)
  2. Review additional discrepancies identified by Joseph upon pulling audience data
  3. last source criteria in Acoustic status
  4. Audience team will brief new criteria to add to Acoustic (for annual recurring, direct Mail, etc) in April (we are meeting next week to finalize a list to share with FR Tech for review)

Thanks

For before big English - line 4 at least "New recurring related fields > add a Lapsed status for Annual Recurring " from https://docs.google.com/spreadsheets/d/1ex71O8Xh1LqI_fY-AHX9wF-glmcqxc-j1tGflFwVcjo/edit?gid=1402492694#gid=1402492694

@Eileenmcnaughton is this something Lars could work on? I assume it would need to be done during a maint window?

If this is a wmf-donor status segment change then it is quite a steep learning curve - also it would be def us using the fact Lars has dev skills rather than a civi admin thing

Just hoping we go the safe way as all of this affects our Big English campaign. Let's check in if needed, we do need that lapsed status for annual recurring but we can find options. Thanks

Hi all, I wanted to add here a note about an additional recurring dononr_status or gift status that we might need to add to cover 'paused' functionin the donor portal.
Thanks FYI @KHill-WMF @AKanji-WMF

AKanji-WMF moved this task from Next to Current Sprint on the Fundraising-Backlog board.

AK to flesh out this phab - noting that this last comment needs it's own phab - unfeasible to create "paused" status - but can use activity record to signal that someone is paused. Dami notes need a "pause stopped" activity to indicate end of pause.

We've agreed on the following definitions:

ANNUAL RECURRING Donor segment definition will need to change to
has made a recurring annual donation in last 13 months - ie at least $0.01 between 2024-08-17 06:13:05 and 2026-06-30 23:59:59 AND donation is annual recurring
OR had an active annual recurring plan within the last 13 months.

Donor statuses
Active Annual Recurring = The recurring plan is active
Delinquent Annual recurring = Annual recurring plan cancelled within last 3 months OR
Failed payment within the last 3 months
Lapsed Annual Recurring = The recurring plan was canceled within the last 13 months OR The last successful payment was within the last 13 months

The plan is to update this during the Nov 3-7 maintenance week.

@Lars For the Lapsed Annual Recurring = The recurring plan was canceled within the last 13 months OR The last successful payment was within the last 13 months
Shouldn't it be 4 to 13 months? So that it doesn't overlap with Delinquent?

@MSuijkerbuijk_WMF The statuses are set sequentially, so if they get sorted into Delinquent, they won't get sorted into Lapsed. In other words, yes, Lapsed starting at 4 months is implicit.

@Lars I'd say we should confirm that point - please have a look at how it was set up for monthly recurring statuses.
Also, we need to make sure that 2-4-6-8 only apply WHEN donor segment is 400 (monthly)

@MSuijkerbuijk_WMF I can confirm that all of the statuses and segments work in the same way: the first one in the list that matches is applied to the donor.

Because of this 2-4-6-8 can apply to donors who are in the major and mid segments 100-200-300, specifically if the donor has given at least $250 in one of the last five years and has given monthly in the last three years. If you want to change this, can you please file a separate phab? This might require a bit of a re-think as the triggers that update the statuses and segments are a limited tool.

I can confirm that if the donor is in 400 / monthly they will be in one of 2-4-6-8, because the data ranges match exactly.

I will however update the descriptions for 4-6-8 which are not quite right. Instead of "gave monthly recurring more than 1 month & less than 4 months ago" this should read "gave monthly recurring between 1 and 3 months ago" and so on.

Change #1196712 had a related patch set uploaded (by Lars SG; author: Lars SG):

[wikimedia/fundraising/crm@master] Clarify donor segment and status descriptions

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

@MSuijkerbuijk_WMF I have to correct my comment above (as I discovered that the descriptive text and the code were not the same): Major Donor and Mid Tier (100-200) will not be assigned to 2-4-6-8, however Mid-Value Prospect / 300 will be assigned to 2-4-6-8 if they are a recurring donor. I have updated the text on the page listing the statuses and segments to reflect this in the patch above.

So the only case that we would see a mismatch between segment and status would be a Mid-Value Prospect who is a recurring donor (or has recently been a recurring donor). This might be because they give $25 per month or from a one-time gift or some combination of the two.

Change #1196712 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Clarify donor segment and status descriptions

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

@Lars I believe this needs some clarification as we were operating under the assumption that we could see status 2 assigned to all segments. Not for targeting but for file analysis. So now I am confused on how this works and how it reflects in the framework page (as we assume a hierarchy from top to bottom)
https://civicrm.wikimedia.org/civicrm/wmf-segment
Let's have a follow up call. Thank you

@MSuijkerbuijk_WMF Sure, go ahead and schedule a follow up call next week if you like.

Here's a SearchKit showing that there are no Major Donor or Mid Tier segment donors with recurring statuses. If you change the Filter tab segment criteria to also include Mid-value Prospects, you'll see we do have 23k with a recurring status.

@MSuijkerbuijk_WMF For a bit more context, here is Eileen's comment when this was set up. I think the question in there about whether recurring and one-time statuses should be one field or two is still one we should consider as we talk through this.

@Lars Thanks for sharing that information. I still see the need to be able to tag as recurring any Major Donor or Mid Tier donor giving as a recurring donation.
So this is a change that is needed. I am talking to Joseph tomorrow about a few changes needed in the framework, and I'll mention this too.

@MSuijkerbuijk_WMF Sounds good, let's have a quick discussion sometime this week to see how we can implement this (as we won't want to move forward on the recurring statuses until this is resolved).

@MSuijkerbuijk_WMF Sorry, just saw your meeting for next week, that will be fine.

@MSuijkerbuijk_WMF I just want to flag that we will need a maintenance window to update the triggers for these audience framework changes. Our next one is Nov 3-7, so if we want to get this done in 2025, we'll need to finalize the spec within a couple of days after our meeting on Monday, so that we'll have enough time to make the code changes, review them and deploy by Nov 6th at the latest.

Change #1201860 had a related patch set uploaded (by Lars SG; author: Lars SG):

[wikimedia/fundraising/crm@master] Update annual recurring segments and statuses

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

Change #1201864 had a related patch set uploaded (by Lars SG; author: Lars SG):

[wikimedia/fundraising/tools@master] Add annual recurring segments and statuses

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

Change #1201864 merged by jenkins-bot:

[wikimedia/fundraising/tools@master] Add annual recurring segments and statuses

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

Change #1201860 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Update annual recurring segments and statuses

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

Change #1202303 had a related patch set uploaded (by Lars SG; author: Lars SG):

[wikimedia/fundraising/crm@deployment] Update annual recurring segments and statuses

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

Change #1202303 merged by jenkins-bot:

[wikimedia/fundraising/crm@deployment] Update annual recurring segments and statuses

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

Change #1202307 had a related patch set uploaded (by Lars SG; author: Lars SG):

[wikimedia/fundraising/crm@master] Update annual recurring segments and statuses triggers

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

Change #1202317 had a related patch set uploaded (by Lars SG; author: Lars SG):

[wikimedia/fundraising/crm@deployment] Revert Update annual recurring segments and statuses

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

Change #1202307 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Update annual recurring segments and statuses triggers

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

Change #1202317 merged by Eileen:

[wikimedia/fundraising/crm@deployment] Revert Update annual recurring segments and statuses

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

Change #1203508 had a related patch set uploaded (by Lars SG; author: Lars SG):

[wikimedia/fundraising/crm@master] Add updateAnnualDonors API Action This ended up being too complex to handle with an API call directly (let alone from cv), so I've added an API action to handle it.

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

Change #1203508 merged by Eileen:

[wikimedia/fundraising/crm@master] Add updateAnnualDonors API Action This ended up being too complex to handle with an API call directly (let alone from cv), so I've added an API action to handle it.

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

@MSuijkerbuijk_WMF I've finished QA-ing the annual statuses, so this is now complete from my end. We have triggers to set the statuses and segment for annual recurring donors, plus a segmentation and status aging job running alongside the monthly recurring jobs, which will update the statuses and segment as required when the donor falls into the next segment/status based on the time since the recurring donation was cancelled.

After looking in more depth at the data, I was able to simplify the statuses and segments, basing them only on the status and cancel/end date of the recurring donation, rather than also looking at the associated donations themselves. There were no contacts who would have been caught by also including donation criteria, so this simpler version is better. You can see the full details in Civi as usual.

In the QA process, I've come across some small issues that we can discuss:

  • There is an inconsistency between the Mid-Value Prospect segment and the recurring statuses (not just annual, this is the same for monthly). A donor can end up in Mid-Value Prospect with any recurring status if they have given more than $250 but less than $1000 in one fiscal year and have a recurring donation. We can fix this by either excluding Mid-Value Prospects from recurring statuses, as we do for Major Donors and Mid Tier or by making Mid-Value Prospect a lower priority than the two recurring segments so donors will end up in the recurring segments instead.
  • There are a small number (~500) of annual recurring donors who have a start date in the future, because they set up an annual recurring in the recurring convert process but it doesn't start until next year. These are not currently included in the annual recurring status, but I could look into trying to include them if this was desired (which is a bit complicated because without a contribution attached to the recurring, the trigger doesn't run).
  • There are a very small number (~30) of annual recurring donors who have a active annual recurring donation, but only have failed donations associated. I have a Phab (T410301: Clean up CiviCRM data for Paypal recurring donations) to clean these up and look into preventing these issues with Paypal donors in the future.
  • If someone cancels a monthly recurring donation but starts an annual recurring, they still stay in the monthly recurring statuses and segment until they age out, which might lead us to trying to re-activate them as a monthly donor when we probably do not want to do that.
XenoRyet reopened this task as Open.
XenoRyet closed this task as Resolved.
XenoRyet set Final Story Points to 8.
XenoRyet removed Final Story Points.

@Lars This is very helpful.

  • I'm adding @IAckerman-WMF and @JMando for points 1 and 4 -- also posted here
  • For point 2 these should be marked as active annual recurring. Adding @Ejegg - this might be recent donors in the post-payment upsell test. This should be fixed asap, as we are rolling out annual recurring to post-payment.

Thank you

Also adding @CHudson-WMF, as she has been modeling recurring giving in dbt.

@Lars The team reviewed the new Civi Segments+Status and came back with a couple of questions. FYI @JMando
and @IAckerman-WMF

  1. What happens if someone cancels their annual recurring donation, but then makes an OTG that same year? Shouldn't they be classified as Consecutive then, instead of Delinquent Annual Recurring?
  2. Why is the monthly recurring donor segment window so long (could be lapsed 35 months)? Would it be better to let them move into 500/600 after 12 months so they get back into the regular appeal cycle?

@MSuijkerbuijk_WMF

  1. We could look at this in the new year, but the difficulty is that we are adding a lot of complexity to these trigger-based queries. Maybe we need to put together a document of what the ideal flow would be in all these kinds of cases and then see what we can do.
  1. I agree, three years does seem like a long time to try to re-activate monthly donors. We can change it to 12 months in the new year (would be a trigger change so we need a maintenance window).