Trying to get a list of the various use cases you all have used velocity scripting for! TYIA!
“All” is an impossibly tall order! Velocity is a full-featured dialect of Java that can be put to infinite uses.
We have several hundred Velocity {{my.tokens}} in the wild across Marketo instances. I’ll just list 10 cases, in no particular order:
1. Outputting dates, datetimes, and currency in local and/or business-specific formats
2. Performing complex date math operations that can’t be done any other way in Marketo
3. Sorting, filtering, and formatting custom object records for output using rich pattern matching, math operations, etc.
4. Decoding JSON fields (textareas w/JSON content) to allow rich multidimensional data without COs
5. Consulting lookup tables to map person/company fields to user-friendly values
6. Properly URL-encoding fields that cannot otherwise be safely included in URLs, such as Email Address
7. Using multiple segmentations at the same time for hyperpersonalized content
8. Complex logic for best-fit content (“cascading” from preferred fields to secondary fields to fallback values)
9. Parsing multi-valued string fields (e.g. semicolon-delimited) and generating friendly content
10. Computing aggregate values (e.g. average/total columns) on the fly for both marketing content and sales alerts
Here are a couple of use cases I’ve worked on using Velocity scripting:
Dynamic Content Based on Lead Data
Within a single email, I’ve implemented conditional logic to show or hide content blocks based on the lead’s:
Job Title
Industry
Country/Region
Personalized Content Delivery
Based on user interests, I’ve dynamically sent different PDFs to recipients — all within a single email — by leveraging Velocity scripting to tailor the content per user.
Kindly check if that would helpful.
Thanks!!