Re: Writing Email script token to pull Expire Date for Specific Assets only (SFDC assets)

Jennifer_Burtch
Level 1

Writing Email script token to pull Expire Date for Specific Assets only (SFDC assets)

I'm trying to create some renewal outreach for subscribers of a specific service.  Our services are managed by use of SFDC "asset" objects, which we have synced with Marketo.  I'm trying to create a token for subscription end date which is a field on the SFDC asset, but I need to ensure it's pulling the date from the correct SFDC asset, because it's possible for a person to have several assets with different expire dates.  Any thoughts on how to construct this using the Email Script option in the Token area? I've found the custom Asset object and its fields in the Email Script object, but am unsure about the syntax needed in the script.

Thanks for any tips and advice!

Tags (2)
4 REPLIES 4
Grégoire_Miche2
Level 10

Re: Writing Email script token to pull Expire Date for Specific Assets only (SFDC assets)

The doc here: http://developers.marketo.com/email-scripting/examples/

gives an example of using velocity with a custom object.

-Greg

Jennifer_Burtch
Level 1

Re: Writing Email script token to pull Expire Date for Specific Assets only (SFDC assets)

Thanks. I did look at the documentation, but it doesn't help me much as a non-developer. 

Grégoire_Miche2
Level 10

Re: Writing Email script token to pull Expire Date for Specific Assets only (SFDC assets)

Hi Jen,

Agreed

Honestly, you need to get hold of a developer to do this if you do not feel doing it. I tried in the past and wasted so many hours that it was really not a productive and efficient usage of my time.

-Greg

SanfordWhiteman
Level 10 - Community Moderator

Re: Writing Email script token to pull Expire Date for Specific Assets only (SFDC assets)

Yep, Velocity is a programming language. That might be glossed over by calling Velocity tokens merely "scripts," but unless you understand OOP to at least a small degree and Velocity's particular quirks to a medium degree, it's not going to be possible to write your own maintainable code.

You can learn a lot here on my blog: http://blog.teknkl.com/tag/velocity.  But of course it's not an overnight thing, and you've really gotta get management approval to work on adding this to your skill set.

[I've been thinking of offering Marketo-specific Velocity training, but I haven't figured out the prerequisites yet... you still have to have some technical exposure ahead of time, which I realize is a chicken-and-egg thing. Another concern with Velocity as opposed to other languages is that there's no small job: generally, a Marketo email is a production-stage, reputation-sensitive project. So one has to work to build a "lab" for Velocity including a range of representative test leads w/custom objects attached, etc.. Of course this is certainly possible, but harder than, say, jumping into learning JavaScript with some test objects.]