Expand documentation on Velocity scripting

Expand documentation on Velocity scripting

Right now, the available documentation on Velocity scripting includes:

This article is already outdated; references to records in arrays are not limited to the 10 most recent items (at least for custom objects).

This article omits some basic limitations, e.g. that token scripts cannot be used in email headers like subject lines.

This page has one (very helpful) example and gives some insight into what methods are available to Velocity scripts in Marketo, but does not go far enough.  There’s a need for more examples, especially examples of how to access data in custom objects by reference (e.g. A.B.name where A and B are related custom objects vs. just A.name).

The Velocity user’s guide is cited throughout the Marketo materials, but this is a bit misleading.  Only a subset of the full Velocity features are available to Marketo users and others come with caveats.  E.g. you can do logical comparisons in #foreach statements, but in some cases the script will fail silently (test emails do not send, no error generated) if you don’t check to make sure that a field that you’re referencing has a value (is not null).

I would like to see the following changes:
  1. A discussion category dedicated to Velocity scripts (like the API and Integrations categories).
  2. Documentation on what methods are available in the Marketo-Velocity environment with accompanying examples.
  3. Expanded documentation on how to access custom objects in the Marketo-Velocity environment, especially across multiple levels of reference.
  4. A way for developers to share scripts they’ve developed and tested in the  Marketo-Velocity environment so that new customers don’t have to “reinvent the wheel”.  There may be an opportunity here for Marketo-support to vet scripts that are submitted and make/suggest improvements that achieve run-time efficiencies to free up platform resources.
Not applicable
Totally agree with Patrick here. As Marketo is growing, Velocity scripting becomes more and more important to achieve advanced scripting.
Level 10
I agree,
It's certainlly a bit all over the place
Not applicable
Hi Patrick - Great summary.  Thanks for the feedback.
Level 10
100% agree.  IMO, Velocity is a VERY powerful part of Marketo that is too deeply hidden. I would love to see some snippets such as how to build a value in array comparison and some other great ideas.

Level 10 - Community Advisor

Completely agree with all above! It's a labour of love to get any of this to work.

Not applicable

Tim Ripley​ This might come in handy!

Not applicable

Anyone from Marketo around who could comment on this?

Was there any progress in the last 1.5 years?

Level 2

Yea....that whole 'scripting' can't be used in a subject line is kind of a big thing to omit!

Community Manager
Status changed to: Open Ideas