Syncing lists with custom CMS

Regular Participant

Syncing lists with custom CMS



I've just started using the API and am looking for an easy way to syncronize my constant contacts lists with my CMS's own data.


Instead of adding/removing/updating contacts each time an event takes place on the CMS side, I'd rather run a script nightly to 'dump' my lists from my CMS to constant contact. I see that there are methods to add/modify/delete contacts and lists but is there any simpler way for me to do this and simply overwrite the info nightly?


My data is currently stored in mysql DBs and I'm using mostly C or php to query and construct the data.


Any help is appreciated.



Hey Gerard,


I believe what you are doing may be done much simpler by doing a simple post to your account when your contacts are created.  By dumping the data at one time will not be very efficient as your going to upload contacts that already exist, have opted out or if their status did not change.  If you are you going to do a mirror from your database you would have to use our bulk load activity.


The way this would work is to convert your mySQL to a CSV file by fetching the information from the database.  You can find an example I found online here.  From there you would have to use that CSV to upload into your account by doing a bulk activity which you can find some more information on this process here.


Please let me know if that helps.

Ryan Davis
Quality Engineer
Regular Participant

Ryan - I understand that and I wish I could use the simpler method.


The issue is that we have a very large CMS and there are many functions where data is added/updated/removed by various people and systems. Instead of finding each one of those and adding hooks to your code, it would be easier to simply write 1 program to dump the DB at specific intervals.


I looked at the URLs you sent me. For the 2nd URL are you confirming that the activity is actually going to overwrite the entire database and start fresh every time? or is it simply adding data to the existing list?


I'm looking for a way to 'sync' my db to yours. The easist way for me to do this is to rewrite it to you every time I need to do it. I dont have many addresses, maybe 5K max. Are there no tools already written to do this? maybe some CLI tools?



The link that I provided you with will update the existing information.  It will not remove anyone from the list but it will add them if they do not exist.  There are no existing tools to do this currently. 

Ryan Davis
Quality Engineer
Developer Portal

View API documentation, code samples, get your API key.

Visit Page