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.

Removing 'removed' contacts completely

Highlighted
Occasional Contributor

Removing 'removed' contacts completely

is it poss to remove all the removed contatcts. I'm doing a getSubscribers() and have a list full of garbage from testing.  I suppose I could filter it myself.

 

What happens with 'removed' contacts? can they be reinstated?  More importantly, if I just add them again in the future, will it allow me to add a 'new' contact with an email that is on the removed list? (even with Action by Customer?)

6 REPLIES 6
Highlighted
Regular Advisor

Re: Removing 'removed' contacts completely

Hi,

 

Removed contacts are stored permanently in your account. They cannot be deleted completely.

 

Removed contacts can be made active again, but you have to update them (using the PUT method) instead of adding them anew (using the POST method). You perform the PUT against the URL containing the contact's ID, like this:

 

https://api.constantcontact.com/ws/customers/{username}/contacts/{contact-id}

A technique for fitlering them out is to just query the active contacts in your account, with a URL like this:

 

https://api.constantcontact.com/ws/customers/{username}/lists/active/members

I'm not sure which wrapper or program getSubscribers is located in, so I cannot provide help for that specific function without knowing the code that makes up the function.

 

Thanks,

Richard Maxwell
Support Engineer, Constant Contact
Highlighted
New Member

Re: Removing 'removed' contacts completely

How will the account get charged monthly since the fee is based on number of contacts in the account?

does the monthly fee based on the active contacts in that month?

 

thanks

 

Highlighted
Moderator

Re: Removing 'removed' contacts completely

The fee is based on total Active Contacts in the account (peek Active each billing cycle, to be exact).  Removed and Do Not Mail Contacts are not counted for billing purposes.

Dave Berard
Senior Product Manager, Constant Contact
Highlighted
Occasional Participant

Re: Removing 'removed' contacts completely

Hi, this post is old but it can be useful to other users who like me are working on this.
If you have removed a contact from all list, this is put in "Removed" list.
You can retrieve that contact.
You have to take that specific contact and change its List<ContactList> into a used list.
That contact will migrate from Removed list to this new list.
All through API

Software Developer
Highlighted
Employee

Re: Removing 'removed' contacts completely

Hi Alberto,

 

Good point, and thanks for posting. That is a common point of confusion. Once a contact has ever been in an account, it must be updated instead of being re-added. Therefore, your code should query by email address, and get the contact and update it if it did exist, or add the contact if it never existed.

 

The <ContactLists> node is what you add to in the V1 API to change a contact from Removed to Active; in our V2 (json) API, you add list id's to the "lists" in the json payload to move a contact from Removed back to Active.

 

Best Regards,

Shannon Wallace

Partner API Support Engineer

 

 

Highlighted
Occasional Participant

Re: Removing 'removed' contacts completely

Thank you Shannon,
If I may, I would post some rows of my code hoping they are useful to someone.

 

Best Regards,

Alberto

 

 

yourMethod(){ 
	/**check if that email is already used by an active contact**/
	if(existsContactMailBool(miaGetList(),this._newAddress )==true){
	//...your code

	/**check if that email is ALREADY used by a deleted contact**/
	}else if(existsContactMailBool(getListRemoved(),this._newAddress )==true){
	try{
		System.out.println("Mail just used by a removed contact, retrieve it");
		
		List<ContactList> newList= new ArrayList<ContactList>();
		newList.add(this.getCtctManager().getAList("yourspecificListID"));
		
		Contact contactUsed=getContactByEmail(getListRemoved(), this._newAddress);
		contactUsed.setLists(newList);
		this.getCtctManager().updateAContact(contactUsed);
		
		//...your code
	}catch(Exception error){
		//...your code
	}

	/**email address is NEW**/
	}else{ //your code}
}

public boolean existsContactMail(List<Contact> list, String mail){
        if(list== null){ System.out.println("list empty");
		}else{
            for(Contact temp: list){
                if(contain(temp.getEmailAddresses(),mail)) {return true;}
			}
		}
    return false;
}


public boolean contain(List<EmailAddress> lista, String name){
	boolean result=false;
	for(EmailAddress tmp : lista){
		if( name.equals(tmp.getEmailAddress())){
			System.out.println("\n>>Found :"+tmp.getEmailAddress().toString());
			return true;
		}
	}
	return result;
}
	
//to take your Contact
public Contact getContactByEmail(List<Contact> list, String mail){
	Contact result=null;
	if(lista== null){ System.out.println("list empty");}
	else{
		for(Contact temp: list){
			if(contain(temp.getEmailAddresses(),mail)) {return temp;}
		}
	}
	return result;
}	
	

 

Software Developer
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