[SalesForce] Attachment : Triggered Send using REST API

I need to attach pdf from my Apex code (Salesforce) Using REST API ExactTarget.

This PDF is Unique to each email.

Please share your ideas on to this

I am trying to use
http://help.exacttarget.com/en/documentation/exacttarget/content/ampscript/ampscript_syntax_guide/content_ampscript_functions/#AttachFile

and
http://help.exacttarget.com/en/documentation/exacttarget/content/email_attachments/

First Question is how can i find if attachment feature is enabled for my org or not
Thanks,
Pravin

Best Answer

A profile attribute could be used to hold the value for the location of the unique location for that subscribers PDF. This profile attribute would need to be created in the UI in the Profile Management section. Lets assume the field is called PDFLocation. The body of the email would have to contain a reference to the AttachFile function referencing that attribute:

%%=Attachfile("HTTP", PDFLocation)=%%

Then in the JSON body for ContactAttributes, pass the value:

{
    "From": {
        "Address": "code@exacttarget.com",
        "Name": "Code@"
    },
    "To": {
        "Address": "example@example.com",
        "SubscriberKey": "example@example.com",
        "ContactAttributes": {
            "SubscriberAttributes": {
                "PDFLocation": "http://www.exampledomain.com/somefile.pdf"
            }
        }
    }
}
Related Topic