2 Replies Latest reply on Jun 27, 2016 5:51 PM by Rajesh Talele

    Does anyone have examples of using XML for emails and LPs?

    Robb Barrett

      Hi all -


      I have a perfect opprtunity to simplify by using XML for both the email and landing page.  Does anyone have examples they can share of how to implement Velocity to read an XML file and create an email from it?

        • Re: Does anyone have examples of using XML for emails and LPs?
          Sanford Whiteman

          (a) Don't think Marketo includes XmlTool in Velocity


          (b) Marketo can't read external files into Velocity (though can read strings w/XML content)

          • Re: Does anyone have examples of using XML for emails and LPs?
            Rajesh Talele

            Hi Robb,


            As Sanford said, Velocity scripts can not pull data from external sources. And it can not store data back in Marketo. Velocity script can only manipulate and display the contents of the email based on the data that is already in Marketo for that lead, company, tokens and related custom objects etc.

            Also, even if it could, you would not be able to use it for changing 'landing page' contents. Velocity scripts are for 'emails only' not for landing pages.


            You have a couple of possible solutions.


            1> Using Marketo's recently added 'Asset API'.


            You will have to write external code to appropriately add / edit email contents and landing page contents.

            I did not see 'landing page' content related API calls. Only Landing page templates related API calls on the developer site.


            This will 'not' work if you have 'personalized content' for each lead.


            2> You can use web hooks.

            You can use Lead fields to store the 'email and landing page fragments' for these emails and landing pages.

            Create a web hook service which will populate these fragments in Marketo for each lead you want to send these emails to or invite to see the landing page.

            Before you send the emails, and before you approve the landing page, you simply call this web hook. The web hook will populate the 'content fragments lead fields' with personalized value for each lead. And when the email is sent, each lead will get email exactly as you desire. All populated from the external xml source.


            There can be other ways to get the landing pages show external xml contents by some cool javascript. But we all look up to Sanford for those things for sure....


            Hope this helps...


            Rajesh Talele

            1 of 1 people found this helpful