Right now, the available documentation on Velocity scripting includes:
https://community.marketo.com/MarketoArticle?id=kA050000000LB9MCAWThis 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=kA050000000LB9RCAWThis 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.htmlThe 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:
-
A discussion category dedicated to Velocity scripts (like the API and Integrations categories).
-
Documentation on what methods are available in the Marketo-Velocity environment with accompanying examples.
-
Expanded documentation on how to access custom objects in the Marketo-Velocity environment, especially across multiple levels of reference.
-
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.