Is there a way to insert a token within a token? Here's my situation:
My company uses the "call webhook" option in the flow to push out newsfeed and push messages to an app. The tokens in each campaign house the specific messaging needed for each campaign. For example, webhook 'MyHome Push and 2 Newsfeed' will push out messaging that's listed within the tokens below to the app.
Tokens:
{{my.myhomepush}}
{{my.myhomenewsfeed1}}
{{my.myhomenewsfeed2}}
If we want to pull in specific user information (let's just say {{lead.first name}} for now), can we edit {{my.myhomenewsfeed1}} to say something like "congrats, {{lead.firstname}}. You've completed such and such task..."
If not, does anyone have any ideas on how to pull in specific lead information using the webhook method listed above?
Chelsey,
Unfortunately, nesting tokens within tokens is not possible: https://nation.marketo.com/message/121397#comment-121397
But you can vote for the idea here: Nested Tokens
Since you're passing to a webhook already, why not have an intermediate webhook assemble the payload from multiple tokens (combining my. and lead.tokens as in your example)? FlowBoost can do this easily.
Also, note that in emails, you can combine Velocity my.tokens and lead.tokens. This capability is frequently overlooked: one my.token can contain a template, like
#define( $mygreeting )
Hello ${lead.FirstName}
#end
then in that or another Velo token you can output
${mygreeting}
And for webpages, you can have a Text {{my.token}} that contains a JS template, like so:
then include both tokens in the page:
var FirstName = '{{lead.FirstName}}',
mygreeting = `{{my.greeting}}`;
What you can't technically do, though, is easily define a Text {{my.token}} as containing a {{lead.token}}. But almost everything you want can be done in code.
Thanks, Sanford.
I'll have to test this out to see how I can make it work!