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 »
  • Installing CiviCRM »
  • WordPress Installations (Moderators: Kurund Jalmi, Coleman Watts) »
  • Question about importing -'individuals' vs household
Pages: [1]

Author Topic: Question about importing -'individuals' vs household  (Read 497 times)

zorgalina

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 0
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Question about importing -'individuals' vs household
May 21, 2014, 09:49:22 pm
I need to import a number of contacts from an old database (not really even a database!) where in some cases individuals were listed as pairs, with 2 first and 1 last name, and sometimes 2 first and 2 last names -but a single, shared email address.
Before experimenting with 'import contacts' I broke the pairs out into 2 'rows' in a CSV, with one first,last name and email address plus an external identifier so I could tell these were pairs.  When attempting to import them as 'individuals' I took just a few and selected 'no duplicate checking' - this resulted in a trace (not just a nice error.csv file). Is this is a problem for the Civi database (civicrm_email table) and I need to apply 1 email address to one individual contact - and make a second pass/import to treat the 2nd contact as a 'household'? 
Any suggestion as to how this *should* be mapped (not just how to make it work and allow duplicate emails for individuals)? I know that I can define a 'relationship' (spouse) btwn contacts, but how to import them, using a single, shared email?
As an example if the above wasn't clear, I have 'Amy and Andy Jones', using 'ajones@gmail.com' and same address, in the CSV they are 'Amy Jones','ajones@gmail.com'  and 'Andy Jones','ajones@gmail.com'

joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
Re: Question about importing -'individuals' vs household
May 21, 2014, 11:05:39 pm
It might be the external identifier rather than the email that is caused your import problem.  External identifiers have to be unique. You could add "a" to one and "b" to the other to make them unique.


zorgalina

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 0
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Question about importing -'individuals' vs household
May 22, 2014, 12:03:45 pm
Thanks, Joanne, I took a look at the civicrm_contact table definition, and you are right about my error - the 'external identifier' has to be unique.
Now  I can import the 2 'individuals' who are related as spouses, and if I don't 'check for duplicates'  on import(ie, make use of strict de-duping on email address) I can import them into Civi as 'individual' contacts, and email (civicrm_email.email) isn't required to be unique.

Now, even though there aren't database constraints to prevent duplicate emails, should I NOT be sharing email addresses between 2 individuals? It seems that since the 'de-duping' for contacts (in Find & Merge as well as when users register for events, or contribute) hinges on email, it is a design mistake to allow  2 'individuals' to share 1 email address. If they only have one email address between them, should one of the 2  have 'the email address' and the other just be identified in a relationship of 'spouse' to the first?

joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
Re: Question about importing -'individuals' vs household
May 22, 2014, 04:04:57 pm
What is best usually depends on the exact details of what you want to happen.

Are these people meant to be able to log in to your site and register themselves for events etc?  If so then having two users with the same email address may not work (It wouldn't in Drupal - each drupal user needs a unique email address - don't know about WordPress but I imagine the same thing applies.)


zorgalina

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 0
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Question about importing -'individuals' vs household
May 25, 2014, 12:58:21 pm
It is the case that they may need to register for events (or contribute to a campaign) so I believe that email needs to be unique; each contact is meant to be a 'unique' person; since names can be unreliable email addresses are probably the best 'identifiers'. I think that indeed, it would be problematic on any kind of contact/participant search, if you search by email, and def. when a person 'registers' for an event, the 'strict' de-dupe rule (on email) will be an issue.
Thanks for replying, Joanne!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • WordPress Installations (Moderators: Kurund Jalmi, Coleman Watts) »
  • Question about importing -'individuals' vs household

This forum was archived on 2017-11-26.