SOLVED

Fail to send an email with tokenized link

Go to solution
SESA598759
Level 1

I would like to use an external link with Marketo id being tracked in my email.

 

The token: {{my.Marketoid}} is as follows,

#set ( $mylink = "www.wjx.cn/vj/hDlbBiY.aspx?sojumpparm=${lead.Marketo_ID}" )
<a href="http://${mylink}" style="color: #FFFFFF">Survey</a>

 

It works well in the preview and sample email, but I cannot send a real one via a smart campaign.

 

 

1 ACCEPTED SOLUTION
SanfordWhiteman
Level 10 - Community Moderator

Take out the Send Email step and replace it and replace it with something easy to trace like a Change Data Value that sets a Datetime field to {{system.datetime}}. Don't make any other changes and run it for the exact same lead you were just testing with. What happens?

 

If you have other methods to track users' responses to a survey, please kindly share them with me. Appreciate it a lot!


I don't actually understand why you've chosen to use Velocity in this case. It's a lead field, and it presumably doesn't require encoding (you aren't running it through $esc.url()), so the link can be right in the email content with a {{lead.token}} in the query string.

View solution in original post

14 REPLIES 14
Phillip_Wild
Level 10

Hi there

 

When you say "you cannot send a real one", what is the exact error you are seeing? Is the email failing to send, and you receive an error? Or is the link not output correctly?

 

Thanks!

SESA598759
Level 1

There isn't an error notification at all. I just cannot receive the email finally.

I can run the "send email" batch campaign, but Marketo even has no record of sending that email.

Katja_Keesom
Level 10 - Community Advisor + Adobe Champion

Did you add your personal record to the database? Make the email operational? Have you set your smart campaign to allow for your database record to flow through every time?

Sounds like the issue may not be with the script so much, but with your sending process.

SESA598759
Level 1

The sending failure only happens to the email with a tokenized link. If I switch to sending another normal email, it is OK.

I ignore the communication limit, btw.

SESA598759_0-1622179394669.png

 

Michael_Florin
Level 10

Did you get a notification on your batch send failing? I'm asking because we got this note from Support one month ago:

 

"We introduced a new validation (without a formal notice) that was supposed to fail email script tokens being put in the URL because the link was showing the script and Eng says we don't support script tokens in links.

 

This breaks a number of Batch Campaigns because customers are relying on this functionality and we made no announcement about a change to this behavior. We've gotten Eng to roll back to the change so that campaigns stop failing but we'll need to have a conversation with Eng on what the expected functionality going forward is and make sure that any behavior changes are documented and announced in advance. Failed Campaigns can be found in your Notifications section."

NCHAN
Level 2

Hi Michael,

 

I encountered the same problem. I cannot send an email with a tokenized URL to meself by a campaign.

Do you have any updates on this issue?

 

Thanks

SanfordWhiteman
Level 10 - Community Moderator

You’ll need to show your code. Just a “tokenized URL” is too general.

NCHAN
Level 2

This is the link which we use to generate a dynamic QR code with the lead's info if he is an existing one in Marketo.

We also use Base64 encoding, and dictionaries to map the original values.

<img src="https://api.ma.scrmtech.com/app-interapi/schneiderInterface/addMaTempQrcodeByName?source=-1&secret=e..." alt="" title="" width="150">

if we select a person to send a test email, the link (only available in WeChat, but works) would be: https://app.ma.scrmtech.com/svip/schneider/maIndex?pf_uid=8609_1393&pf_type=3&mid=357402442&eid=1000...

Tags (1)
SanfordWhiteman
Level 10 - Community Moderator

Don’t know what you’re trying to say here. There aren’t any {{lead.tokens}} in that URL; there may be valid Velocity references, but there’s no way to know out of the context of your code. If it’s Velocity, you can’t use Send Sample for testing. Use real emails only.

 

But more specifically, Marketo doesn’t magically change an image src from “https://api.ma.scrmatech.com/app-interapi/...” to “https://app.ma.scrmtech.com/svip/....“ What exactly is the expected behavior and the observed behavior?

SESA598759
Level 1

Thanks for your reply.

 

I didn't receive any notifications. But when I look at the "Results" of the batch campaign, it shows nothing. I suppose this time we have to find another way out. 

 

If you have other methods to track users' responses to a survey, please kindly share them with me. Appreciate it a lot!

SanfordWhiteman
Level 10 - Community Moderator

Take out the Send Email step and replace it and replace it with something easy to trace like a Change Data Value that sets a Datetime field to {{system.datetime}}. Don't make any other changes and run it for the exact same lead you were just testing with. What happens?

 

If you have other methods to track users' responses to a survey, please kindly share them with me. Appreciate it a lot!


I don't actually understand why you've chosen to use Velocity in this case. It's a lead field, and it presumably doesn't require encoding (you aren't running it through $esc.url()), so the link can be right in the email content with a {{lead.token}} in the query string.

NCHAN
Level 2

"Change Data Value" was run normally.

 

We have tried to directly use {{lead.ID}} in the link in that email, and it works well now. Many thanks!

 

SanfordWhiteman
Level 10 - Community Moderator
Glad it's working with the simple {{lead.token}}. Still curious about that other field, which is not a standard field. Did you by chance try to use a Formula field? How is that field being populated?
SanfordWhiteman
Level 10 - Community Moderator

I believe that note relates to Velocity tokens erroneously included within links in the email asset, i.e. as part of a link, the rest of which isn't coming from Velocity. That's never been supported officially but sometimes worked.

 

That's different from outputting the entire link from Velocity, which has always been the supported method (and is what @SESA598759 is doing).