I have created a simple Email Template in ExactTarget which has an ID e.g. 19712732. I'd like to use this email template to send emails using the WebService API (C# code) of Exact Target: https://webservice.exacttarget.com/Service.asmx? The wiki documentation is here: http://wiki.memberlandingpages.com/ How would that be possible? I went through the docs but couldn't find anything relevant yet. Also, I'd like to be able to set some contents of the Email Template using the API. For example, perhaps I can add a key/property like then set the value of this key/property in my C# code? Thanks,
asked Feb 21, 2012 at 14:40 26.9k 65 65 gold badges 179 179 silver badges 261 261 bronze badgesChris is right, you will want to utilize a combination of Data Extensions and Triggered Sends.
On a high level, this is what you will want to do:
In order to pass in the custom data (e.g. CustomHTML1 ), you will want to add that name/value pair as a Subscriber attribute in the API call:
ETServiceClient.ETClient.Attribute attr = new ETServiceClient.ETClient.Attribute(); attr.Name = "CustomHTML1"; attr.Value = "Your custom merge field value"; subscriber.Attributes = new ETServiceClient.ETClient.Attribute[] < attr >;
The above code should be added in to to the linked code sample as appropriate, it is there only to provide information specific to setting up the custom attribute.
As far as I know, there aren't any single references that spell out this process, however I have found it to be the most effective.
(Also of note, all of the API articles have recently been moved to code.exacttarget.com, so the wiki is going to be somewhat limited use in this situation)
EDIT: I wanted to also clarify that any steps above that call for configuration via the UI can also be done through the API. However, since they are one-time configuration elements, it is typically easier to just log in once, set it up, and focus API development efforts on the actual email sends.
EDIT: For the sake of completeness, it should be noted that it is not necessary to use Data Extensions for this purpose. It is technically possible to have an attribute on the subscriber which serves the same purpose and, if there are situations where Data Extensions won't work, this may be the better option.
I would recommend the DE route if at all possible in this case because it physically separates send-specific data from the subscriber itself. That way, information that may only be relevant for the specific send is not "permanently" stored on the Subscriber.