Currently, Contribution and Member import only support "create" mode. We have implemented UPDATE ("On Duplicate Entries") handling for Participant in event/import. We should also support UPDATE functionality for the other two component imports.
Participant import matches to existing participant record on (Event Title + Contact Match) OR (Event ID + Contact Match). For contributions, safely match to existing records based on :
- Contribution ID (civicrm_contribution.id) OR Transaction ID (civicrm_contribution.trxn_id) OR Invoice ID (civicrm_contribution.trxn_id)
and membership, based on primary key for now
- Membership ID (civicrm_membership.id)
- add "On Duplicate Entries" radio button to step 1
- IF onDuplicate = Update, then include an additional mapping option value (mapper selects)
++ for contribution -> "Contribution ID OR Transaction ID OR Invoice ID (update existing contribution)"
++ for membership -> "Membership ID (update existing membership)"
- modify import processing to handle find >> update
- if onDuplicate = Update, and a Contribution/Membership ID is NOT NULL for a row, we must find a matching record. If we don't - then skip the row and add to error array / error file download. Error msg = "Matching Contribution record not found for Contribution ID 5233. Row was skipped." (same error msg for Membership, just change record type)
- include count of new AND updated records in import summary