Re: Event name in Webhooks

Zachery_Miranda
Level 1

Event name in Webhooks

I would like to make a single webhook to be able to handle all events from Marketo regardless of which smart campaign the webhook is attached to. Is it possible to be able to know what triggered the webhook such as a specific event? I wasn't able to find a generic token to be able to do that in the payload. Is the only solution to make a webhook for every single event that we want to track?

13 REPLIES 13
SanfordWhiteman
Level 10 - Community Moderator

Re: Event name in Webhooks

You could use tokens like {{campaign.name}}, {{campaign.id}}, {{program.id]}, etc.

Mark_Price
Level 7

Re: Event name in Webhooks

Hi, 

If you were to make a program token called {{my.eventTracker}} and then add that to your webhook when setting it up- I believe it will do what you would like. 

If the campaigns aren't nested in programs a folder token could potentially work.  

hope it helps!

Zachery_Miranda
Level 1

Re: Event name in Webhooks

Thanks for the quick responses! I have one more question. What exactly would an event mean in Marketo (such as "email opened" or "email sent", etc.) and how many would be associated with a campaign?

SanfordWhiteman
Level 10 - Community Moderator

Re: Event name in Webhooks

Oh, you mean "event" as in "activity."

In Marketo, "event" specifically refers a type of program, and its associated live/virtual, er, event.

You can use the {{trigger.tokens}} for activities, they're built-in: {{trigger.trigger name}} is the type and {{trigger.name}} is the description/subject.

However, I hope you're not expecting to ping a service via webhook when an Email Sent activity occurs unless your daily volume is in the 10s of thousands only.

Zachery_Miranda
Level 1

Re: Event name in Webhooks

When I try to set up a webhook on the webhook and insert a token, I don't see any of the trigger.tokens in the dropdown. Is there something I have to do to enable that?

Thanks!

SanfordWhiteman
Level 10 - Community Moderator

Re: Event name in Webhooks

Just type them manually.

Mark_Price
Level 7

Re: Event name in Webhooks

oh! I also thought you meant events as in live events vs. an event tracker.   

As Sanford mentions, these are called activities in Marketo.  

Unless your volume is extremely low, I would not recommend a webhook for this purpose either. 

In my current instance we get this data with the Bulk Extract API: 

https://developers.marketo.com/rest-api/bulk-extract/ 

If you inspect the activity log of a record and click into an activity, you will get an idea of the data points you'll have. 

Zachery_Miranda
Level 1

Re: Event name in Webhooks

Why is it that you wouldn't recommend using webhooks unless volume is really low? Do you worry that it would overwhelm my service or do the webhooks break down?

SanfordWhiteman
Level 10 - Community Moderator

Re: Event name in Webhooks

We use webhooks profusely, millions of times a day across instances. So they are business-critical (our products depend on them) and awesome.

However, there are certain practicalities. One is the speed of light. Another is the number of webhooks Marketo will allow to be open simultaneously.  Another is the response time of your webhook-compatible service.

Together, these mean that, since Marketo will allow you to send millions of emails per day, triggering on Send Email is a danger zone. Webhooks top out at ~100K/day due to the practical considerations above.