Page MenuHomePhabricator

Add Searchkit with daily email notifications / dashlet for donations missing required details
Closed, ResolvedPublic4 Estimated Story Points

Description

Split off from T406505: small # of Adyen ApplePay contribs missing country in Civi

@krobinson asked: Thinking about this task and others one about contributions missing PII (https://phabricator.wikimedia.org/T411811 as a recent example), is there any way to make an alert in Civi if donations come in without basic info that every donation should have, like name, email, country, amount, currency?

I think we would want to limit this, at least to start, to online donations (not imported or added manually as these might not have a country and so on) and only first recurring donations (as country can be removed, etc).

I don't think we require a name as some of your RML donors don't have anything other than an email address (e.g. donations without name from today).

We can check for primary email, that amount is not $0, that primary address country is not empty and that original currency if not empty (this is the field we use for the calculated fields). Is there anything else we'd like to check?

A few implementation details thanks to @Cstone:
Financial type = cash is a one time, type = recurring gift is the first recurring, and type = recurring gift - cash is a subsequent recurring
Source Name = DonationInterface or SmashPig or Source type = Audit should capture all the donations we are interested in (regular, IPN, audit).

Event Timeline

@Lars RML donors should all have a name attached once they have completed a donation. If they are just leads (ie signed up and received the emails, but have yet to complete a donation) we likely only have email address on file for them. I can't see any results for that link you shared, but if you can find any RMLs who have donated and don't have a name, I'd be curious to see them.

@krobinson You're right, they aren't RML. Looks like most of the non-recurring ones in the last 30 days without any kind of name are ACH, so these are ones we'd like to fix as well and should include in alerts. We also have about 500 monthly donors without a name, almost all Apple Pay, though I assume those have been missing for a while.

We have many donors who only have a first name (mostly via Google or Apple Pay). We also have a small number who have only a last name (T412534: Why do a few donors have a last name and no first name? to investigate). But for now, I think we can just check that donors have at least one name of first, last or organization.

@krobinson @Lars should this email should be for fr-tech to look at first?

Most of this is something that ends up being a bug and I don't want to have DR chasing things that ends up being an issue on our end. Maybe the Dashlet for general QA/everyone to see but the email just goes to fr-tech to start? (unless you want it too DR :) )

Just expanding more on the sources/types of this missing info too:

Payment methods where we get info from the payment method: if something is missing in this flow we end up with missing info in civi
Paypal
Venmo
Apple Pay
Google Pay
ACH
Example: T411811: 12/4 Gravy-PayPal contrib without PII in Civi

Issues where something goes wrong on our end:
lowercase country from native donations confused civi import T406505: small # of Adyen ApplePay contribs missing country in Civi

Thanks @Cstone for that list, and @Lars for confirming some only have one or the other. I think so long as we have a name, it doesn't matter which.

As for the alert, yes, to fr-tech for sure! We'd only end up flagging it to you anyway, lol. I was just suggesting it would be good for us to be proactive on these, and an alert would ensure we're debugging actively rather than waiting for someone to notice anecdotally, whether DR due to us noticing on a donor record or Lars through something he's doing.

We'll happily support whatever workflow / ownership makes the most sense to you all.

+1 to proactive @krobinson it would save us all a lot of time

Damilare set the point value for this task to 4.Feb 5 2026, 5:51 PM
XenoRyet triaged this task as Medium priority.Mar 2 2026, 9:12 PM

We can use https://github.com/civicrm/civicrm-core/pull/33915 to send daily (or other regular) emails with SK results.

I am interested in this too, I'm on chaos but this is also related to chaos tracking.

For the ones that would signify a bug:
Amount of 0
No country in primary address
No primary email

We can add graphs to the metabase no data alerting dashboard and check that with the other data that is like that there and then link them to matching searchkits to dig into the data more. This gives us one place to quickly look over the status of everything and then well have the searchkits to dig into the data further

Dashboard:
https://metabase.frdev.wikimedia.org/dashboard/53-fr-tech-monitoring?tab=243-there-shouldn%27t-be-any-data-in-these

Talked to Cassie at the offsite about metabase alerts and set some of these up to test (emailing once a day)