SOLVED

Triggered Email Campaign for leads with 3rd party unique token URLs

Go to solution
myhighnoon
Level 1

Triggered Email Campaign for leads with 3rd party unique token URLs

I am trying to update multiple leads with unique URLs used in an email campaign. How best can I do this?

 

The use case in particular that I'm working on is sending unique URLs into an email (this email resides in Marketo) for specific leads from a third party into Marketo. The path that I've been exploring is leveraging tokens to accomplish this via the Request Campaign API.
 
Is this the best method to use for my use case? If not, do you have any other suggestions?
 
Additionally, where is the best place to look in Marketo to see who and what URL was sent in an email for a given program?
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Triggered Email Campaign for leads with 3rd party unique token URLs

You can pass a map of Lead IDs and URLs in a single {{my.token}} JSON property (not the same token appearing multiple times).

 

#set( $leadURLMap = {
  12345 : "example.com",
  45678 : "example.net"
} )
  

 

Then use Velocity to output the URL for the current lead ID.

View solution in original post

7 REPLIES 7
SanfordWhiteman
Level 10 - Community Moderator

Re: Triggered Email Campaign for leads with 3rd party unique token URLs

What kind of volume are you talking about here? Request Campaign is relatively efficient considering you can pass different tokens for different leads in one payload. But it’s not hyper-efficient or anything.

 


Additionally, where is the best place to look in Marketo to see who and what URL was sent in an email for a given program?

There’s no place where you can capture exactly how an email was personalized at send time.

myhighnoon
Level 1

Re: Triggered Email Campaign for leads with 3rd party unique token URLs

At least a few hundred emails a day.

If the same token is already used and saved in an email, ideally I'd like to send in an array of leads for the same token that is used in an email with different URLs (ideal API body below).

 

{
"input":
{
"leads" : [
{
"id" : 4
},
{
"id" : 5
}
],
"tokens" : [
{
"name": "{{my.emailToken}}",
"value": "gap.com"
},
{
"name": "{{my.emailToken}}",
"value": "newsweek.com"
}
]
}
}
SanfordWhiteman
Level 10 - Community Moderator

Re: Triggered Email Campaign for leads with 3rd party unique token URLs

Please insert your code by using Insert/Edit Code Sample, thanks.

You should be OK with Request at that volume.

Depending on how the URLs are sourced, it might be more convenient to call a webhook to fetch "today's URL" from a remote sheet, service, etc. as then you wouldn't need the API.
myhighnoon
Level 1

Re: Triggered Email Campaign for leads with 3rd party unique token URLs

The issue I'm trying to find a workaround with my previous request is that when calling the API for multiple leads with the same token name but different URLs, the result is that the URL in the email that goes out defaults to the last URL provided for all leads. URLs are sourced and created on my side based upon customer actions/triggers, and I'd like to find a way to do it with a real-time API call and not in a webhook or flat file.

SanfordWhiteman
Level 10 - Community Moderator

Re: Triggered Email Campaign for leads with 3rd party unique token URLs

You can pass a map of Lead IDs and URLs in a single {{my.token}} JSON property (not the same token appearing multiple times).

 

#set( $leadURLMap = {
  12345 : "example.com",
  45678 : "example.net"
} )
  

 

Then use Velocity to output the URL for the current lead ID.

myhighnoon
Level 1

Re: Triggered Email Campaign for leads with 3rd party unique token URLs

I don't believe that our systems can access the Apache library easily. Any other suggestions? 

SanfordWhiteman
Level 10 - Community Moderator

Re: Triggered Email Campaign for leads with 3rd party unique token URLs

I don’t understand what you mean; I’m just talking about the passing the value of the {{my.token}}. You’re already doing that. What Apache library?