Is there a way to create Campaign Template Variables

761 views
Skip to first unread message

Bus

unread,
Dec 22, 2009, 3:00:25 PM12/22/09
to MailChimp API Discuss, sc...@bookfresh.com
After reading through the posts, and looking at the API docs, it
appears that there is no way to pass a list of name-value variable
values into a campaign that would populate into a template.

So for example, if I wanted to give my list subscribers an email
highlighting a particular sale item, and I wanted to provide some
details of that item (name, description, price, image, link to the
website, etc) it appears that the only way for me to do that is to
either pass in the html content, or specify a URL where MailChimp
could pull the HTML content from.

I understand that it might be possible to use mergevars, but it's not
really subscriber data that I want to pass in.

Do I have that right that there is no way for me to pass in name-value
variables for the campaign email?

Thanks.

jesse

unread,
Dec 22, 2009, 3:15:38 PM12/22/09
to MailChimp API Discuss
What you are describing sounds exactly like what merge vars are for.
They are also the only way to inject custom content into a campaign at
the subscriber level.

If you don't need subscriber specific data, then I'd suggest creating
a template with one or more sections that you can populate with the
content when you create the campaign.


jesse

Bus

unread,
Dec 22, 2009, 3:40:03 PM12/22/09
to MailChimp API Discuss
Yes, but I don't want to have to inject data at a per subscriber
level. That sounds like it would mean iterating all the users on the
list and specifying the same values. That sounds pretty inefficient.

Per your other suggestion, what do you mean relative to creating
templates with one or more sections? Are you meaning like "header",
"body", and "footer", or can you create sections like
"item_description" or "primary_splash". You know content that is
entirely general and meaningful only to how we've structured our email
template?

thanks,

jesse

unread,
Dec 22, 2009, 4:34:57 PM12/22/09
to MailChimp API Discuss
Right, if it's not subscriber specific data, there's little point in
using merge tags.

The documentation for our template language is here:
http://www.mailchimp.com/resources/email-template-language/

A discussion on inspecting and using templates via the API is here:
http://groups.google.com/group/mailchimp-api-discuss/browse_thread/thread/2fc50342e5a3544e

The 2 limitations I know of when using those are:
* You can't easily retrieve the existing content for a section
* The more advanced section types (editable images and repeatable
sections) aren't directly supported and not documented (though it
maybe possible to figure them out)

Take a look through that and post back if you have further questions
or issues.


jesse

Reply all
Reply to author
Forward
0 new messages