CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Detecting/managing duplicate contributions
Pages: [1]

Author Topic: Detecting/managing duplicate contributions  (Read 1189 times)

tbruce

  • Guest
Detecting/managing duplicate contributions
September 01, 2008, 05:04:26 am
We don't actually handle our own gift processing, and so import large numbers of donations from CSV files provided by our parent organization.  Each contribution carries a unique transaction ID that they assign, so we have a reasonable basis for dupe detection if CiviContribute somehow would support it.

The problem right now is this -- we are not confident that when we did our initial load of donations we actually managed to import everything correctly -- some contributions do not show up that should.  It would be very handy to be able to "replay" a number of large imports and either have duplicate transactions rejected at upload time, or query/remove them from the database afterwards.  So I guess there are two questions:
is there a way to have CiviContribute reject an import record based on non-uniqueness in a custom data field (as it will with  contacts), or does someone have a de-duping script that operates directly against the database?

All the best,
Tb.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Detecting/managing duplicate contributions
September 01, 2008, 11:51:02 am

contributions have 2 fields, transaction id and invoice id which are unique. So you should assign the unique transaction ID to that field. I'm not sure of the behavior when you import a contribution with the same transaction ID. The system should ignore that row and skip importing. Not sure if it does that, but you should give it a try on our demo server (http://drupal.demo.civicrm.org/)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

m.e.

  • I post frequently
  • ***
  • Posts: 157
  • Karma: 5
  • CiviCRM version: 4.0.9
  • CMS version: Drupal 7.9
Re: Detecting/managing duplicate contributions
April 21, 2010, 12:48:20 pm
This is an old topic, but we ran into a similar problem and I wanted to update with the outcome of our own testing.

When I attempt to import a contribution whose transaction ID already exists, using email as a "match to contact" field, and selecting "import new" rather than "update," CiviCRM does give me an error that the contribution is a duplicate, and the record does not import. This was the behavior we'd hoped for; it means we can run a contribution import file through more than once and not have to worry about dupes being created for contributions that made it into the system the first time.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Detecting/managing duplicate contributions

This forum was archived on 2017-11-26.