The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

Last_Modified in Bulk Export

SOLVED
Go to solution
Highlighted
Visitor

Last_Modified in Bulk Export

I have two places where a contact could unsubscribe, either directly in Constant Contact (by using an unsubscribe link in an email) or via my website (where the contact details originate from). The result is that I have two lists of contacts that need to be synchronised.

 

I decided to download the bulk contact lists from Constant Contact (both 'active' and 'opted-out') and then compare them to the DB on my website to find out which contact was update most recently. For example, if the most recent modification date was in Constant Contact and it was in the 'opted-out' list then the contact has opted out via email and I need to unsubscribe them on my website database too.

 

When developing my API I decided to request all opted out contacts bby using the bulk export API and requesting the predefined list ID of 'opted-out' and I would set the flag export_date_added to true. From the API documentation this field should "adds a column showing the date that each contact was added to list". However, this does not behave as expected and instead returns the date that the contact was added to the contact list that it is assigned to ('General Interest'), not the list I am requesting ('opted-out').

 

So how do I find out when a contact was added to the unsubscribed (opted-out) list? Currently I think the only way to know is to retrieve the opted-out list (which does not have this field), and then itterate the list to retrieve the individual contact for each one as the individual contact does have this field. I suspect that I will end up hammering the Constant Contact server if I do this.

 

Does anyone have a suggestion please?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Visitor

Re: Last_Modified in Bulk Export

So I solved this myself.

 

the bulk export API is the wrong API to use for this type of thing, for this you should be using the contact collection API as this returns the modified date and all other data. It also allows you to set the since_last_modified date so that you are not pulling every contact in your database through the download.

 

Do not use this:

http://developer.constantcontact.com/docs/bulk_activities_api/bulk-activities-export-contacts.html

 

Instead use this:

http://developer.constantcontact.com/docs/contacts-api/contacts-collection.html

 

I hope this helps someone else in future

View solution in original post

2 REPLIES 2
Highlighted
Visitor

Re: Last_Modified in Bulk Export

So I solved this myself.

 

the bulk export API is the wrong API to use for this type of thing, for this you should be using the contact collection API as this returns the modified date and all other data. It also allows you to set the since_last_modified date so that you are not pulling every contact in your database through the download.

 

Do not use this:

http://developer.constantcontact.com/docs/bulk_activities_api/bulk-activities-export-contacts.html

 

Instead use this:

http://developer.constantcontact.com/docs/contacts-api/contacts-collection.html

 

I hope this helps someone else in future

View solution in original post

Highlighted
Moderator

Re: Last_Modified in Bulk Export

Hi @user6415,

 

Glad you were able to locate the correct endpoint on your own over the weekend.

 

To comment on why the Bulk endpoint does not work the way you thought it would. The opt_out is not a list that a contact gets added to which is why that endpoint does not list the contacts in the way you thought they would.


Regards,
Jimmy D.
Tier II API Support Engineer
Developer Portal

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

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured