How to push Marketo lead record to a middleware or external systems

Daniel_Perez
Level 1

How to push Marketo lead record to a middleware or external systems

Hi there,

Does anyone know how to push Marketo lead record or any type of data (such as program name) to a middleware or external system? I was thinking that Webhooks might work for this purpose but the haven’t at this point.

The goal is to push the Marketo Program Name to MS Dynamics So that when the program is created and named in Marketo it will create a campaign in MS Dynamics. As there’s no natural sync between Marketo and the campaigns entity in MS Dynamics we are forced to use a middleware for this Sync process.

Any help is very welcome!

Thanks,

Daniel

5 REPLIES 5
SanfordWhiteman
Level 10 - Community Moderator

Re: How to push Marketo lead record to a middleware or external systems

You're kind of conflating two very different types of data.

Lead fields can absolutely be passed via webhook. That's what 'hooks are for.

Changes to the program/folder tree are not registered as lead changes (since leads need not be in the new program). Those administrative changes are only logged to the audit log. So in fact there's no triggered activity at all, even if you could send such an activity to a webhook.

The only way to do what you describe is to poll the Programs API for changes. It's a major undertaking.

Daniel_Perez
Level 1

Re: How to push Marketo lead record to a middleware or external systems

Thanks Sanford.

Our marketing team is basically looking for track campaign influence in customer purchasing so initial stage would be to have all campaign members/smart list and budget pushed automatically from Marketo to a campaign in MS Dynamics.

They had request to create the program in Marketo and then automatically have a campaign created in MS Dynamics. Quite crazy. But I'm thinking in replicate the SFDC campaign sync into MS Dynamics. A CRM developer told me that if we can attached the program name to a lead he can create rules in the CRM that associate leads to a specific campaign. If I could start with this that would be great. Any idea? I'm very new to MS Dynamics btw.

Thanks in advance.

Jay_Jiang
Level 10

Re: How to push Marketo lead record to a middleware or external systems

As Sanford mentioned, there's no trigger to trigger a webhook when a program is created in Marketo. I'm not familiar with Dynamics but here are some ideas anyway.

If there's a trigger for when a campaign is created in Dynamics, you could build something in REST API to tell Marketo to create a program off the trigger from Dynamics.

As for adding leads back to the Dynamics campaign, if you're not talking about a lot of leads, you can use the program status is changed trigger to trigger webhooks with the special {{program.Name}} token to Dynamics (not sure how Dynamics accepts data). If there are a lot of leads moving through daily, a daily REST API batch pull would probably be more efficient but you'd need some middleware monitoring what's been sent already and what's new before sending to Dynamics.

Daniel_Perez
Level 1

Re: How to push Marketo lead record to a middleware or external systems

Thank you Jay. Very helpful info.

This is good starting point for the integration between Marketo Programs and MS Dynamics campaigns. This is also my first time using webhooks. Is there any system set up needed to be made before setting up the webhook (I mean set the url, the tokens, write the template, etc...)?

Thank you.

SanfordWhiteman
Level 10 - Community Moderator

Re: How to push Marketo lead record to a middleware or external systems

Is there any system set up needed to be made before setting up the webhook (I mean set the url, the tokens, write the template, etc...)?

Well, of course. If the webhook is sending data to the Dynamics API, then your outbound webhook's payload, token encoding (JSON, XML, or form encoding), destination URL, and so on all need to conform to the requirements of their inbound API.

However, you're going to need to use an intermediate API gateway in this case because of authentication requirements. The Dynamics API uses an expiring OAuth token, which (despite some people's hacks to try to make multistep authentication work via multiple webhooks) is just not acceptable for direct Marketo ↔ Dynamics communication.

Instead, Marketo will post data → gateway; the gateway will retrieve, cache and refresh the access token; and then the gateway will send data → Dynamics.  To Marketo this will look like a single webhook call. It's a simple task if you have a developer who's used to this kind of "webhook adapter" scenario.