Custom Token per Lead Via Request Campaign API

Anonymous
Not applicable

Custom Token per Lead Via Request Campaign API

Hi,

I am trying to send out emails with personlized tokens and values per lead via request campaign API. But how do one associate each lead with its respective token/values? I was able to send emails to multiple leads with tokens having single value. Its not per lead, but i was able to acheive the same using schedule campaign with importToList API. If I do this then i will loose the capability to query the campaigns via api and also many manual steps involved in achieving this. Could you please suggest how it can be done via request campaign api? or any other best ways to achieve the same.
Tags (1)
10 REPLIES 10
Anonymous
Not applicable

Re: Custom Token per Lead Via Request Campaign API

Anonymous
Not applicable

Re: Custom Token per Lead Via Request Campaign API

Hi,

I have gone through the documentation but did the tokens mentioned in the example will be applied to all the leads. It is not a per lead token where I can associate a particular
{{my.conversationtopic}} for lead1 as Hello World
{{my.conversationtopic}} for lead2 as Welcome to Marketo

for the list of Leads in a single RequestCampaign API call.

Can i do the above? Am i missing something?

Anonymous
Not applicable

Re: Custom Token per Lead Via Request Campaign API

Hey Steve,

If you want to use requestCampaign API for the usercase you describe, then you'll have to issue a separate request for each lead that you want to email.

An alternative would be to use importToList, which allows you to specify a unique token value for each lead that you list in the request.  Assuming the leads you want to email are already in MLM, you would perform importToList with importListMode=LISTONLY, then list your leads' email address along with the values for any associated tokens in importFileHeader.  Set campaignName equal to the batch campaign that will be delivering the email and then perform scheduleCampaign to kick off this batch campaign.
Anonymous
Not applicable

Re: Custom Token per Lead Via Request Campaign API

Any plans on adding this functionality to the requestCampaign endpoint? It's a very common use case to create custom links/content on a per lead basis. Creating new lists each time just for this functionality seems like overkill.

 
Anonymous
Not applicable

Re: Custom Token per Lead Via Request Campaign API

@Brad, you can add an attribute to each lead, then reference it as a token in your email template. After you create a custom field, you can then include it as token like {{lead.CustomField}}.
Anonymous
Not applicable

Re: Custom Token per Lead Via Request Campaign API

This is a workable solution thank you!

Would it be possible to send in JSON data that could then be parsed by the velocity email script when rendering the email? That would be a clean solution, otherwise we'll have to create a bunch of string fields and a more complicated email script to put it all back together.

Thanks
 
Anonymous
Not applicable

Re: Custom Token per Lead Via Request Campaign API

You can store JSON data on the lead record using the API. You could store JSON data as a program token using the UI. 
Anonymous
Not applicable

Re: Custom Token per Lead Via Request Campaign API

Fantastic! That was the last major technical hurdle...thanks for the prompt reply.
Anonymous
Not applicable

Re: Custom Token per Lead Via Request Campaign API

[Ignore this reply. Wrong account].