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) »
  • Including Contact Names in Organization Records
Pages: [1]

Author Topic: Including Contact Names in Organization Records  (Read 1942 times)

annaleevk

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 3
  • Carpe Noctem!
    • Women in Development, New York
  • CiviCRM version: 3.4.5
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.48
  • PHP version: 5.2.14
Including Contact Names in Organization Records
September 19, 2009, 09:24:22 pm
I've just launched my first site http://handson.org and have read thru the docs on Org vs. Ind. vs. Household records but cannot find anywhere what is recommended when you want to associate an individual, i.e., contact name at an organization.  I am not talking about relationships, BTW....I get that.

For mailing purposes, we want to be able to address an organization as such:

John Smith
CEO and President
ABC Corporation
123 Main Street
Anytown, NY 10012

For emailing purposes, we want to be able to say:

Dear John:

Here are my questions:

1.  Other than creating custom fields contact_title, contact_fname, contact_mname, contact_lname, contact_suffix for the ORG record is there a better place to store this information?
2.  NOTE:  I tried creating a relationship to an individual record which worked fine, however, there is no way to pull the individual's name as the primary contact for that organization for the purposes of mailing labels.  So how would this work? 
3.  Is there any way to have 2 or perhaps 3 different address formats for the different types of contact records?  Might this work in the future to allow you to define different standard address formats for different types of records?

Thanks in advance.  Am running Drupal 6.14 and CiviCRM 2.29.
Annalee Van Kleeck
Lyric Systems, LLC
201 951.8711
annalee@lyricsystems.com

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: Including Contact Names in Organization Records
September 20, 2009, 08:17:51 am

here are my answers :)

1. For the short/medium term this is your best solution (IMO)

2. You can potentially do this using token hooks that pulls in the individual names as your hook tokens. Some amount of php/mysql experience needed for this :)

3. Yes, i suspect in future we will have multiple address formats for different scenarios. We currently have a different format for address display vs mailing label

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

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Including Contact Names in Organization Records
September 20, 2009, 08:32:00 am
Hi Annalee,
Regarding #3 first (different address formats) - in 3.0 the format options for the (Postal) Addressee are configurable by record type, and additional formats can be defined for each record type. The format patterns can include tokens (including custom field tokens). You can see the admin configuration for this by navigating to Administer >> Option Lists >> Address Formats.

Also for each contact record you get to assign one of the available format patterns OR you can assign a completely custom Addressee value for that contact.

You include whatever Addressee contents is configured for the selected contacts in Mailing Labels using the {contact.addressee} token. So - there's a lot more flexibility for this in 3.0.

That said, I think there's several ways to handle your use case (especially if you're up for implementing some "token hooks"). One approach would be (using the John Smith example):

* Use the Individual records of the primary contacts for your mailings.
* Addressee is defined as first and last name
* Populate his Job Title field ("CEO and President") and add {contact.job_title} to your Mailing Label format
* Add {contact.current_employer} to your mailing label format as well - if you've populated that from his contact edit form (or via relationship tab) - it will evaluate to ABC Corporation

There may be some hitches with this - altho I think the mailing label token eval will (should) skip lines for contacts that don't have that property fillled in.

Others folks here may be doing this in other ways - if so please jump in with suggestions.
----
UPDATE: Didn't include this above... but you would also be setting the individual contact's Work address to be the employer address. There's a "candidate" feature for 3.1 which would support sharing addresses between an individual and their employer (or between any contact records). If that gets coded - then the above will be a bit better approach since you can just "point" to the employer address.

« Last Edit: September 20, 2009, 09:04:12 pm by Dave Greenberg »
Protect your investment in CiviCRM by  becoming a Member!

annaleevk

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 3
  • Carpe Noctem!
    • Women in Development, New York
  • CiviCRM version: 3.4.5
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.48
  • PHP version: 5.2.14
Re: Including Contact Names in Organization Records & Another Address Question
September 22, 2009, 10:11:37 pm
Thanks to Lobo & Dave for the speedy response!  Really enjoyed meeting you both at the CiviCRM class.  I took the custom field solution as time was short and I've not yet dipped my toes into the code waters yet.  I have Hershel for that  :)  I am very encouraged to hear about address formats for different record types in the future release.  I think that would help considerably.  My solution for the interim was to create a set of inline custom fields for the org contact name and jobtitle.  Then I created an org export that included those fields for her mailings.

Another question along the lines of addresses:  The Address Name is defined as a place to put Work, Home, Vacation, etc. even though there is a location type field.  I noticed that when someone gets in CiviCRM by buying a ticket, their full name is placed in this field.  Should this be happening?  In this particular case, we are just asking for their money to buy the tickets so there is no profile collecting data, we just get the billing address.

Just want to make sure what I should be putting in here 'cause now I'm getting a mixture of full names and address types in the address name field and that could be confusing in the future.

Thanks again,
Annalee
Annalee Van Kleeck
Lyric Systems, LLC
201 951.8711
annalee@lyricsystems.com

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Including Contact Names in Organization Records
September 24, 2009, 03:17:25 pm
Quote from: annaleevk on September 22, 2009, 10:11:37 pm
Another question along the lines of addresses:  The Address Name is defined as a place to put Work, Home, Vacation, etc. even though there is a location type field.  I noticed that when someone gets in CiviCRM by buying a ticket, their full name is placed in this field.  Should this be happening?  In this particular case, we are just asking for their money to buy the tickets so there is no profile collecting data, we just get the billing address.

Just want to make sure what I should be putting in here 'cause now I'm getting a mixture of full names and address types in the address name field and that could be confusing in the future.

Hmm - where did that definition for "Address Name" come from (it's a bit off track). Addresses have a Location Type (Home, Work, ...) and OPTIONALLY can have an Address Name which is intended to provide additional descriptive info. Some examples:

Location Type: Home
Address Name: Summer Home

Location Type: Event Venue
Address Name: Simmons Auditorium

Regarding billing addresses from a paid event registration form - the Billing Address Name is populated with the Billing First and Last Name for this flow since it's "the name on the credit card" - and might not actually be the contact's name. If your registration form also includes a profile with First and Last Name - then THAT will be the contact first / last, and the Billing first/last is just in the Billing Address name for reference. In your case - it's in both places.

« Last Edit: September 24, 2009, 03:21:23 pm by Dave Greenberg »
Protect your investment in CiviCRM by  becoming a Member!

annaleevk

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 3
  • Carpe Noctem!
    • Women in Development, New York
  • CiviCRM version: 3.4.5
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.48
  • PHP version: 5.2.14
Re: Address Names
September 24, 2009, 08:51:35 pm
Thanks for the response re: Address Names.  Sorry for the non sequitur but it's all one big site launch to me so I'm thinking of everything at once all of the time. 

To clarify:

1.  One of my first ticket buyers purchased a ticket via this form https://handson.org/civicrm/event/register?id=14&reset=1 .
2.  His fullname was populated in the Address Name field for his billing address. See attached snapshot of his record.
3.  No profile is being used on the ticket form above.

Is this supposed to happen?  And if so, what should be happening.

Thanks,
Annalee
Annalee Van Kleeck
Lyric Systems, LLC
201 951.8711
annalee@lyricsystems.com

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Including Contact Names in Organization Records
September 28, 2009, 11:45:11 am
Yes - that is the expected behavior. See the last sentence in my previous post here.
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Including Contact Names in Organization Records

This forum was archived on 2017-11-26.