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) »
  • Primary contacts for organisations
Pages: [1]

Author Topic: Primary contacts for organisations  (Read 1970 times)

gg66

  • I post occasionally
  • **
  • Posts: 42
  • Karma: 0
Primary contacts for organisations
March 31, 2008, 09:27:35 am
Hi,

I'm new to CiviCRM so apologies in advance if this is something i should know...

I want to assign a primary contact to each organization in CCRM. For e.g I have a database of organizations but I want to send out email invitations to only the relevant person for that organization. Same would apply for other types of email notifications but always the same person.

What the easiest way of doing this?

thanks in advance

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: Primary contacts for organisations
March 31, 2008, 11:29:32 am

I dont think we have a good default way to handle the below. One option would be:

a. Create a new custom field called "Primary Contact For" and add the organization name to this field
b. Create a relationship between the organization and the individual. This is not needed, but might help you keep things consistent and clear.
c. Create a smart group where this field has a value. You might need to modify the where clause in the db to ensure this
d. Use this smart group for all your email notifications.

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

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Primary contacts for organisations
March 31, 2008, 02:00:55 pm
Agree with Lobo, that's definitely something that is missing and that we need.

Other way of doing it:
1) you put the email of the main contact in the email of the organisation
2) you create a new type of relation "main contact of" between and individual and an organisation, but you're going to loose some possibility to create filters on fields both from the contact and organisation probably

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Primary contacts for organisations
May 21, 2008, 11:10:28 am
I've handled primary contacts through custom fields, and it works relatively well. Problem is that there are no rules to ensure each org has one (and only one) primary contact.

Anyway, just looking through the schema on another issue, and noticed there's a primary_contact_id field in the contact table. Is this used for households (I don't use households, so I'm less familiar with usage)? Couldn't this be extended to the indiv-org relationship? Would be very useful.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Primary contacts for organisations
May 21, 2008, 11:37:42 am
I'm pretty sure we don't use this field. It was intended to be used more or less as described in this thread (for Orgs and/or Households) -but was somewhat superceded by the more flexible Relationships data model. We need to either decide to implement support for it or ditch it :-(

I'm a bit biased toward figuring out a way to solve the "primary contact for ..." within the Relationship data model. But I recognize that this adds a lot of complexity - and support for both input and retrieval of "related contact info" is still limited. In 2.1 we've added a "permissioned" flag to Relationships which gives the permissioned contact the ability to edit info about "their org". This is a similar concept to "primary contact for..." - but clearly not the same thing.
Protect your investment in CiviCRM by  becoming a Member!

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Primary contacts for organisations
May 21, 2008, 12:11:54 pm
I agree it makes more sense as part of the relationship structure rather than the contact structure. I actually played with creating a custom "primary contact" field as a relationship type custom data group, but it's a little harder getting at those fields through the interface, so I ended up using the contact type custom field.

Also agree that the primary contact would work like permissioned user, with the exception that you would only have one primary, where you could conceivably have multiple permissioned.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

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: Primary contacts for organisations
May 21, 2008, 12:14:14 pm

we should drop primary_contact_id from the schema, IMO:)

putting it in the relationship is a more scalable model that can apply to a wider variety of orgs

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

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Primary contacts for organisations
May 21, 2008, 02:21:09 pm
Hi - would really appreciate some of your collective thoughts on this posting http://forum.civicrm.org/index.php/topic,3405.0.html which you may not see is related, but is trying to get to the nub of how we deal with 'positions' rather than people. It would also be a tidier way of dealing with the above since one can then set one of the 'office/role' contacts I am suggesting as being the primary contact.

The argument will, I expect, go along the lines of we can't have contacts who are not individuals or orgs etc. My point, which I hope is better explained in the thread I am trying to divert you to, is that the 'office/role/position' is often more durable than the person - and being able to have contact details belong to the 'office/role/position'  gets around some of the issues when people move on from a role.

Take George Bush (please someone!) - the 'office/role/position'  is the President of the United States (oh yes, of America - can we please get the Country list to specify the United States as the United States of America  ;)).

NOw it is really useful for us to have the contact phone number and address so we can give the President a ring. I dare say the phone number doesn't change when the President does. Therefore it makes more sense to have the contact details 'belong' to the 'office/role/position' rather than the individual - and we simply need a relationship between the individual and the 'office/role/position'

And of course it helps in all those situations where you know the position exists, but may not have the person's name.

Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Primary contacts for organisations
May 21, 2008, 05:36:03 pm
At Lobo's suggestion as he sees some merit in this approach (well he isn't writing it off yet at least  ;)) have put up a wiki page here which has what i hope is a more rationale explanation and argument http://wiki.civicrm.org/confluence/display/CRM/New+contact+type+for+Position+or+Office
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Primary contacts for organisations

This forum was archived on 2017-11-26.