Email script token: check lead in a list show dynamic content

Yan_Mak
Level 2

Totally new to the email script token, not sure will that possible!

Here some background:

There will be 3 programs, lead might not be inside all 3.

Program 1: list#1 (lead inside), Program 2: list#2, Program 3: list#3(lead inside)

Library Program, send a dynamic content email out, then the content is something like:

Thank you for being in {{Program 1 content}}, {{Program 2 content}}

You might be interested in {{Program 3 content}}

 

Can someone give me some idea on how to set it up? 

 

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

First, bear in mind that being a member of a List doesn't mean you're a member of the Program that contains that list (if the List is in a Program at all!). List membership and Program membership are independent.

 

However, neither type of membership - List nor Program - is accessible directly from Velocity. You could have a Segmentation that's based on List/Program membership, and the Segment would be usable in Velocity. But maintaining lots of different permutations in different Segments would likely prove frustrating.

 

You could maintain a Textarea field with all the person's memberships, comma-delimited.

 

Add "{{program.id}}" to the value when they're added. Then add "-{{program.id}}" (with a minus) when they're removed. Velocity can parse such a value and determine their current membership.

Yan_Mak
Level 2

Hi, thank you for answering my question. 

No worry, we have logic adding whoever did something on the page, will add to the list.

 

OK, so if I want to use an email script token, then segmentation won't working in this case.

What do you mean by "maintain a Textarea field with all the person's memberships" ?? how do I set that up?

From what I understand is happening on the Velocity:

1. use the Textarea field to load different lists to the scrip

2. write some scrip add {{program.id}}

3. remove -{{program.id}}

4. Velocity will know who is in which list and showing the dynamic content