Question
Velocity scripts - using custom objects in email
Howdy Marketo gurus ...
Is anyone using Velocity scripts in combination with custom objects mapped into Marketo from Salesforce to do advanced personalization in email?
I have a case where custom object A (a list) is related to custom object B via a key (or "Relationship Field"). For each item in the list, I want to access the name of the item. In Velocity, referencing $A__cList.get($index).Name gives me the key. I would expect something like $A__cList.get(Index).B__cList.get(0).Name to get me the actual name.
Records in A have a one-to-many relationship with records in B. That is, each record in A maps to one record in B, but each record in B can map to multiple records in A.
Ultimately, I'm trying to reference A.B.Name, but I'm only having success referencing A.Name. A.Name gives me a Salesforce unique identifier that doesn't make for a very friendly "label" to use in an email message. Both A and B are enabled under the Object Sync area of our Salesforce integration (in the admin section).
I know that wading into the specifics of someone else's script may not be your idea of fun on a Tuesday night ... I would welcome any examples of complicated custom object references that are working for you in Marketo Velocity scripts. I'd also love to swap script examples and templates offline for anyone who has used Velocity extensively in Marketo - Googling around gets me lots of manuals and Stackoverflow threads, but nothing that is specific to what folks are actually trying to do in Marketo.
Thanks,
-patrick
Is anyone using Velocity scripts in combination with custom objects mapped into Marketo from Salesforce to do advanced personalization in email?
I have a case where custom object A (a list) is related to custom object B via a key (or "Relationship Field"). For each item in the list, I want to access the name of the item. In Velocity, referencing $A__cList.get($index).Name gives me the key. I would expect something like $A__cList.get(Index).B__cList.get(0).Name to get me the actual name.
Records in A have a one-to-many relationship with records in B. That is, each record in A maps to one record in B, but each record in B can map to multiple records in A.
Ultimately, I'm trying to reference A.B.Name, but I'm only having success referencing A.Name. A.Name gives me a Salesforce unique identifier that doesn't make for a very friendly "label" to use in an email message. Both A and B are enabled under the Object Sync area of our Salesforce integration (in the admin section).
I know that wading into the specifics of someone else's script may not be your idea of fun on a Tuesday night ... I would welcome any examples of complicated custom object references that are working for you in Marketo Velocity scripts. I'd also love to swap script examples and templates offline for anyone who has used Velocity extensively in Marketo - Googling around gets me lots of manuals and Stackoverflow threads, but nothing that is specific to what folks are actually trying to do in Marketo.
Thanks,
-patrick