Velocitip: Only use Preview By List (not By Person) to debug tokens — if you value your time
“Only use Preview By List” has been my mantra for so long, I’d been wondering if was still justified. Could it have become FUD due to changes in Marketo? Nope, a recent Nation thread proved it’s still the way!
A user was encountering what seemed to be “missing custom objects in Velocity.” I, my community buddy Darshil, and the OP went back and forth for weeks trying to explain the symptoms. Finally, they switched from Preview by Person to Preview By List and we figured it out. Countless hours could’ve been saved by using Preview By List to start! (Or if, to be fair, I’d reminded them.)
Reason 1: Limit repetitive actions
The most obvious advantage is you don’t have to constantly refresh the Email Editor when you make a change to Velocity code. Instead, as long as your static list has at least two people, you can quickly arrow between them:
Populating a list with a few representative people (ideally, test records with descriptive names) is my first step in any significant Velocity project.
Reason 2: Don’t go on a wild goose chase
The second reason is more subtle and much more important. When you choose By Person, Marketo dedupes the dropdown options so only one record is available per email address. There are 2 person records with sandy+testvelocity01@email.invalid
in this instance:
This is what caught up the OP in the case above. In Preview By Person, they were choosing one person with a given address, but they didn’t realize there was a duplicate. It was the other person who had the custom objects in their Person » Custom Objects tab!