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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Import and update duplicates on External Identifier?
Pages: [1]

Author Topic: Import and update duplicates on External Identifier?  (Read 2703 times)

greenmachine

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 6
Import and update duplicates on External Identifier?
June 10, 2008, 05:22:49 pm
I noticed this behavior and seem to have duplicated on the public demo. I can't tell if it is intended functionality, or a bug.

Essentially I am trying to import data that updates existing contacts where the External Identifier matches an existing contact, or create a new contact where the External ID is not found. Here's what I did:

  • Set duplicate matching rule for individuals to use External Identifier with weight 5, set overall threshold for matching to 1. No other match criteria.
  • Imported the attached file once.
  • Imported the attached file again, except modifying the Web Site value. I would expect CiviCRM to match the external identifier to the contacts I just created, and update with the new values
  • Second import works fine until the last step, when it is reported that there are errors with both rows. The error in the error CSV output says "External Identifier already exists in database."

Can external ID not be used to test for matching contacts when importing individual contacts? This functionality would be useful in the case that I do an import, but then missing information turns up later, and I need to do another import. Only the external identifier would be consistent between the two data sets, since the later data may include some contacts I've already imported.

The alternative seems to be to use other matching criteria, or export all existing contacts and do a JOIN query in MS Access to match existing contact internal ID to external IDs in my new data.

greenmachine

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 6
Re: Import and update duplicates on External Identifier?
June 10, 2008, 06:50:56 pm
I think you can probably ignore my message here - I believe this stems from my misunderstanding of the "Contact Matching" vs. "Duplicate Contact Rules" admin pages.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Import and update duplicates on External Identifier?
June 10, 2008, 10:57:27 pm
This will be clearer in 2.1 - as those two functions are being merged into a set of "Duplicate Matching Rules". The "default" rule for each contact type will be used for Import matching / updating.
Protect your investment in CiviCRM by  becoming a Member!

greenmachine

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 6
Re: Import and update duplicates on External Identifier?
June 17, 2008, 10:21:48 pm
I'd like to bump this topic back up. Can External Identifier be used for duplicate matching when importing contacts?

I've set the Contact Matching (/civicrm/admin/dupematch?reset=1) rule to "external_identifier", but I still get this behavior:

-- Contact A exists in the database with external ID 9999
-- Import new data, including new data for Contact A. Choose "Update" for duplicate checking option
-- Try to import. CiviCRM reports error rows.
-- In the error rows output, CiviCRM included the Contact A row with the error "External Identifier already exists in database."

I am intentionally trying to import a contact with the same external identifier, because I want to overwrite some of that contact's data. Is there some special exception for external identifier that it can't be used in this way? Internal Contact ID works fine in the same sequence. I guess I can do an export of all data and create a mapping table and match data up in Access, but it would be more convenient to use External ID interchangeably with Internal ID depending on source data.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Import and update duplicates on External Identifier?
June 17, 2008, 10:53:09 pm
It sounds like this is a "bug" / "missing feature" - if External Identifier is set as your "contact matching" criteria, it should do an update on Contact A. The duplicate matching for import in 2.1 is significantly different - as it's using the newer Duplicate Matching rule set. I will make sure to test out using Ext ID as 2.1 moves into QA (you could also try it out right now on the dev sandbox- http://sandbox.civicrm.org).
Protect your investment in CiviCRM by  becoming a Member!

idmacdonald

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 1
Re: Import and update duplicates on External Identifier?
January 27, 2009, 11:26:27 am
Hi,

I know that this is an old thread, but has matching based upon External Identifier been fixed in 2.1? I am getting similar behavior as greenmachine reports. Maybe my Dupe matching rules need to be adjusted, but if I try to import a CSV with an External Id column and a column for filling in custom data (all contacts already exist in the database), I get "External Identifier already exists in database" errors.

A similar import with an Internal Contact ID column and the custom data does match up with the existing contacts correctly.

Thanks,
-Ian

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Import and update duplicates on External Identifier?
January 28, 2009, 06:19:45 am
Ian - there have been some ongoing problems w/ external identifier import update matching. One is currently in progress for 2.2:
http://issues.civicrm.org/jira/browse/CRM-4024

It would be very helpful if you did a small sanitized test with your data on 2.1 (public demo) and then on 2.2 sandbox after 4024 is marked closed (should be by tomorrow).

2.2 Sandbox: http://sandbox.civicrm.org
2.1 Demo: http://drupal.demo.civicrm.org/
Protect your investment in CiviCRM by  becoming a Member!

idmacdonald

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 1
Re: Import and update duplicates on External Identifier?
February 05, 2009, 04:53:57 am
In the end, I had a look at the duplicate matching rules and made some adjustments.

For the strict matching rule that applies to individuals, I assigned Internal Contact ID a weight of '10' and External Identifier a weight of '10', then set the Weight Threshold to '10'.

With these settings, the matching by External Identifier appears to now work. So I guess it was more of a configuration problem. (The site is on version 2.1.4).

Thanks Dave!

Best,
-Ian


Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: Import and update duplicates on External Identifier?
February 05, 2009, 05:16:20 am
hi

You should able to update contact data with the help of "Internal Contact ID" or "External Identifier" without any change in strict matching rule that applies to individuals.

It would be good If you check here : http://sandbox.civicrm.org/

thanks
kiran
You Are Designed To Choose... Defined By Choice.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Import and update duplicates on External Identifier?

This forum was archived on 2017-11-26.