Integrating Constant Contact with promotional system


Integrating Constant Contact with promotional system



I am a developer who is working for a client who uses Constant Contact. The client wants a customized promotion system for his store implemented. I am not sure if Constant Contact will be the right product for the client, so I have a few questions in regards to the API.


I want to make a rough interface for the client to create the initial promotion and send this into some sort of "draft" state on Constant Contact. The promotion should have a custom code generated by the client's server for each email address:

1) I am assuming I can specify each email address individually in the API -- is this possible?

2) Is it possible, via the API, to add a custom code or URL for each email and have it located at a specific point in the email? If so, how?

3) Does Constant Contact have some sort of draft system where the client can modify the promotion's text before sending out the emails? If so, how can I do this in the API?






Each email address is entered into our database as a Contact. Each contact can be called specifically by an API call, and you can store information related to each specific email address. We have alot of common fields to use (first/last name, address, phone number), as well as 15 custom fields that you can add different information to.


You can insert any of these fields dynamically into a campaign. There is a very specific method to this, though. Inserting the custom fields is an XHTML tag, so trying to insert this tag in the middle of an already existing tag will cause an error in the parsing. So, you'll need to actually build the link in some custom fields, then include the dynamic information in another. I'll give a quick example:


<a href="<Property name="Subscriber.CustomText1"/>">link text</a>

Custom Field 1 = <a href="
Custom Field 2 = 123456
Custom Field 3 = ">link text</a>

<Property name="Subscriber.CustomText1"/><Property name="Subscriber.CustomText2"/><Property name="Subscriber.CustomText3"/>

 Any email campaign is set to draft as soon as it is created, and it can then be called and edited by the API. Only custom code can be used through the API, our editing tools don't translate over, but you can receive the full code of the body of the email from a call.


I know that's a little long-winded, so let me know if you have any questions. Thanks!

Nick Galbraith
Support Engineer

Ok, thanks!

Developer Portal

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

Visit Page