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.

filtering a list by api (e-mail marketing campaign)

Highlighted
Occasional Participant

filtering a list by api (e-mail marketing campaign)

 Hi


I have a question regarding how to filter a list of contacts. So here is my problem:


I have created a list (called users) with these fields: Email Address,  City, Other State/Province, Custom field 1 and Custom field 2.


I want to create a e-mail marketing campaign using the list above , but filtered after these fields: City, Other State/Province, Custom field 1 and Custom field 2. How can i filter the list by api? In the example from the “Creating a Campaign” section


(http://developer.constantcontact.com/doc/manageCampaigns#create_campaign)  there is only the possibility to select one or more lists with contacts



(<EmailTextContent>&lt;Text>This is the text version.&lt;/Text></EmailTextContent>


      <StyleSheet></StyleSheet>


      <ContactLists>


        <ContactList id="http://api.constantcontact.com/ws/customers/joesflowers/lists/1">


          <link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/joesflowers/lists/1" rel="self" />


        </ContactList>


      </ContactLists>


      <FromEmail>


)NOT to filter one list by the fields I had mentioned about.


What would be the alternatives that I would have to overcome this shortcoming?…Create many new contacts list that I need to send campaign every time I create the campaign? In this way, I have several lists (which may contain the same users) for each e-mail campaign created…


 


Thanks.

2 REPLIES 2
Highlighted
Employee

Re: filtering a list by api (e-mail marketing campaign)

This capability is available within our UI by performing an advanced search, which you can learn more about in this faq. Unfortunately there is nothing available through the API that would be able to automatically sort and filter your lists for you. In addition, we do not have the functionality to send to a partial list at this time. If you are going to be sending to a unique list every time, you would need to either filter on your end or use our user interface to filter by certain fields to create a specific list for sending that email. I apologize for any inconvenience that this causes, please let us know if you have any further questions.

David J

Highlighted
Moderator

It's also worth mentioning

It's also worth mentioning that there is no penalty for having a contact in multiple lists.  If you send to multiple lists, we will merge those lists together on the send process and remove duplicates so that each email address only receives one copy.  There is also no additional costs for having an email in multiple lists as we bill based on total unique contacts.  In general, we recommend having smaller, targeted lists and making sure your email campaigns are focused on the audience that will be most likely to read them.  That way you are always sending emails that are topical and will increase your open and click rates.

Dave Berard
Senior Product Manager, Constant Contact
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