Re: Custom objects - can't use in webhooks, so now what?

Phillip_Wild
Level 10 - Community Advisor

Custom objects - can't use in webhooks, so now what?

Question for you. I'm trying to create a fancy email that will do something like the following:

1. Knowing your city of residence, work out the temperature today. If it's cold, proceed to step 2.

2. Knowing what travel trips are in your wish list, and their starting cities, work out the temperature today in those cities. These trips are stored in a Marketo custom object, and the starting city is stored in a field. If one of these starting citiesi is hot, proceed to step 3.

3. If the difference between the two is large enough, send an email saying "it's much warmer in x, why don't you book this trip".

My initial idea was to use a webhook to access an external API such as DarkSky, then push the details into a Marketo lead field - but you can't use Custom Object fields in webhooks. I know you can iterate over this list using email scripting, but even if you could access APIs using this, then that's already sending the email, which means unqualified people will get the send. Any ideas?

I know that some vendors can do this based on location of open but I'm looking to do it in house based on our first-party data. Additionally, I know that potentially this could be done if the wish list data was in a JSON-style text field in Marketo, but since I'd have to send only part of the field across each time via the webhook (eg. the first trip, then the second trip in another webhook) I'm not sure if even that would solve my problem.

Best solution I can think of right now is to have a list of "generally hot" cities for certain times of the year and use the average temperature for that month against the user's hometown location. Or maybe using Zapier to hit Marketo's API when temperature in certain locations hits certain levels? Not as cool though, or as clean.

4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

Re: Custom objects - can't use in webhooks, so now what?

but since I'd have to send only part of the field across each time via the webhook (eg. the first trip, then the second trip in another webhook)

Not necessarily... you can send the full JSON to an intermediate webhook (a webhook gateway, if you will). That hop then either forward a single request (1st trip or 2nd trip) to the remote lookup endpoint, or send all the trips and gather all the results, passing them back to Marketo in a single response.

And there's also another way that, since you already have my email, I'd rather share privately since it's one of those dark alleys (in a good way?).

How many such emails do you expect to send on the busiest day?

Phillip_Wild
Level 10 - Community Advisor

Re: Custom objects - can't use in webhooks, so now what?

Hmmm....good question re volume. I would guess...maybe 1,000? I could batch them so it was lower if that helps.

An intermediate webhook could work - maybe through something like Zapier?

SanfordWhiteman
Level 10 - Community Moderator

Re: Custom objects - can't use in webhooks, so now what?

I don't know if Zapier can do this aggregation, probably not. I'd build it myself.

1,000 isn't much at all. I was just wondering if you're talking about 25,000+.  That starts to run into speed-of-light problems.

Phillip_Wild
Level 10 - Community Advisor

Re: Custom objects - can't use in webhooks, so now what?

Cool, thanks Sanford! I'll have a think and see what's scalable.