6 Replies Latest reply on Jun 19, 2016 1:00 PM by Grégoire Michel

    Custom token referenced in another token

      Hello Marketo community,

       

      I built a custom token named {{my.Prior Month MMMM}} in my active marketing campaigns folder that reads:

      #set($calendar = $date.getCalendar())  

      $date.format('MMMM',$calendar)

       

      This populates in email copy successfully when referenced, e.g. "June", "May", etc.

       

      I'm trying to reference this token with a custom token named {{my.PNGreetingSurpluskWhvsOnTrack}} in a program that is nested within the active marketing campaigns folder. When I include it in the token below, it doesn't populate in an email and just displays the token name. Any recommendations would be greatly appreciated. Thanks!

       

      Daniel

       

      Custom token {{my.PNGreetingSurpluskWhvsOnTrack}} to be referenced in an email draft:

      ##check if the monitored production is > OR < estimated production

      ##check if the monitored production is > estimated production

      #if(${lead.pNOnTrackClassification} == "100+")

        ##if the lead has more monitored production than estimated, tell them how large the surplus kWh hours were

        #set($my.PNGreetingSurpluskWhvsOnTrack = "Your system produced ${lead.pNMonitoredvsEstimatedSurpluskWh} kWh more than we forecasted in {my.Prior Month MMMM}!*")

       

       

      ##check if the monitored production is < estimated production

      #else

        ##if the lead has less monitored production than estimated, tell them they are on track

        #set($my.PNGreetingSurpluskWhvsOnTrack = "Your system's {{my.Prior Month MMMM}} production was right on track with forecasted production!*")

      #end

      ${my.PNGreetingSurpluskWhvsOnTrack}