I have a number of lists that I want to sync with our local SQL db. 2 examples - 'Active Guests' and 'Former Guests'. When a customer stays at our RV park (sometimes for 6-9 months at a time), they should be on our 'Active Guests' list. When they check out/leave, they should fall of the 'Active Guests' list and be added to the 'Former Guests' list. Obviously, we'll have repeat customers - at which point they should fall off the the 'Former Guests' list and be added back to the 'Active Guests' list.
What is the best way of syncing this data to Constant Contact? I can't do it on-demand - I can't modify the RV software/database and instead am relying on data exports from its system. It's trivial for me to create 2 lists from the DB - active and inactive guests - I'm just not sure the best way of syncing this data up to Constant Contact.
At first blush, I was thinking about 2 steps per list. For example,
1) Perform a bulk add/update and send the active guest data to the 'Active Guests' list.
2) Perform a bulk remove and send the former guest data to the 'Active Guests' list. (This removes guests that have checked out since the last sync.)
3) Perform a bulk add/update and send the former guest data to the 'Former Guests' list.
4) Perform a bulk remove and send the active guest data to the 'Former Guests' list. (This removes repeat guests who have checked back into the property since the last sync).
This seems awfully kludgy, and I'm not sure if it will preserve any opt-out preferences.
Suggestions and/or ideas?
Thank you for reaching out to Constant Contact's API Support.
I would do it basically how you mention. Assuming your database is the one with the most recent and correct data then I would first clear out the lists of contacts in your Constant Contact account. Then submit your new/updated list of contacts to the correct list within Constant Contact. If you want to use bulk methods here is how I would order them.
1. http://developer.constantcontact.com/docs/bulk_activities_api/bulk-activities-clear-contactlists.htm... (this can be used to clear both lists with one API call)
2. http://developer.constantcontact.com/docs/bulk_activities_api/bulk-activities-addcontact-multipart.h... (this is used to POST contacts using a csv file to the list)
3. http://developer.constantcontact.com/docs/bulk_activities_api/bulk-activities-addcontact-multipart.h... (same as step 2, just do this for which ever list you did not pick in that step)
Using those import bulk methods sets the parameter to ACTION_BY_OWNER which means you will not be able to add contacts that have unsubscribed.