Skip to main content
Jennifer_Bisho1
Level 4
11월 30, 2018 4:40 오후 UTC
질문

Complex tokens/personalized data

We are looking into sending an email out that has complex data fields that need to populate within the body as tokens (or however else this would be possible).  Please see the attached sample database as an example.  Basically, some fields will have multiple values that we want to display as a list.  Does anyone know how we could make this work?  Our outside agency has said that they can create Marketo custom objects to do this, but I was wondering if there is an easier way.  Thanks!

이 주제는 답변이 닫혔습니다.

7 답변

Josh_Hill13
Level 10
11월 30, 2018 10:40 오후 UTC

Velocity Scripting. See developers.marketo.com and some other threads here.

번역
SanfordWhiteman
User Group Leader
User Group Leader
11월 30, 2018 10:50 오후 UTC

You definitely don't need a Custom Object.

As Josh says, Velocity could easily parse and slice-and-dice this data. Just write it as a JSON string (spreadsheet rows = array of objects) to a Textarea field on the lead.  Then a Velocity ("Email Script") {{my.token}} can sort, pluck, output, etc. from this lightweight data source.

On the other hand, you haven't given an example of how the list needs to be formatted for output. If you just want to dump the whole thing (no filtering or other formatting) you could just store it as preformatted HTML in the Textarea.

번역
Jennifer_Bisho1
Level 4
12월 3, 2018 7:34 오후 UTC

Hey Sanford - good to know.  Unfortunately, I have zero knowledge of Velocity/JSON.  Is that difficult to learn?

I'm thinking that we'd want the enduser and service amount columns to be next to each other in a table within the email body, and have them display like it looks in the spreadsheet (on separate lines).

번역
SanfordWhiteman
User Group Leader
User Group Leader
12월 3, 2018 8:52 오후 UTC

I have zero knowledge of Velocity/JSON. Is that difficult to learn?

Achieving actual mastery of Velocity is very difficult. A familiarity with some basic functions isn't that hard if you have a good teacher , but parts of this effort are on the hard side (converting a JSON string field to a living Velocity object only a takes a few lines of code, but those lines are not at all well-known).

But let's get back to my other question. In this particular case, it doesn't sound like you need to filter, remap, sort, or otherwise change the original data, that is, it doesn't have to be a living data source. Why not have it be stored in a Textarea as an HTML <table>, already laid out?

번역
Jennifer_Bisho1
Level 4
12월 3, 2018 7:44 오후 UTC

Also...can someone dumb down how to explain custom objects to me?  lol.  I know I'll need to be working with these early next year since we are connecting Salesforce, but I've never used them before.

번역