Intent:Create custom campaigns that allow our contacts to quickly jump to dynamically updated web content based on our contact's preferences.
Field Variable Reference:
|Contact Property||Variable Name in Email Campaign||Import File Column Name|
|Email address||$SUBSCRIBER.EMAIL||Email Address - Work|
Email Address - Home
|First name||$SUBSCRIBER.FIRSTNAME||First name|
|Last name||$SUBSCRIBER.LASTNAME||Last name|
|Mailing address line 1||$SUBSCRIBER.ADDRESSLINE1||Address Line 1|
|Mailing address line 2||$SUBSCRIBER.ADDRESSLINE2||Address Line 2|
|Mailing address line 3||$SUBSCRIBER.ADDRESSLINE3||Address Line 3|
|Mailing address city||$SUBSCRIBER.CITY||City|
|Postal (zip) code||$SUBSCRIBER.POSTALCODE||Zip/Postal Code|
|Home phone number||$SUBSCRIBER.HOMEPHONENUMBER||Phone number - Home|
|Job title||$SUBSCRIBER.JOBTITLE||Job Title|
|Custom Field n (n=1-15)||$SUBSCRIBER.CUSTOMTEXTn||Custom Field n|
$SUBSCRIBER.CUSTOMTEXT1 would be replaced with the contact s first custom field value. There are 15 custom fields available, to determine which custom field data exists as $SUBSCRIBER.CUSTOMTEXT1 to $SUBSCRIBER.CUSTOMTEXT1 5 add the variables to the campaign's email content in order from 1-15 to make the determination.
Example Provided in Documentation
<h4>Thank you for being a part of our $SUBSCRIBER.CUSTOMTEXT1 class!</h4>
<p>We thought you'd also like this $SUBSCRIBER.CUSTOMTEXT2 class, offered next $SUBSCRIBER.CUSTOMTEXT3.</p>
<p><a href="http://mydomain.com/classes?email=$SUBSCRIBER.EMAIL">Click here to Register!</a></p>
<p>I hope to see you there!</p>
<p>Your friends at Wallace Dance Co.</p>
Campaign JSON Struct Example, modified to include XHTML and $SUBSCRIBER.CUSTOMTEXT1 reference
Attempted this and the custom field variable was replaced with blank
Same result, no values populated. Confirmed that contacts custom fields had content.
Additional None Issue
Discovered that subject does not allow custom contact data
Successful method for referencing contact custom fields when creating a campaign.
When we name a custom field custom_field_1 it can be referenced by $SUBSCRIBER.CUSTOMTEXT1
This does not help us with the 298k contacts we have currently uploaded with named custom fields such as userid.
As you found, the options for merging contact details into custom HTML email campaigns (regardless of if they are created through the API) are currently limited to a set of custom fields that follow the naming scheme you described. This does unfortunately mean that you will not be able to merge contact details from fields that bear a name such as "userid".
The best way to resolve this is to re-import the existing contacts with the desired fields for merging stored in new custom fields. You could accomplish this by either using the bulk import functions of our API, which will create fields if they do not yet exist. You can also accomplish your goal by creating the custom fields ahead of time using the format "custom_field_NN" where NN is a number between 1 and 15. Once the fields are created the contacts could be uploaded directly through our UI and simply map the fields on the import files to the desired fields in Constant Contact.
If you have any questions, please let me know!