We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

Email Campaigns using C# Library

Yogi_Master
Regular Participant

Email Campaigns using C# Library

Hi guys/gals,

 

I saw this post: http://community.constantcontact.com/t5/Developer-Support-ask-questions/Working-with-email-campaigns...

And I am wondering if it is possible to do this through the API:

 

1. Create a new Contact List (Done - yes I can do it)

2. Bulk add a bunch of Contacts to that list (Done - yes I can do it)

3. Create an Email Campaign that is linked with an Email Template (Not through the API)

4. Link my new Contact List to that Email Campaign (Through the API)

 

So my plan was to create an Email Campaign and an Email Template (We'll call it "Contacts to talk to each month")

And each month, I would run a report and get that month's Contacts, and link them to the email.

That way, I would only have to create the Campaign and the Template once.

 

But it sounds like I cannot edit a Sent Campaign, I have to create a new one each time. That is fine.

Can I at least "Re-use" the Template?

 

Thanks!

 

6 REPLIES 6
Yogi_Master
Regular Participant

Sorry, I think I just found the answer to my question here:

http://community.constantcontact.com/t5/Documentation/Creating-a-Campaign/ba-p/25047

 

It says that you ONLY allow "custom-code" Campaign creation through the API.

So I take that to mean that I cannot use an already created template in my campaign.

 

Hi,

 

While we do only allow custom coded emails to be created in our API, you should be able to modify an already created template email with the API for the purpose of adding lists to it, and scheduling it out, if you have the scheduling API.

 

If you have any questions about this please let me know!

Benjamin Soder
NOC Analyst
Constant Contact
Yogi_Master
Regular Participant

Oh, - that sounds like it might meet my needs. Do you have an example of something like this?

So I would take an existing email campaign (that might have already been SENT), and basically "reset" it.

I would remove the existing list, and link it to my newly created list...

Hi,

 

If you have a non-custom code email that was already sent, there is no way to copy it in the API, and you cannot modify information on an already sent campaign.  If you have a draft campaign, whether it be a newly created draft, or a template campaign that was copied in the UI, you can then use the API to add or remove lists, by doing a GET on the campaign id, and then taking that and adding lists to it, and then doing a PUT https call back to the campaign id.

 

Since you are using the C# library, there is both a function to get the campaign, and also update the campaign.  Keep in mind though that updating a campaign that is not custom code is very limited, and I am only aware of the ability to add and remove lists to it.

 

If you have any questions please let me know.

Benjamin Soder
NOC Analyst
Constant Contact
Yogi_Master
Regular Participant

Sorry to keep pushing this issue, but I still can't quite grasp if this is possible:

 

So I basically want to "re-use" an Email Template.

 

Step 1: An account owner would log in to their CC account, and create an email template (Campaign, I guess)

They will call it "My Monthly Contact Email"

Step 2: They give me the name of the email they want to use

Step 3: I connect in through the API, and assign a list of contacts to that email.

Step 4: The next month, I want to remove the current list of contacts and a new one to that same email

 

I want to give them control over what the email looks like. The only thing I want to do is determine what contacts the email should be sent to, and then send it.

Does that make sense? And is there a way to do that?

 

Thanks!

There are two potential problems here for you.

 

Once a Campaign is sent, there is no way to change the associated list(s) with that Campaign.  It is locked for all editing/modification purposes, the only options are to resend it to Contacts who have not previously received it (to prevent accidental multiple sends). 

 

If you are using one of our templates, instead of custom HTML/XHTML code, there is no way to reuse that template through the API (through copying or any other method).  The only way to get that Campaign to be copied is through our web UI and a manual copy.

 

What is your goal with this copied campaign?  Usually when someone is sending a Campaign monthly, there is not only new content added, but any reused content must generally be refreshed on a regular basis to make sure it's not out of date.  Perhaps if you provide a little more information on what your Campaign's goal is and the content, we can provide a potentially better solution through our product, API or partners.

Dave Berard
Senior Product Manager, Constant Contact
Developer Portal

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

Visit Page