Re: Token in a Token?

Level 3

Token in a Token?

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.





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?

Level 10 - Champion Alumni

Re: Token in a Token?


Unfortunately, nesting tokens within tokens is not possible:

But you can vote for the idea here: Nested Tokens

Level 10 - Community Moderator

Re: Token in a Token?

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}


then in that or another Velo token you can output


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.

Level 3

Re: Token in a Token?

Thanks, Sanford.

I'll have to test this out to see how I can make it work!