Answers.Body: <p>If you're doing this daily, it's better to automate and not rely on the GUI.</p>
  
  <p>If you're automating, you can either a) write a PHP script to handle what you're doing, optionally using API chaining to handle the activities and contacts together; or b) use a dedicated ETL tool like Kettle.  I have a client that daily imports contacts, activities, memberships and payments this way.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-15T00:53:37.567Z
Answers.LastActivityDate: 2016-06-15T00:53:37.567Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.Body: <p>You can cut down one step by assigning the to be imported contacts an external ID; then also use that external ID to import the Activities.</p>
  
  <p>Other than that - we end up writing mysql queries to import on an going basis from other data systems -  once these queries work well they can then be bundled into an extension - so admin staff can initiate/run the import at will.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-24T13:57:59.973Z
Answers.LastActivityDate: 2016-05-24T13:57:59.973Z
Answers.UserDisplayName: KarinG - Semper IT
Answers.Body: <p>Third solution would be to use an ETL-tool like Pentaho Data Integration (aka Kettle) to transform the import data and load it into the CiviCRM database. But like with the PHP script, you need to know the CiviCRM database well enough to know where to stick the data</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-15T06:22:47.750Z
Answers.LastActivityDate: 2016-06-15T06:22:47.750Z
Answers.UserDisplayName: ErikH - CiviCooP
Body: <p>Currently we are pulling multiple new contact lists from different sources daily.  They have to be imported and assigned activities in order for staff to process them as necessary.</p>
  
  <p>Our process now is to import the contacts without activities then exporting them to get the Contact ID then importing activities with the Contact ID that was assigned in the initial contact import.  Is it possible to import new contacts with activities so that we can avoid the export and second import step? </p>
  
  <p>I'm trying to save time and possibly automate this process.
  We have to do the whole import, export, import thing a few times as different groups and activities are specific to each source we pull from.</p>
  
  <p>Any tips or tricks are greatly appreciated.</p>
  
  <p>Thanks</p>
  
Tags: <contacts><import><activities><export><civicrm-entity>
Title: Possible to import Contacts and Activities at the same time?
ThreadText: # Possible to import Contacts and Activities at the same time?
  
  (Asked by: username_0 on 2016-05-24)
  
  Currently we are pulling multiple new contact lists from different sources daily. They have to be imported and assigned activities in order for staff to process them as necessary.
  
  Our process now is to import the contacts without activities then exporting them to get the Contact ID then importing activities with the Contact ID that was assigned in the initial contact import. Is it possible to import new contacts with activities so that we can avoid the export and second import step?
  
  I'm trying to save time and possibly automate this process.
  We have to do the whole import, export, import thing a few times as different groups and activities are specific to each source we pull from.
  
  Any tips or tricks are greatly appreciated.
  
  Thanks
  
  **Tags:** contacts, import, activities, export, civicrm-entity
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2016-06-15. Score: 2 | Accepted answer
  
  If you're doing this daily, it's better to automate and not rely on the GUI.
  
  If you're automating, you can either a) write a PHP script to handle what you're doing, optionally using API chaining to handle the activities and contacts together; or b) use a dedicated ETL tool like Kettle. I have a client that daily imports contacts, activities, memberships and payments this way.
  
  
  ---
  
  ### Answer by username_2 on 2016-05-24. Score: 3
  
  You can cut down one step by assigning the to be imported contacts an external ID; then also use that external ID to import the Activities.
  
  Other than that - we end up writing mysql queries to import on an going basis from other data systems - once these queries work well they can then be bundled into an extension - so admin staff can initiate/run the import at will.
  
  
  ---
  
  ### Answer by username_3 on 2016-06-15. Score: 1
  
  Third solution would be to use an ETL-tool like Pentaho Data Integration (aka Kettle) to transform the import data and load it into the CiviCRM database. But like with the PHP script, you need to know the CiviCRM database well enough to know where to stick the data
  
  
  ---
  
  