What would be the Appropriate Velocity code for this tag

Highlighted
Anonymous
Not applicable

What would be the Appropriate Velocity code for this tag

Email Scripting has been broken in Marketo and has made me unable to choose attributes for Leads in the script. (see below)

Screen Shot 2018-07-23 at 2.26.16 PM.png

I am trying to write a dynamic subject line token, but my Country attribute is not functioning.

In my Marketo Customer Info, I have bucketed each prospect in a Language segment called "Language Segmentation"

Screen Shot 2018-07-23 at 2.28.35 PM.png

I have to assume the correct code is: ${lead.Language_Segmentation_c == "English (EN)"           (not sure about the _c but Marketo puts it in)

Is this the proper way to call this attribute?

4 REPLIES 4
Highlighted
Level 10 - Community Moderator

Re: What would be the Appropriate Velocity code for this tag

Please move the thread to Products​ to continue. Move link will be at the right. (This isn't a support space, it's for webmaster feedback.)

Highlighted
Level 10 - Community Moderator

Re: What would be the Appropriate Velocity code for this tag

You have to be able to choose Person/Lead fields from the tree on the right-hand side in order for them to be injected (i.e. accessible) in the Velocity context.

If you've already checked them off, then they'd still be available (regardless of the UI corruption) but if you haven't checked them off yet, you'll have to wait for Marketo to fix this corruption in your instance.

It's very frustrating when the Script Editor gets messed up like this.  I usually switch browsers, go into Incognito, and cross my fingers and toes and it goes away pretty soon.

In the meantime, you might catch up on these posts :

Highlighted
Anonymous
Not applicable

Re: What would be the Appropriate Velocity code for this tag

Yes, the question is more, regardless of the UI corruption, what is the grammatical notation that would be placed there...

For example

lead.Languge_Segmentation =

lead.Language_Segmentation_Segment =

lead.Languge_Segmentation_c =

lead.Language_Segmentation_Segment_c =

Highlighted
Level 10 - Community Moderator

Re: What would be the Appropriate Velocity code for this tag

It's impossible to predict what the Velocity property name will be without dragging it onto the canvas, since the way Marketo canonicalizes names for Velocity isn't documented. It's largely in line with the SOAP field name, but not 100% -- and some fields accessible in Velocity have no API equivalent, so you don't have another place to look.

Most likely in your case it's

  $lead.Segmentation_LanguageSegmentation_nnnn

where nnnn is the Segmentation ID, which you can see in the URL when you go into the segs area.

Obviously if you guess correctly that's fine to use. But it still needs to be checked off in Script Editor.