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.


3 Answers 3


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.


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.


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.