Dynamic Image from Marketo DB | Community
Skip to main content
Eric_Heitz1
Level 2
June 28, 2018
Question

Dynamic Image from Marketo DB

  • June 28, 2018
  • 2 replies
  • 1775 views

I have a spreadsheet that will be manually loaded into Marketo with a reference to the contacts representative/company contact. They (the internal client) would like to feature the reps photo with the contact information.

I'm trying to figure out how to associate the reps image with their contact information without having to hard code the URL at the database level. I was thinking Velocity but have not found a good sample.

@Sanford Whiteman​ I searched your blog and found some close references but could use your help.

Any help would be awesome!

Thanks,

Eric

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Jay_Jiang
Level 10
June 29, 2018

You can achieve this with a simple naming setup that makes use of existing tokens, e.g. FirstName LastName.jpg

So your url to the image file would be "path/{{lead.Sales Owner First Name}} {{lead.Sales Owner Last Name}}.jpg"

SanfordWhiteman
Level 10
June 29, 2018

Like Jay says, if you can name the images in a URL-safe and consistent fashion, then you don't need additional logic to figure out the URL as you can simply reuse the fields.

However, if you try to do it this way, I definitely wouldn't use the first/last names, but rather the owner's email address, for 3 reasons:

  1. Only a tiny fraction of the characters that are valid in those owner names are also valid unencoded in a URL, and the moment you have any exceptions the setup can't work (while the same is technically true of the "@" and "+" in emails, in reality those characters do not need to be encoded in files hosted on Marketo)
  2. Owner email addresses are relatively static, compared to first names and last names (even nicknames and name changes due to marriage/divorce usually keep the old email address around as an alias)
  3. Owner email addresses are unique, first and last names are not (when you work in large global orgs and set up your 5th account for an Ankur Sharma, this becomes top-of-mind!)

I still approach such projects with trepidation and bookmark them as relatively fragile, no matter what. Using Velocity allows you to properly percent-encode URLs, which a lot of people don't realize is even a thing.