Page MenuHomePhabricator

donor name transposed from Gravy to Civi: issue?
Open, MediumPublic

Description

cid=61587610 donated recently via Gravy, 8edfd549-585b-4458-a4d9-6c3aeb00d56f. @KHancock99 noticed that the first and last names were transposed between Gravy and Civi. In Gravy the first initial of firstname is S, first initial of lastname is J, while it looks like in Civi it has always been the reverse for this donor.

There doesn't seem to be a record in Civi's Events, Activities or Change Log that show a dedupe merge or human edit that caused this, unless I'm missing something. Do we know how this happened? Not urgent given just the one instance, but it would be good to know if there is any issue here.

Event Timeline

Just adding a further oddity with a donor complaining we have clipped letters from their first name:

  • Gravy: 1c921414-0d10-486d-ad45-3f77644da11e (Gravy captures name correctly)
  • cid=65026811 (Civi not capturing correctly)

On the one Kris shared above, there are actually TWO matching donor records that match the email address, one with the full name (as the donor used in Gravy) where the most recent donation was 2023 (CID 17484908, where there were 7 donations), and one with a clipped version of the name, where the only donation was in 2024. When this donation imported into Civi the auto deduper chose to pair the donation that had the full name with the donor record with the incorrect name (shortened), which does not match the name in Gravy.

Something is happening during the import of the donations into Civi where the wrong parameters are being used to match donations, or in Gravy itself.

Just adding another example. Donor in #1694195/CID 65026336 their name in Civi is reversed with their last name in the first name field and first name in the last name field, but in Gr4vy it appears correctly see transaction id e7a4ea8e-0022-4630-b460-407cb025eaaa.

They also have older records, cid 15996724 & cid 54081413 (that I have not merged so it's easier to see) where their last name/first appears correct in Civi.

The first CID shared in this phab (61587610) has a duplicate—CID 34616907 with a different email address.
What I noticed is that CID 61587610 was originally created in 2023, with the name in reverse order (last name, first name). Two donations were recorded under this CID in 2024, followed by a third donation in June 2025. The recent donation was matched correctly to this CID (there was only one), but this time the donor entered their name in the correct order (first name, last name), as seen in both Gravy and Adyen. Still, Civi pulled the original name from when the record was first created, instead of using the name the donor submitted on the donation form.

This odd behavior lines up with both examples shared by Kris, Kristie, and Amber, where donors had two CIDs with the same email address, each containing slight variations of the name. In both cases, the June 2025 Gravy donations were matched to the CID with the most recent donation history, even when that record had a shortened or reversed name when first created, instead of the CID matching the full and correct name and email entered with the June 2025 donation. In Kristie’s case, the 2025 donation under CID 65026811 should have matched with CID 17484908; in Amber's the donation matched with CID 65026336 should’ve gone under CID 15996724 instead.

Something is definitely wrong with the Gravy to Civi import. The system appears to prioritize the name used when the CID was first created that has the most recent donation history, instead of matching with the CID with the name and email address the donor entered during the donation process.

Just adding what seems like another example. Donor in #1698746/CID 67524635 reached out to let us know that their first name was spelled incorrectly in our communications and contained two m's instead of one.

In their donation today in Gr4vy transaction id > 7f8d872a-00c9-4f08-8719-7c28c30e3bd2 it appears to be spelled correctly at Gr4vy and there is even a middle name listed with the first name. However, it was incorrect in Civi.

Her previous donation from April 2nd via dLocal directly > T-648-62c7a922-30c6-430c-9d33-73a693e3583c it looks like her name was spelled incorrectly there on the initial donation under this CID so I believe that's where the incorrect spelling originated from.

This seems to align with what @SHust noted ^ > "The system appears to prioritize the name used when the CID was first created that has the most recent donation history, instead of matching with the CID with the name and email address the donor entered during the donation process."

I did have to update cid 67524635 so it's now showing as correct in Civi for the donor.

We discussed this at the Gravy checkin today, and Phillip offered to provide the webhooks and the data entered by donors from Gr4vy as needed.

I checked the payment methods for these examples and they were all credit / debit cards, so it's unlikely that Gravy is pulling inaccurate details from an e-wallet account.

A quick review of the donor's transaction log data shows that the correct name information was present in all Gravy requests and responses. This suggests the issue lies within the WMF process that imports donations into CiviCRM.

For CID 61587610 I'm a bit stumped. As I read our logic (https://phabricator.wikimedia.org/diffusion/WFCG/browse/master/ext/wmf-civicrm/Civi/Api4/Action/WMFContact/Save.php$740), the donation was not apple pay, so it should have tried to match via email, first_name, and last_name (in the correct order), and have created a new contact.