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 CiviMember (Moderator: Deepak Srivastava) »
  • Importing dates and memberships
Pages: [1]

Author Topic: Importing dates and memberships  (Read 2605 times)

Laryn

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 4
    • CEDC
  • CiviCRM version: 4.6.x
  • CMS version: Drupal 7
Importing dates and memberships
October 18, 2007, 10:56:15 am
As we move our user data over, how can we import their membership info (date of first contact, date membership expires, type of membership) along with their contact info?

We have the membership types set up in CiviMember, but I can't figure out how to take the fields from the CSV and drop them into the fields in CiviMember...those fields don't show up under the "Import" function.

Peace,
Laryn
CEDC...social justice by design

*Get support on the new CiviCRM help site. /laryn

Laryn

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 4
    • CEDC
  • CiviCRM version: 4.6.x
  • CMS version: Drupal 7
Re: Importing dates and memberships
October 18, 2007, 11:35:45 am
I am going to try to import members, then export members (so they have a member id associated with them), then tie the dates back to that member id and import directly in the _membership table in MySQL admin... If there's an easier way, or something I'm missing, please shout!
CEDC...social justice by design

*Get support on the new CiviCRM help site. /laryn

Laryn

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 4
    • CEDC
  • CiviCRM version: 4.6.x
  • CMS version: Drupal 7
Re: Importing dates and memberships
October 18, 2007, 12:52:14 pm
Hmm....I think this should work, but it won't let me import. I've created csv's with all the values for _membership and _membership_log, but get foreign key constraint errors no matter which I try to import first:

Quote
#1452 - Cannot add or update a child row: a foreign key constraint fails (`civicrm_test/civicrm_membership`, CONSTRAINT `FK_civicrm_membership_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`))

Quote
#1452 - Cannot add or update a child row: a foreign key constraint fails (`civicrm_test/civicrm_membership_log`, CONSTRAINT `FK_civicrm_membership_log_membership_id` FOREIGN KEY (`membership_id`) REFERENCES `civicrm_membership` (`id`))

Any tips or advice on this?
CEDC...social justice by design

*Get support on the new CiviCRM help site. /laryn

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Importing dates and memberships
October 18, 2007, 03:26:28 pm
As described in the rollover help on the Import Membership page:
------------
Contact Records for Members
Membership import requires that each person, household or organization already exists as a contact record in your CiviCRM database. If you need to import memberships for contact records which haven't been added to CiviCRM yet - you will do this in 2 steps. First, use Import Contacts to add the contact records. If possible, include a unique 'External ID' for each new contact which you can then use to match memberships to contacts. Then return to this screen and import the membership records.

Matching Memberships to Contacts
Membership import files must contain data needed to match the membership to the contact record. This 'matching' can be handled in several different ways:

    * Include the data fields used for contact 'matching' based on your configured Duplicate Matching rules. For the default duplicate matching rules, you would include 3 columns in each row with the members' First Name, Last Name and Email Address.
    * If you've stored a unique External Identifier for each contact in CiviCRM, you can include that value as a column in your import file. Memberships will then be matched to contact records using their External ID.
    * You can include a column with each contact's Internal Contact ID. This is the unique ID assigned by CiviCRM which is displayed at the bottom of the Contact Summary screen - and can be exported.

      Save the CSV file with your membership data and 'contact matching' data to your local hard drive (or an accessible drive on your network) - and you are now ready for step 1 (Upload Data).
-------------

Using this approach, you should be able to insert memberships for the contacts and map Signup Date ("date of first contact"), Expiration etc.
Protect your investment in CiviCRM by  becoming a Member!

Laryn

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 4
    • CEDC
  • CiviCRM version: 4.6.x
  • CMS version: Drupal 7
Re: Importing dates and memberships
October 22, 2007, 07:26:01 am
I didn't realize there was an automatic import....and I'm still having a hard time finding the "Import Memberships" page you mention...can you tell me where the link is? (Or what the URL is?)
CEDC...social justice by design

*Get support on the new CiviCRM help site. /laryn

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Importing dates and memberships
October 22, 2007, 09:23:30 am
Make sure that CiviMember is enabled (Admin CiviCRM >> Global Settings >> Enable Components). Then click CiviMember in the CiviCRM menu - and you'll see sub-menu items: Find Members, Import Members

On the demo:
http://demo.civicrm.org/drupal/civicrm/member/import?reset=1
Protect your investment in CiviCRM by  becoming a Member!

Laryn

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 4
    • CEDC
  • CiviCRM version: 4.6.x
  • CMS version: Drupal 7
Re: Importing dates and memberships
October 22, 2007, 09:58:53 am
Hmm...I don't see the submenu item on my theme -- I'll have to look into that (maybe a css issue?). But using the URL /civicrm/member/import I can find the page. Thanks for that! I appreciate all your help with this.

I am uploading the csv and matching the fields, but I get this message:
Quote
CiviCRM has detected invalid data and/or formatting errors in 620 records. These records have not been imported.

In the downloaded "errors" file, it says: "Required parameter missing" for the reason on all fields.

These are the fields in the csv:
Quote
"First Name","Last Name","Email","contact_id","join_date","end_date","membership_id","status_id","is_test","start_date","source","membership_type_id"

I think everything is included in that list, isn't it?
CEDC...social justice by design

*Get support on the new CiviCRM help site. /laryn

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Importing dates and memberships
October 22, 2007, 10:29:12 am
Searching this forum with the error message "Required parameter missing" returns this topic:
http://forum.civicrm.org/index.php/topic,1292.0.html

hope that helps...
Protect your investment in CiviCRM by  becoming a Member!

Laryn

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 4
    • CEDC
  • CiviCRM version: 4.6.x
  • CMS version: Drupal 7
Re: Importing dates and memberships
October 24, 2007, 09:21:25 am
Quote from: Dave Greenberg on October 22, 2007, 10:29:12 am
Searching this forum with the error message "Required parameter missing" returns this topic:
http://forum.civicrm.org/index.php/topic,1292.0.html

hope that helps...

Well, after much banging of the head on the desk, I found out that the parameter wasn't missing. Certain fields (like Membership type) are set not to use the id # (as I assumed it would, since that number won't change) but actually wanted the name of the Membership (string...in our case stuff like "Individual Membership")...

Hope this helps somebody else -- and Dave, thanks again for all your help as we work through the wrinkles of this conversion.

Peace,
Laryn
CEDC...social justice by design

*Get support on the new CiviCRM help site. /laryn

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Importing dates and memberships

This forum was archived on 2017-11-26.