Marketo Sync: Lead Owner Question: Personalisation

Anonymous
Not applicable

Re: Marketo Sync: Lead Owner Question: Personalisation

I'm Sorry   I edited because I pasted in what you had above and it was still not returning the lead owner... here's how I edited the top part without editing your bottom code...

"Your Rep" I edited to show "The Team at eOriginal" as I wanted that to show when no lead owner was associated with record

Then "Marketo Sync", was the only thing I left in their because I was not sure what "obsolete owner" was/or should be replaced with. Also, do I pasted this in with your "##--- ---- " lines? Sorry I am completely new to this and have a strong right brain, but slow left one. 😉

  1. ##----SET DEFAULT DISPLAY NAME---- 
  2. #set( $defaultLeadOwnerFriendly = "Your Rep"
  3. ## 
  4. ##----SET SPECIFIC NAMES TO TREAT AS BLANK---- 
  5. #set( $deFactoEmpty = [ "Marketo Sync", "Obsolete Owner" ] ) 
  6. ## 
  7. ##----NO NEED TO EDIT BELOW THIS LINE!---- 
  8. #set( $leadOwnerFriendly = "$!{lead.Lead_Owner_First_Name} $!{lead.Lead_Owner_Last_Name}"
  9. #set( $leadOwnerFriendly = $leadOwnerFriendly.trim() ) 
  10. #if( $leadOwnerFriendly.isEmpty() || $deFactoEmpty.contains($leadOwnerFriendly) ) 
  11.   #set( $leadOwnerFriendly = $defaultLeadOwnerFriendly ) 
  12. #end 
  13. ${leadOwnerFriendly} 
SanfordWhiteman
Level 10 - Community Moderator

Re: Marketo Sync: Lead Owner Question: Personalisation

Yes, include the ## (comment lines). Didn't expect that you'd edit them out.

You were right to set $defaultLeadOwnerFriendly to "The Team at eOriginal." 

You can leave "Obsolete Owner" in the array of de facto empties or remove it.

If this still isn't working in your environment, then look extra-closely at the Lead Owner that you're trying to catch and replace. Is it really "Marketo Sync" (case sensitive, with no spaces)? Can you show a screenshot of the Lead Owner First Name and Lead Owner Last Name?

Anonymous
Not applicable

Re: Marketo Sync: Lead Owner Question: Personalisation

Lead owner record in Marketo: pastedImage_1.png

pastedImage_0.png 

SanfordWhiteman
Level 10 - Community Moderator

Re: Marketo Sync: Lead Owner Question: Personalisation

Well, that looks right for the de facto empty ("Marketo Sync").

Are you saying it's also picking up ​other ​leads as being de facto empty?  Can you show me a screenshot of those?

Anonymous
Not applicable

Re: Marketo Sync: Lead Owner Question: Personalisation

What I am saying is that when I place the exact code you have in the token, mmodified without Obsolete owner, and The Team at eOriginal in the default friendly, Its only returning the word: Sync

So email has:
contact us for more questions!

Sync

Should be:

contact us for more questions!

Andrew Kunkel
(as he is the lead owner of my record that I am testing to in salesforce) Now it is not even adding in the default "The team at eOriginal" ) I'll try and pull a screen shot.

Anonymous
Not applicable

Re: Marketo Sync: Lead Owner Question: Personalisation

Thank you very much testing now.

Can you tell me what the purpose of this line of code is: #set( $deFactoEmpty = [ "Marketo Sync" ] ) ?

Why do I need that? Can I just have the whole token written the way it is below to accomplish the same thing?

All I want to ensure is if the lead has marketo sync as the owner or owner is blank to use the default lead owner, otherwise it should be the assigned lead owner name...

#set( $defaultLeadOwnerFriendly = "The Team at eOriginal" )

#set( $leadOwnerFriendly = "$!{lead.Lead_Owner_First_Name} $!{lead.Lead_Owner_Last_Name}" )

#if( $leadOwnerFriendly.isEmpty() || $leadOwnerFriendly.contains("Marketo Sync") )

  #set( $leadOwnerFriendly = $defaultLeadOwnerFriendly )

#end

${leadOwnerFriendly}