Page MenuHomePhabricator

Epic: Don't duplicate contact for email donations
Closed, ResolvedPublic2 Estimated Story Points

Description

This will make less work for the dedupe jobs, and possibly speed up imports.

We're already getting the contact_id on the query string. We shouldn't blindly trust that and overwrite an existing contact, so we'll need to include a hash too. Civicrm_contact has a 'hash' column.

Tasks:

  • Export hash (as contact_hash)
  • Add contact_hash to email links
  • Pass contact_id and contact_hash through donatewiki and paymentswiki pipeline, add to messages
  • paymentswiki should ONLY pass contact_id through to Civi if contact_hash is present and not empty/0/null
  • Update import to look for contact_hash, and when that's present, only update the existing record if the hash is a match.
  • Deal with contacts who have been merged since the email went out (if the deleted contact's id and hash match, update the merge target)

Event Timeline

@CCogdill_WMF what do you think of adding the extra column to the output / extra variable to the links? Too much?

Change 382844 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[mediawiki/extensions/DonationInterface@master] Pass contact_id and contact_hash when both given

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

Change 382856 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/tools@master] Export civicrm_contact.hash to silverpop

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

@Ejegg I doubt it matters much if we add one more thing. Are you adding a column to the Silverpop export?

Change 382844 merged by jenkins-bot:
[mediawiki/extensions/DonationInterface@master] Pass contact_id and contact_hash when both given

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

Ejegg triaged this task as Medium priority.Oct 9 2017, 7:50 PM
Ejegg set the point value for this task to 2.
Ejegg moved this task from Triage to Sprint +1 on the Fundraising-Backlog board.

@CCogdill_WMF yes, we would be adding a contact_hash column to the export

Sounds fine to me. Let me know when the new column is being added.

Change 383260 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/crm@master] WIP Check contact_hash if contact_id exists

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

Change 383283 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[mediawiki/extensions/DonationInterface@master] WIP add contact_id and _hash to the rest of the places

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

Change 383260 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Check contact_hash if contact_id exists

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

Change 383283 merged by jenkins-bot:
[mediawiki/extensions/DonationInterface@master] Add contact_id and _hash to the rest of the places

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

Change 382856 merged by Ejegg:
[wikimedia/fundraising/tools@master] Export civicrm_contact.hash to silverpop

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

@CCogdill_WMF I can start exporting the contact_hash column whenever you're ready. It'll be the second column, called 'contact_hash'. It will be 32 hex digits (digits 0-9 and letters a-f).

@CCogdill_WMF do you want to try to move forward with this for the last batches of English emails this season?

Ejegg claimed this task.