Zephyr Examples Library

Find each listed example on the reference page for the function(s) it employs.

Click the function’s link to view the example listed by name in the function’s Examples section.
You can also sort or search the table. For a list of all functions, see the Functions Index.

Name of ExampleAvailable on Function PageExample Type
Format Date from a Content FeeddateContent
Display Data Feed Content Links with First Article as ‘Featured’first, sliceContent
Randomly Select Subject Lines from Content Feed Titles and Test PerformancerandomContent
Insert Ad Between Content ItemssliceContent
Sort and Display Content by DatesortContent
Sort and Display Content by PricesortContent
Display Additional Content with Adad, adinfoContent
Build Content Arrays Based on Feed Items’ Content Var Valuesbucket_listContent
Remove Query Parameters from URLs in a Feedcontains, substr, strrposContent
Give a Higher Weight to Highly Stocked ItemsmapContent
Clean HTML from a Data Feedstrip_tagsContent
Create a Reader-Friendly PricenumberContent
Interest-Based Content Recommendations from a Feedhorizon_selectContent
Display the Intersection of User-Interested and Trending Contentcontent_intersect, length, push, filter, personalizeContent
Show the Temperature from Various Cities from a Data Feedkeys, valuesContent
Set a Limit on the Number of Items Shown from a Certain Categorycontains, keys, length, personalize, filter_content, sliceContent
Replace Dashed Values from a Data Feed with SpacesreplaceContent
Deduplicate Merged Feed Based on Titlefilter_content, pushContent
Filter Out Content with Empty ‘Image’ URL Valuefilter, lengthContent
Converting Price (with a Decimal) from String to Numbermap, int, substr, strrpos, strpos, length, numberContent
Filtering for Content Between Two Price Points (Based on AOV_7)filter_contentContent
Limit a Description to a Certain Number of Characterssubstr, strrposContent
Display a Section Based on Pageview Counthorizon_countContent
Shuffle Each User’s Top 10 Personalized Items in a Templatepersonalize, shuffleContent
Personalize and Display User’s Top Story in a Hero Section and Other Stories in a Sub-Sectionpersonalize, rangeContent
URL-Encode a ValueuContent, User Profile
Set User Interest on Link ClickjoinContent, User Profile
Display Content from a Feed Based on a User’s Geolocationuser_geo_home, distance, contains, roundContent, User Profile
Show Feed Items that Match Terms in Custom Interest Arraycontains, intersectContent, User Profile
Override User Interest Level with Custom Field Data (Tag Only)time, horizon_set_interestContent, User Profile
Override User Interest Level with Custom Field Data (Tag and Score)time, horizon_set_interestContent, User Profile
Show Feed Items that Match Terms in Custom Interest Array (With Fallback Content)filter_content, personalize, contains, lengthContent, User Profile
Display Content with Vars Matching Users’ Interest/Subscription Variablesfilter_content, dedupe, personalize, lengthContent, User Profile
Display Content Recommended Based on Past Purchasespersonalize, sliceContent, User Profile
Cancel Confirmed Opt-In if User Exists on Listcancel, containsUser Profile
Cancel Send Based On User Varapi_user, cancelUser Profile
Cancel Abandoned-Cart Series if Cart EmptiedcancelUser Profile
Display User’s First Name from Full-Name FieldfirstUser Profile
Capitalize the First Letter of Users Names in TemplatestitleUser Profile
MD5-hash a user’s Email Addressmd5User Profile
Welcome Banner for New SignupstimeUser Profile
Dynamic Coupon Offertime, lengthUser Profile
Set Random Variable on Users for Future Cohort Testingapi_user, randomUser Profile
Set Current Date/Time as User Profile Field Valueapi_user, date, timeUser Profile
Trigger a Dynamic Welcome Follow Upapi_sendUser Profile
Customized Subject Line Based on Engagement Leveluser_engagementUser Profile
Dynamic Message Based on Geolocationuser_geo_homeUser Profile
Check the Number of Purchases a User Has Ever MadelengthUser Profile
Create a Local Variable Based on Email Addresssubstr, strrposUser Profile
Split a List of Values Stored as a Stringsplit, lengthUser Profile
Force Lowercase a User NamelowerUser Profile
Display a User’s Name in a Template in Title Casetitle, lowerUser Profile
Display a User’s Name in All CapsupperUser Profile
Have a Dynamic Welcome Message Based on Last List Signuppush, sort, firstUser Profile
Display One-Click Signup Link if User Is Not on Certain ListcontainsUser Profile
Show a Message Based on User’s Radius from Geographic Areauser_geo_select_regionUser Profile
Show a Countdown Clock Based on a User Variablesubstr, strpos, date, time, type, intUser Profile
Show a Prompt for a User to Login Based on a “last_login_date” Custom Fieldtime, int, absUser Profile
Pulling in Total Lifetime Purchase AmountnumberUser Profile
Recommend Complementary Items in an Order Confirmation Emailpersonalize, dedupeUser Profile
Loop Through an Array of Objects on a User Profilelength, titleUser Profile
SHA1 Encrypt a User’s Email Addresssha1User Profile
Show Today’s Date in Reader-Friendly Formatdate, timeOther
Create a Countdown Clock for a Certain Datedate, int, timeOther
Add Ordinal Dates to the Current Datedate, intOther
Prompt Signup to Non-Subscribed Listspush, filter, horizon_interest, setOther
Use Interest Data to Choose a Hero Imagehorizon_interestOther
Cancel and Resend Template Based on a Date (Avoiding Weekends)cancel, date, time, api_sendOther
Include Dynamic Date for ‘Email Pause’ Opt-down Option in Optout Pagedate, timeOther
Taking Users Down a Custom Stream via a Transactional Triggerapi_eventOther
Populate the Message ID in a Link Parametermessage_idOther
Insert a Unique Promotion Codemessage_idOther

Contact us

Top