Re: Send Marketo email button on Salesforce Opportunity?

Subscribe
Anonymous
Not applicable

Send Marketo email button on Salesforce Opportunity?

I know the standard "Send Marketo email" button is only available on the lead or contact object in Salesforce which includes the list views as well. Most of the Marketo emails we'd like to send from within Salesforce from a list view would need to utilize Opportunity information though. E.g. Send a Marketo email to a list of contacts where the most recent opportunity is in stage x. Really almost all of the logic is on the opportunity, so really we'd almost want to send a Marketo email to a list of opportunities, rather than contacts. I understand in the end I am sending the email to people, therefore contacts but to generate the list in Salesforce, I need opportunity data which is not available when creating a contacts list view. Is my only option to write opportunity information to the contact so that I can then use it to create list views? I understand I can solve many of these things if emails are sent from within marketo. This is for emails that are however not automated and for users that do not have Marketo login access and just send emails from within salesforce.

Is there a way to replicate the functionality of the "send marketo email" button for the opportunity? Or is there a better alternative that I am not thinking of?

Any thoughts or advice would be much appreciated!

Thanks.

9 REPLIES 9
Josh_Hill13
Level 10 - Champion Alumni

Re: Send Marketo email button on Salesforce Opportunity?

I suspect you'd have better results just running this from inside Marketo. You could even setup a special smart campaign just for this case to be triggered by Sales Insight.

But you could build a list of Contacts in SFDC with that criteria and use the list view to send the email with the correct Opp tokens.

As for the button, you'd have to ask an SFDC developer. It may be possible.

Anonymous
Not applicable

Re: Send Marketo email button on Salesforce Opportunity?

Hi Josh,

Hope you are fine.

I have used your code to replicate the button on the Accounts tab. It works fine until I click send, after this it throws the message below:

warning

"There was a problem retrieving this information"

Have you experienced this?

Thanks,

Anonymous
Not applicable

Re: Send Marketo email button on Salesforce Opportunity?

You have to create a custom button on the opportunity object that gets the contact information through the account. You'd have to write custom JS.  We added the button to the account object, here's the code:

idArray = {!GETRECORDIDS($ObjectType.Account)};
window.top.location = "/apex/mkto_si__Send_Marketo_Email?contactType=Account&contactIds=" + idArray +"&retUrl=" + encodeURIComponent(document.location.href);

You can mess with the code to make it work with Opportunities.

Anonymous
Not applicable

Re: Send Marketo email button on Salesforce Opportunity?

Hi Amir, that is great that you have added that button to the accounts to allow your users send emails to person accounts.
I will try this functionality. One question when the email is sent out from Marketo - do you have a way to stop those that have unsubscribed already?
How is your company using this functionality?

Thanks,

Maria

Stijn_Heijthuij
Level 7

Re: Send Marketo email button on Salesforce Opportunity?

Hi Maria,

Although I'm not that familiar with Sales Insight but expanding on what Josh said; you can have a Smart Campaign in Marketo that has 'Unsubscribed' as a filter. This way anyone who is unsubscribed cannot be sent the email.

Smart List of a Smart Campaign

  1. Trigger: Campaign is Requested
  2. Filter: Unsubscribed is False.

Flow of a Smart Campaign

  1. Send Email: Your Email
Anonymous
Not applicable

Re: Send Marketo email button on Salesforce Opportunity?

Thanks Stjn, I have tested and it works fine,

Anonymous
Not applicable

Re: Send Marketo email button on Salesforce Opportunity?

Hi Amir,

Hope you are fine.

I have used your code to replicate the button on the Accounts tab. It works fine until I click send, after this it throws the message below:

warning

"There was a problem retrieving this information"

Have you experienced this?

Thanks,

Anonymous
Not applicable

Re: Send Marketo email button on Salesforce Opportunity?

Amir's code for creating a button just creates the button. This button is coded to call the script 'mkto_si__Send_Marketo_Email' in your SFDC when clicked.

Do you have it created, set up and exactly named as that in your SFDC?

If not, just adding a button will not be useful. The button is just the front end user interface. The actual work is done by 'mkto_si__Send_Marketo_Email' here I guess. If it is not there, you will get an error.

Or

You might indeed have that script. And that script is getting an error when it is trying to fetch some information.

Hope this helps


Rajesh

Anonymous
Not applicable

Re: Send Marketo email button on Salesforce Opportunity?

Hi Rajesh, appreciate your answer. Yes I have it set-up exactly as Amir indicated. Have you tried this at your end?  Do you think I am missing something?

Send Marketo Email button and code.pngError.png