cancel
Showing results for 
Search instead for 
Did you mean: 

Deleting Contacts and Bulk Deleting Contacts - PHP API v2

SOLVED
Occasional Advisor

Deleting Contacts and Bulk Deleting Contacts - PHP API v2

 

Our target group changes daily so maintaining contacts is not necessary.  Right now we clear our lists daily and then send a daily email but there's really no reason for us to have old, un-list-associated contacts sitting around...

 

So - via the site I can delete individual contacts but it looks like via the API I can only change status to 'REMOVED' - can I delete them completely via the API? 

 

Also, is there a way to bulk delete?

 

Thanks!

Tags (2)
11 REPLIES 11
Moderator

Re: Deleting Contacts and Bulk Deleting Contacts - PHP API v2

Contacts are never deleted in our system, including in the UI.  The "Delete" function of the UI simply marks them to not display.  You can still export them and the history of their sends continues to exist.

 

Because the API needs to be able to access these Contacts to update, retrieve information and be associated to reporting information, we provide them all through a status filter of "Removed" as you saw.  There is no way to permanently delete Contacts in the API as there is no way to delete them permanently in Constant Contact.

 

By deleting a list, or using the Bulk Activity to clear a list, you will automatically move your Contacts to a "Removed" state if they are not on any additional lists.  If you are basically just automating clearing a list and adding new contacts to a list, I would highly recommend using our bulk API functions to do this.  It is very simple to do the following pseudo-algorithm:

 

1. Create a Clear Contacts from List Activity: http://developer.constantcontact.com/docs/bulk_activities_api/bulk-activities-clear-contactlists.htm...

2. Create an Import Contacts Activity with up to 20,000 Contacts or 4MB of data: http://developer.constantcontact.com/docs/bulk_activities_api/bulk-activities-addcontact-multipart.h...

3. Repeat step 2 if over 20,000k Contacts or 4MB of data until all Contacts are imported http://developer.constantcontact.com/docs/bulk_activities_api/bulk-activities-addcontact-multipart.h...

 

All bulk activities are processes serially in the order they were created.  So, you can actually simply create all these activities and poll until they all complete to ensure that the process worked correctly.  Hope this helps!

Dave Berard
Senior Product Manager, Constant Contact
Occasional Advisor

Re: Deleting Contacts and Bulk Deleting Contacts - PHP API v2

 

Thanks for the quick response - just to clarify - the contact total allowed by my account will be assessed against all contacts added and I can never remove or reduce that number?  Or is it assessed by only looking at active contacts?

 

 

 

 

Moderator

Re: Deleting Contacts and Bulk Deleting Contacts - PHP API v2

Great question and very important one that I should have clarified.  Each bill is determined by the peak number of active contacts in the previous month.  Removed contacts are not used in that calculation with the exception being they were active at some point in time during the previous month. 

Dave Berard
Senior Product Manager, Constant Contact
Occasional Advisor

Re: Deleting Contacts and Bulk Deleting Contacts - PHP API v2

 

Thanks again - one last question - is there any way to see our monthly peak active contact count?  I can guess it based on our activity, just curious if it's displayed anywhere.

Moderator

Re: Deleting Contacts and Bulk Deleting Contacts - PHP API v2

That's a great question.  I checked with our billing team to see if that's available in our product and they let me know that it is not available today.  Our typical customer doesn't change very drastically throughout a month or even month to month (usual profile is slow, steady growth over time) and doesn't have generally have a max count that differs from their current Active count, so this is not a feature that our typical customer has requested before.

 

I can see why it would be interesting in your case as you have a highly volatile active list.  We don't currently support sharing that number out but I will bring the feature back to the team and see if this is something we can prioritize in the future.  In full transparency, as this is not something our typical customer runs into it will be a lower priority item unless we start to see higher volume of feedback so I would be remiss if I said it was something we would be getting to soon.

Dave Berard
Senior Product Manager, Constant Contact
Occasional Advisor

Re: Deleting Contacts and Bulk Deleting Contacts - PHP API v2

 

All makes sense - thanks Dave!

Occasional Participant

Re: Deleting Contacts and Bulk Deleting Contacts - PHP API v2

Deleting a particular contact from a particular list and that deletion should not affect the other list with the same email. Please provide a example code of it if any?.

Moderator

Re: Deleting Contacts and Bulk Deleting Contacts - PHP API v2

Hello,

 

Thank you for reaching out to the API Support team here at Constant Contact.

 

The method for removing an existing contact from a list is to update them, leaving the list you want them removed from off of the list array which would have all other lists they are on. We have an example of a signup form in our PHP SDK which shows the methods for getting a contact's information, as well as submitting an update to the contact. See here for details: https://github.com/constantcontact/php-sdk/blob/master/examples/addOrUpdateContact.php

 

Please let me know if you have any other questions!

 

Sincerely,
David B.
API Support Specialist

Occasional Participant

Re: Deleting Contacts and Bulk Deleting Contacts - PHP API v2

Please provide a answer for this..

 

Thanks in Advance!!!