0

Currently I am designing a Marketing Cloud application that will send out promotion mailers with mail tracking options. As discussed with Salesforce Marketing Cloud guys suggested to use Marketing Cloud Professional Edition license as it gets all our requirements fulfilled.

But there is a functionality to send emails with customized PDF attachments. When contacted with the MC team, they were not sure Professional Edition license supports VisualForce pages, VF email templates, Apex classes, Apex triggers.

So my query is a pure Marketing Cloud instance supports the above native Salesforce features or I need to acquire additional licenses (VisualForce pages, VF email templates, Apex classes, Apex triggers)?

In SFDC , I have created this sample vf email template with attachment.The attachment info has a barcode(the code of which is in a custom component) based on a dynamic Customer ID.Below I have mentioned the sample code:

    <messaging:emailTemplate subject="Account Info" recipientType="Contact" relatedToType="Account">
    <messaging:htmlEmailBody >
    Hi

    Welcome to StackExchange <br/>
    Congratulations!
    This is your Sample Email Template. <br/>
    Kindly open the attachment for more details<br/>

    </messaging:htmlEmailBody>
    <messaging:attachment renderAs="PDF">
        <html>
        <head/>
        <body>

       <td> Hi {!relatedTo.name} </td><br/>
       {!relatedTo.Phone} <br/>
       {!relatedTo.Email_Address__c} <br/>
       {!relatedTo.Cust_ID__c} <br/>
       <c:barcode39 codeValue="{!relatedTo.Cust_ID__c}" /><br/>
        </body>
        </html>
       </messaging:attachment>
    </messaging:emailTemplate>
1

You will need Marketing Cloud Connect enabled. This additional option is available in all Editions, as indicated in this document.

Regarding, customized PDF attachments, you will need to implement this by using the AMPscript AttachFile() function in your email and store the PDF attachment on either a publicly available URL, FTP site, or your Portfolio.

Note: file attachments (used in conjunction with the AttachFile() AMPscript function) is an additional option and will need to be purchased separately; essentially you are charged for each attachment that you send. This is in additon to your 'Super Message' usage.

To send an email using VisualForce/Apex, you will need to create a Triggered Send. You can do this on any object that has a lookup to a Contact ID or Lead ID using the et4ae5.triggerUtility.automate() function. Refer to the Apex code and procedural steps documented here.

4
  • Hi @MaxPyne, please mark the answer as accepted for the benefit of others, if this answers your question. Thanks! – Eliot Harper Aug 18 '16 at 18:15
  • Thanks@Elliot Harper for the clarification. Now my query i if I want to replicate this functionality in Marketing Cloud custom code what should be my approach? Storing the PDF attachment in a public available URL is not a viable option as it contains vital information. N.B. - I am novice in Marketing Cloud..hence your guidance will be highly appreciated. – MaxPyne Aug 18 '16 at 18:23
  • @ElliotHarper I have added the code snippet in the query section... – MaxPyne Aug 18 '16 at 18:24
  • Hello @Max, in that case I'd use the FTP option. You can save your attachments to a location on your Enhanced FTP account and then retrieve it by including the documented AttachFile() function in an AMPscript block in your email. For example, if you create a directory named 'Attachments' on your FTP account, you can use the AMPscript code %%=AttachFile("FTP",Concat("Attachments/",@attachment))=%%. You would set @attachment to the file that you need to attach (using an AMPscript Lookup() function or other function, depending on where you are storing this filename). – Eliot Harper Aug 18 '16 at 18:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.