Conditional Content by State Using S Tags
Options
Hello All!
I'm a new Luminate user and I'm curious if it's possible to use S-tags to personalize content in an email by state.
For instance, an audience member from NY would see NY content, and someone from DC would see DC content. Ideally this would cover all 50 states.
I tried nesting a bunch of conditional statements together like this...
I'm a new Luminate user and I'm curious if it's possible to use S-tags to personalize content in an email by state.
For instance, an audience member from NY would see NY content, and someone from DC would see DC content. Ideally this would cover all 50 states.
I tried nesting a bunch of conditional statements together like this...
[[? S1:home_stateprov]]::AL::T
:: Local Content AL ]]
:: [[? S1:home_stateprov]]::AK::T
:: Local Content AK ]]
:: [[? S1:home_stateprov]]::AZ::T
:: Local Content AZ ]]
... and did that 50+ times over, but that didn't work (probably because my syntax is way off).
Has anyone been able to do this before? Would love to get some advice from the pros!
Thank you!
Nathan
Tagged:
0
Comments
-
There is also a nesting limit for S-Tags. I think it's around 20. So you will need a couple of separately nested conditionals to cover the whole country.
And since you are running through a big set of lookups, it makes sense to put them in a most-likely order for speed reasons. Here's three nested. You can go to 20ish before getting an error.
[[?~[[S1:home_stateprov]]~::~CA~:: SHOW CA CONTENT::
[[?~[[S1:home_stateprov]]~::~NY~:: SHOW NY CONTENT::
[[?~[[S1:home_stateprov]]~::~IL~:: SHOW IL CONTENT::
SHOW DEFAULT CONTENT OR NOTHING
]] ]] ]]
[[?~[[S1:home_stateprov]]~::~FL~:: SHOW FL CONTENT::
[[?~[[S1:home_stateprov]]~::~NC~:: SHOW NC CONTENT::
[[?~[[S1:home_stateprov]]~::~OH~:: SHOW OH CONTENT::
SHOW DEFAULT CONTENTOR NOTHING
]] ]] ]]
S-Tags conditionals mean "If THIS contains THAT then SHOW THIS else SHOW THAT"
The "contains" part is important and is the reason people wrap the values in * or ~ or whatever.
In this case, some Canadian provinces could contain US states in their name. So ALBERTA contains AL. But ~ALBERTA~ doesn't contain ~AL~. Make sense?
2 -
If this is a one-off thing, then all these conditionals make sense.
But if this is an ongoing/recurring thing like a welcome series, you can make it easier using a different trick with naming conventions.
Make a reusable page for the content for each state. Name them reuse_WelcomeSeries_AL, reuse_WelcomeSeries_CA, etc.
Then in your email, all you need to do is...
[[E51: reuse_WelcomeSeries_[[S1:home_stateprov]]]]
S51 renders a reusable page, and E51 does the same, but it Evaluates the inner S-Tag first. The inner s-tag renders to AL, so in the end you get [[S51:reuse_WelcomeSeries_AL]] and the content for AL displays.
Now you would be making a reusable pagebuilder page for each state, so that doesn't make sense for every email you do. But it could be better for an email that runs a lot and stays the same, like your welcome series.
Works with stuff like images too.
<img src="../stateFlag-[[S1:home_stateprov]].jpg" />
The burden is on you to make all the required pages, of course. Miss one and they will just see a blank email!
BPM
EDIT: Ooo, there's [[S151:pagename]] which checks if a page exists. That's a cool failsafe. Something like:
[[? [[E151:[[E51: reuse_WelcomeSeries_[[S1:home_stateprov]]]]]]::TRUE::[[E51: reuse_WelcomeSeries_[[S1:home_stateprov]]]]::[[S51: reuse_WelcomeSeries_Default]]]]2 -
Brian!
This is such good information! Thank you so, so much for your incredibly speedy reply- and for answering questions I didn't even know I had yet!
The case I'm working on would be sort of a one-off thing, so your first explanation is perfect for me; though it is very uplifting to know that the capability exists to do state personalization in recurring mailings (will pitch this!!!).
Follow-up question for you, Brian:
In regards to your first explanation, I'm thinking I would have five "buckets" of nested statements, each with 10 states.
Is there a way for me to connect those buckets so that someone who doesn't fall into any of the buckets will see one set of default content? I definitely want there to be default content, but I'm concerned that if someone falls into the first bucket, they'll see the alt text for the other four.
Would it make sense to nest those five buckets in another s-tag so they're all associated with each other?
Thank you again for helping me out with this, Brian!
Nathan0 -
I think that any way to directly connect them would be nesting.
One thing you could do is just use a task to segment your audience by your five regions.
From there you could then have a separate email for each. That might be beneficial to you for regional comparisons on open rate, etc.
Another option to do this in a single send (with one complete set of open rates, etc.) is to make 5 reusable pagebuilder pages, each with the relevant 10 nested conditionals.
Then in your email add a conditional to load one of those reusables according to their segmentation.
[[?~[[S45:1001]]~::~TRUE~:: [[S51:reus_regionOne]]::
[[?~[[S45:1002]]~::~TRUE~:: [[S51:reus_regionTwo]]::
[[?~[[S45:1003]]~::~TRUE~:: [[S51:reus_regionThree]]::
[[?~[[S45:1004]]~::~TRUE~:: [[S51:reus_regionFour]]::
[[?~[[S45:1005]]~::~TRUE~:: [[S51:reus_regionFive]]::
[[S51:reus_regionDefault]]
]] ]] ]] ]] ]]
I'm betting this won't be seen as nesting, even though there are really 10 conditionals in those PB pages.
One last idea is to store the found state of the previous set of conditionals using a session variable. The docs say session variables don't work in email campaigns, but I have used them and they always seem to work for me. Worth a try. (This idea should be an option on a web page at least, )
[[U0:StateFound=unknown]]
[[?~[[S1:home_stateprov]]~::~CA~::SHOW CA CONTENT::
[[?~[[S1:home_stateprov]]~::~NY~::SHOW NY CONTENT::
[[?~[[S1:home_stateprov]]~::~IL~::SHOW IL CONTENT::
[[U0:StateFound=false]]
]] ]] ]]
[[?*[[S80:StateFound]]*::*false*::
[[U0:StateFound=unknown]]
[[?~[[S1:home_stateprov]]~::~FL~::SHOW FL CONTENT::
[[?~[[S1:home_stateprov]]~::~NC~::SHOW NC CONTENT::
[[?~[[S1:home_stateprov]]~::~OH~::SHOW OH CONTENT::
[[U0:StateFound=false]]
]] ]] ]]
:: <!-- Show Nothing - State Found Previously --> ]]
[[?*[[S80:StateFound]]*::*false*::
[[U0:StateFound=unknown]]
[[?~[[S1:home_stateprov]]~::~FL~::SHOW IA CONTENT::
[[?~[[S1:home_stateprov]]~::~NC~::SHOW ND CONTENT::
[[?~[[S1:home_stateprov]]~::~OH~::SHOW WA CONTENT::
SHOW DEFAULT CONTENT
]] ]] ]]
:: SHOW DEFAULT CONTENT (Should never occur) ]]
Post what you discover!
BPM1
Categories
- All Categories
- Shannon parent
- shannon 2
- shannon 1
- 21 Advocacy DC Users Group
- 14 BBCRM PAG Discussions
- 89 High Education Program Advisory Group (HE PAG)
- 28 Luminate CRM DC Users Group
- 8 DC Luminate CRM Users Group
- Luminate PAG
- 5.9K Blackbaud Altru®
- 58 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 409 bbcon®
- 2.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- donorCentrics®
- 1.1K Blackbaud eTapestry®
- 2.8K Blackbaud Financial Edge NXT®
- 1.1K Blackbaud Grantmaking™
- 527 Education Management Solutions for Higher Education
- 1 JustGiving® from Blackbaud®
- 4.6K Education Management Solutions for K-12 Schools
- Blackbaud Luminate Online & Blackbaud TeamRaiser
- 16.4K Blackbaud Raiser's Edge NXT®
- 4.1K SKY Developer
- 547 ResearchPoint™
- 151 Blackbaud Tuition Management™
- 1 YourCause® from Blackbaud®
- 61 everydayhero
- 3 Campaign Ideas
- 58 General Discussion
- 115 Blackbaud ID
- 87 K-12 Blackbaud ID
- 6 Admin Console
- 949 Organizational Best Practices
- 353 The Tap (Just for Fun)
- 235 Blackbaud Community Feedback Forum
- 55 Admissions Event Management EAP
- 18 MobilePay Terminal + BBID Canada EAP
- 36 EAP for New Email Campaigns Experience in Blackbaud Luminate Online®
- 109 EAP for 360 Student Profile in Blackbaud Student Information System
- 41 EAP for Assessment Builder in Blackbaud Learning Management System™
- 9 Technical Preview for SKY API for Blackbaud CRM™ and Blackbaud Altru®
- 55 Community Advisory Group
- 46 Blackbaud Community Ideas
- 26 Blackbaud Community Challenges
- 7 Security Testing Forum
- 1.1K ARCHIVED FORUMS | Inactive and/or Completed EAPs
- 3 Blackbaud Staff Discussions
- 7.7K ARCHIVED FORUM CATEGORY [ID 304]
- 1 Blackbaud Partners Discussions
- 1 Blackbaud Giving Search™
- 35 EAP Student Assignment Details and Assignment Center
- 39 EAP Core - Roles and Tasks
- 59 Blackbaud Community All-Stars Discussions
- 20 Blackbaud Raiser's Edge NXT® Online Giving EAP
- Diocesan Blackbaud Raiser’s Edge NXT® User’s Group
- 2 Blackbaud Consultant’s Community
- 43 End of Term Grade Entry EAP
- 92 EAP for Query in Blackbaud Raiser's Edge NXT®
- 38 Standard Reports for Blackbaud Raiser's Edge NXT® EAP
- 12 Payments Assistant for Blackbaud Financial Edge NXT® EAP
- 6 Ask an All Star (Austen Brown)
- 8 Ask an All-Star Alex Wong (Blackbaud Raiser's Edge NXT®)
- 1 Ask an All-Star Alex Wong (Blackbaud Financial Edge NXT®)
- 6 Ask an All-Star (Christine Robertson)
- 21 Ask an Expert (Anthony Gallo)
- Blackbaud Francophone Group
- 22 Ask an Expert (David Springer)
- 4 Raiser's Edge NXT PowerUp Challenge #1 (Query)
- 6 Ask an All-Star Sunshine Reinken Watson and Carlene Johnson
- 4 Raiser's Edge NXT PowerUp Challenge: Events
- 14 Ask an All-Star (Elizabeth Johnson)
- 7 Ask an Expert (Stephen Churchill)
- 2025 ARCHIVED FORUM POSTS
- 322 ARCHIVED | Financial Edge® Tips and Tricks
- 164 ARCHIVED | Raiser's Edge® Blog
- 300 ARCHIVED | Raiser's Edge® Blog
- 441 ARCHIVED | Blackbaud Altru® Tips and Tricks
- 66 ARCHIVED | Blackbaud NetCommunity™ Blog
- 211 ARCHIVED | Blackbaud Target Analytics® Tips and Tricks
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- Luminate CRM DC Users Group
- 225 ARCHIVED | Blackbaud eTapestry® Tips and Tricks
- 1 Blackbaud eTapestry® Know How Blog
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)
- 1 Blackbaud K-12 Education Solutions™ Blog
- 280 ARCHIVED | Mixed Community Announcements
- 3 ARCHIVED | Blackbaud Corporations™ & Blackbaud Foundations™ Hosting Status
- 1 npEngage
- 24 ARCHIVED | K-12 Announcements
- 15 ARCHIVED | FIMS Host*Net Hosting Status
- 23 ARCHIVED | Blackbaud Outcomes & Online Applications (IGAM) Hosting Status
- 22 ARCHIVED | Blackbaud DonorCentral Hosting Status
- 14 ARCHIVED | Blackbaud Grantmaking™ UK Hosting Status
- 117 ARCHIVED | Blackbaud CRM™ and Blackbaud Internet Solutions™ Announcements
- 50 Blackbaud NetCommunity™ Blog
- 169 ARCHIVED | Blackbaud Grantmaking™ Tips and Tricks
- Advocacy DC Users Group
- 718 Community News
- Blackbaud Altru® Hosting Status
- 104 ARCHIVED | Member Spotlight
- 145 ARCHIVED | Hosting Blog
- 149 JustGiving® from Blackbaud® Blog
- 97 ARCHIVED | bbcon® Blogs
- 19 ARCHIVED | Blackbaud Luminate CRM™ Announcements
- 161 Luminate Advocacy News
- 187 Organizational Best Practices Blog
- 67 everydayhero Blog
- 52 Blackbaud SKY® Reporting Announcements
- 17 ARCHIVED | Blackbaud SKY® Reporting for K-12 Announcements
- 3 Luminate Online Product Advisory Group (LO PAG)
- 81 ARCHIVED | JustGiving® from Blackbaud® Tips and Tricks
- 1 ARCHIVED | K-12 Conference Blog
- Blackbaud Church Management™ Announcements
- ARCHIVED | Blackbaud Award Management™ and Blackbaud Stewardship Management™ Announcements
- 1 Blackbaud Peer-to-Peer Fundraising™, Powered by JustGiving® Blogs
- 39 Tips, Tricks, and Timesavers!
- 56 Blackbaud Church Management™ Resources
- 154 Blackbaud Church Management™ Announcements
- 1 ARCHIVED | Blackbaud Church Management™ Tips and Tricks
- 11 ARCHIVED | Blackbaud Higher Education Solutions™ Announcements
- 7 ARCHIVED | Blackbaud Guided Fundraising™ Blog
- 2 Blackbaud Fundraiser Performance Management™ Blog
- 9 Foundations Events and Content
- 14 ARCHIVED | Blog Posts
- 2 ARCHIVED | Blackbaud FIMS™ Announcement and Tips
- 59 Blackbaud Partner Announcements
- 10 ARCHIVED | Blackbaud Impact Edge™ EAP Blogs
- 1 Community Help Blogs
- Diocesan Blackbaud Raiser’s Edge NXT® Users' Group
- Blackbaud Consultant’s Community
- Blackbaud Francophone Group
- 1 BLOG ARCHIVE CATEGORY
- Blackbaud Community™ Discussions
- 8.3K Blackbaud Luminate Online® & Blackbaud TeamRaiser® Discussions
- 5.7K Jobs Board