How to Enrich Marketo Leads When Initial Response From Webhook is a 202?

Highlighted
Anonymous
Not applicable

How to Enrich Marketo Leads When Initial Response From Webhook is a 202?

Hi everyone,

We are currently using Marketo's webhook ability to enrich our leads with FullContact. Some of these requests return a 202 API response (aka queued). When FullContact gets the updated data, it's not showing up on the lead in Marketo. We're not sure if it sends the updated data to Marketo or Marketo is not listening for it after the initial 202. We thought about changing our marketing activity workflow so that for a 202 response, it re-queries the FullContact after 5 minutes but are afraid that it could result in an infinite loop. Any help here would be appreciated. Thanks!

2 REPLIES 2
Highlighted
Level 10 - Community Moderator

Re: How to Enrich Marketo Leads When Initial Response From Webhook is a 202?

First, Marketo is absolutely correct here, as webhooks are designed to be stateless. Plus, 202 responses do not carry any inherent "retry-after" semantics (any queue-and-retry process needs to be separately implemented by clients and servers, even outside of the webhook context).

But you don't have to worry about an infinite loop if you don't create one.

Instead, Call Webhook once more after a 5 minute Wait step (or 6 minutes to be safe).  Have another Smart Campaign that triggers on Webhook is Called, constrained by response = HTTP 200. In that second SC's Flow, call Remove from Campaign on the first campaign.

Highlighted
Level 2

Re: How to Enrich Marketo Leads When Initial Response From Webhook is a 202?

Based on what I see here: https://www.fullcontact.com/blog/asynchronous-delivery-with-webhooks-and-testing-locally/ it seems that Marketo is just acting as the API Consumer in the diagram. As Sanford Whiteman mentioned you could call the service again and get the 200 response with the enriched data, but you might be charged for 2 credits, one for the 202, and one for the 200.

For a task like this you could spin up a few AWS lambdas to make the necessary GET/POST requests, and one lambda could be attached to an API gateway that handles the POST callback behavior.

Does this enrichment need to happen in real-time as leads route, or is it a batch process where you use your monthly credits at once?