Expand documentation on Velocity scripting

Expand documentation on Velocity scripting

Right now, the available documentation on Velocity scripting includes:

https://community.marketo.com/MarketoArticle?id=kA050000000LB9MCAW
This article is already outdated; references to records in arrays are not limited to the 10 most recent items (at least for custom objects).

https://community.marketo.com/MarketoArticle?id=kA050000000LB9RCAW
This article omits some basic limitations, e.g. that token scripts cannot be used in email headers like subject lines.

http://developers.marketo.com/documentation/email-scripting/
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).

http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html
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.
9 Comments
Anonymous
Not applicable
Totally agree with Patrick here. As Marketo is growing, Velocity scripting becomes more and more important to achieve advanced scripting.
Edward_Masson
Level 10
I agree,
It's certainlly a bit all over the place
Anonymous
Not applicable
Hi Patrick - Great summary.  Thanks for the feedback.
Robb_Barrett
Marketo Employee
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.


Phillip_Wild
Level 10 - Community Advisor

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

Anonymous
Not applicable

Tim Ripley​ This might come in handy!

Anonymous
Not applicable

Anyone from Marketo around who could comment on this?

Was there any progress in the last 1.5 years?

Yonder_Buslon
Level 2

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

kh-lschutte
Community Manager
Status changed to: Open Ideas