Is there an option to execute a custom code on insert/update of a marketo-only Custom object record? | Community
Skip to main content
May 6, 2016
Solved

Is there an option to execute a custom code on insert/update of a marketo-only Custom object record?

  • May 6, 2016
  • 2 replies
  • 3257 views

We have created a custom object in marketo (call it "Sample - M"). A similar object exists in Salesforce (call it "Sample - S"). For some marketing processes, the records for these objects will be created in marketo. Now, the requirement is: whenever a Sample - M record is created or updated in marketo, it needs to flow in to Salesforce to insert or update a corresponding Sample - S record. This can be done via Salesforce APIs but I am unable to find a way to code the functionality in Marketo which could then be triggered every time a record is updated/inserted in Marketo.

Does marketo not support any custom code (Javascript code will also work) to be executed on record? If not, is there any workaround to obtain the above requirements?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Grégoire_Miche2

Hi Nikhil,

Then salesforce will have to connect to Marketo through the REST API and read the values in the Sample - M object. The REST API enables to read, create and update custom objects in Marketo.

-Greg

2 replies

Kenny_Elkington
New Participant
May 6, 2016

Is there a reason that you can't use the normal SFDC sync to pull down the custom objects from SFDC?

Grégoire_Miche2
New Participant
May 6, 2016

Hi Kenny,

I understand the custom objects are instantiated in Marketo.

If my understanding is correct, SFDC sync'ed custom objects in Marketo are read-only.

-Greg

Kenny_Elkington
New Participant
May 6, 2016

Yes, but they're only read-only in Marketo.  Any changes committed to the records in SFDC will still be synched down to Marketo.

Grégoire_Miche2
New Participant
May 6, 2016

Hi Nikhil,

Marketo does not have functionality that would enable you to do this "internally" to Marketo.

I would encourage you to develop an APEX service in SFDC that does what you need to do, connecting to Marketo through it's API.

You could use it in conjunction with a Marketo webhook that would call a webservice developped in SFDC to let SFDC know that a  given lead/contact had an update on a custom object. But this will be limited as, for the moment, the webhook will not be able to pass info from the "Sample - M" objects.

-Greg

May 6, 2016

Thanks for your response Greg. However, for my requirement, passing values from Sample - M to Salesforce is a key functionality. We want to store the info stored in record fields in Salesforce Sample - S object records.

Grégoire_Miche2
Grégoire_Miche2Accepted solution
New Participant
May 6, 2016

Hi Nikhil,

Then salesforce will have to connect to Marketo through the REST API and read the values in the Sample - M object. The REST API enables to read, create and update custom objects in Marketo.

-Greg