I want to send an email from a lookup user that isn't the lead owner Salesforce

Anonymous
Not applicable

I want to send an email from a lookup user that isn't the lead owner Salesforce

On our contact records in Salesforce, we have a lookup field that notes the "previous owner". My end goal is to send emails from this user without creating additional fields on the contact object.  

Can fields related via lookup (email, first, last, etc.) be referenced via Marketo? Again, I'm trying to avoid creating additional fields in Salesforce.

Thanks!
Tags (1)
2 REPLIES 2
Casey_Grimes
Level 10

Re: I want to send an email from a lookup user that isn't the lead owner Salesforce

Hey Miguel!

This is possible, but it can be a bit of a pain depending on the amount of potential previous owners.

If you look at a Marketo record, you'll see your lookup field populated with the looked-up user's Salesforce ID. Your first temptation may be to create a formula field that converts those IDs to human-readable values, but it turns out you can't send batch emails with Marketo formula fields as the address. Learn from my pain. ;(

What you CAN do, however, is write a email script token to handle this! What you'll be looking for is to do something like

#if (${lead.previousOwner} == "005o0000001ArgZ")
john.smith@example.com

#elseif ({lead.previousOwner} == "005o0000001ArgY")
kenichi.honda@example.com

#elseif ({lead.previousOwner} == "005o0000001ArgX")
jane.graham@example.com

#else
default.email@example.com

#end

You would need to make one of these for the email address itself as well as the previous owner's real name, and obviously you're going to need the real API name of Previous Owner and your users' values (which you can get from your SFDC administrator if necessary), but that's the basic gist of it.
Anonymous
Not applicable

Re: I want to send an email from a lookup user that isn't the lead owner Salesforce

I'm going to explore using script tokens to render first name and email. Also, really good to know about formula fields not being able to send - that would've been my worst case scenario and would've ate up a ton of my time.

Thanks!