token inside email script token?

Highlighted
Anonymous
Not applicable

token inside email script token?

I'm trying to find out if there's a way to pass one token into another? On the surface it may seem redundant, but let me explain.

It's a newsletter, with intro text. The email has a bunch of segmentation, but we're trying to streamline this intro - the Default Segment, will have one intro, different every month. Then there will be a different intro that is placed in all the other segmented emails - changed each month, but uniform across all except the default segment.

The direction I took is to create a code token to switch out "intro" content in an email with "if/else" statements, based on the value in a prospect's "newsletter_version" field. What I'd hoped to do is ...

a)  pull two basic text tokens into that code token - so I can have people edit those tokens without affecting the primary code token - OR the email.

b) not use a custom field in the database. I'm trying to avoid adding  extraneous fields.

c) Not use segmentation... assuming I'd have to edit each of 20 segments each month. I'd rather it be set in one place, when it's for multiple places.

I hope that made sense.

I'd hoped maybe something like this would work, but no luck:

#if(${lead.newsletter_version} == "b")
#set($introtext = {{my.Intro 1}} )
#elseif(${lead.newsletter_version} == "c")
#set($introtext = {{my.Intro 2}} )

In this scenario, the less code-savy marketing teammember could edit the two text tokens, my.Intro 1 and my.Intro 2, but leave my code alone.

Or.. maybe there's an entirely different, better way to do this?

Tags (3)
3 REPLIES 3
Highlighted

Re: token inside email script token?

Assuming you have your segments already set up, it sounds like you could just turn the editable section into a dynamic section by using the "Segment By" function.

pastedImage_0.png

You could then easily put {{token1}} inside the first segment, {{token2}} inside the next segment, and set your default segment.

Highlighted

Re: token inside email script token?

By the way, you can't put a script inside an email with dynamic content. I don't know if you can reference a token within a script, but I'm going to guess you can't.

Highlighted
Anonymous
Not applicable

Re: token inside email script token?

Yeah, after i posted this, I realized what I was basically saying was "can I nest a token" - which has several conversation strings explaining that it's not possible. It seems to be working fine with a email script, though your suggestion above is more simple.