Can you use a formula field in Marketo to change a sales rep's email domain? | Community
Skip to main content
Jason_Martin
Level 2
February 13, 2020
Question

Can you use a formula field in Marketo to change a sales rep's email domain?

  • February 13, 2020
  • 1 reply
  • 2789 views

Hello,

      I am looking for a way to change the email domain for our sales rep dynamically so I can send Marketo emails from an assigned sales rep with a different domain.

 

We have a unique situation where we cannot add CNAME records to our existing branded domain, companyname.com. With Marketo, we have a secondary domain, companynamesolutions.com. The issue I am having is that all our assigned sales reps have an email address of companyname.com as their sales owner email in Salesforce.

 

What I am looking to do is to somehow take their email address, strip off the first domain and append the second in an automated way:

 

example:

Jason@companyname.com > Jason@companynamesolutions.com

 

We already have an email alias set up so sales can receive emails from this new domain, but not sure how to dynamically it and place the new value in a second field that can be used with tokens. I thought about doing this with a smart campaign and manually matching the values, but we have over a hundred reps and managing this over time will be a pain as reps come and go.

 

Any ideas?

1 reply

SanfordWhiteman
Level 10
February 13, 2020

Not a Formula field. A Velocity {{my.token}}, yes. Simply replace ($lead.yourField.replaceAll) the domain.

Jason_Martin
Level 2
February 13, 2020

Thanks @sanfordwhiteman ! If I use a program token with velocity script, can I use that token in a Smart Campaign to populate the value in a field using Change Data Value? Or will it only run as a token in an email? I'd like to get the value populated in a field that can be reused across my instance. 

 

Thanks

Jason

SanfordWhiteman
Level 10
February 13, 2020
No, you can't make a permanent change this way. Velocity is only executed during email assembly.

For a permanent change you'd use a webhook.