1 Reply Latest reply on Nov 28, 2018 12:04 PM by Grace Brebner

    Tokenized URL with default text

    Kanako Tone

      We have a custom URL field and when an email has a copy with this URL token, I'd like to show

       

      - the URL as hyper link if the field has a value

      - some text without hyperlink if the field does not have a value

       

      Here, I created a test email below and sent a sample email to a lead whose URL field is blank.

       

      marketo email page.PNG

      And here's the sample email that came through. "Schedule a call" looks like a link, but it looks clickable. I'd actually like to have the text line "Let me know..." showing without the hyperlink feature. Is it ever possible?

       

      token test email.PNG

        • Re: Tokenized URL with default text
          Grace Brebner

          Hey Kanako,

           

          The logic you're trying to create is effectively:

          • If field is not empty, display: <a href="{{lead.your field here}}">text</a>
          • If field is empty, display: text

           

          I.e., it's the removal of the <a> tag that you're trying to achieve, not the removal of the href value. Your current method isn't working because the logic is instead:

          • If field is not empty, display: <a href="{{lead.your field here}}">text</a>
          • If field is empty, display: <a href="">text</a>

           

          What you want to use to achieve this is a velocity script token - there's lots of resources on community + the wider web that should help you with this.