SOLVED

Re: Conditionals in email template based on non-contact variable

Go to solution
Andrew_Holstei2
Level 2

Conditionals in email template based on non-contact variable

We are looking to allow marketers to choose from a drop down list of office locations for the footer of our email sends. I'd love to create a global list variable in the email template with the office locations, and then have the email template pick that up and populate the correct address. Is that possible? I'm not sure if I can use Velocity when the variable isn't on a contact or custom object record. Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Peter_Rytter
Level 2

Re: Conditionals in email template based on non-contact variable

It sounds like snippets is what you're looking for. You can make a snippet for each office location, then your marketers can insert it into the email at the desired place. The snippet can contain the entire footer or part of it, depend on your setup.

View solution in original post

7 REPLIES 7
Peter_Rytter
Level 2

Re: Conditionals in email template based on non-contact variable

It sounds like snippets is what you're looking for. You can make a snippet for each office location, then your marketers can insert it into the email at the desired place. The snippet can contain the entire footer or part of it, depend on your setup.

SanfordWhiteman
Level 10 - Community Moderator

Re: Conditionals in email template based on non-contact variable

Not sure that quite works for the OP, Peter? If the idea is there's a list of offices only, this would be different as they'd have to Replace with Snippet and browse for the snippet.

 

But you're right, it's probably the easiest combination of usability + implementation as of now.

Andrew_Holstei2
Level 2

Re: Conditionals in email template based on non-contact variable

Based on Sanford's feedback about the challenge of using Velocity, it does sound like snippets are the way to go. Was hoping to do something a little simpler for marketers but we'll just have to train them on using snippets. Thanks for the help!!

SanfordWhiteman
Level 10 - Community Moderator

Re: Conditionals in email template based on non-contact variable

Velocity can use anything it can see. With some tricks, you can get it to see a mktoVariable, but it's true that this isn't supported and it might be fragile if you're not very familiar w/VTL.
Andrew_Holstei2
Level 2

Re: Conditionals in email template based on non-contact variable

I'm only moderately familiar with Velocity so this may be more trouble than it's worth for me. Thanks for the help!

Phillip_Wild
Level 10

Re: Conditionals in email template based on non-contact variable

To be clear @Andrew_Holstei2 , do you mean that the marketer should select the office, which will be the same info for all recipients? Or that the office information will vary based on the recipient's information?

 

If you mean the latter, the other answers have taken care of it. But if you mean the former, then there are a couple of ways:

1. Build it into different program templates so that when a marketer clones the template they are using, the right details are already populated.

2. The above, plus tokens: you could use {{my.tokens}} within a program to populate these, which would be copied over by the right template. Or, have one template which has tokens that are designed to be updated - either regular text tokens, or one email script token where the user modifies a line up the top to dictate the outcome. That would be a little open to user error though, so it depends to what extent you trust your marketers 🙂

 

However, if it's designed to be based on user fields then a snippet / Velocity script is definitely the way to go.

Andrew_Holstei2
Level 2

Re: Conditionals in email template based on non-contact variable

Thanks Phillip, the address would be the same for all recipients of the particular email, so a contact could see different office locations in different emails.