Need unique id for individual email send for webhook integration

Highlighted

Need unique id for individual email send for webhook integration

We are tracking open/clicks from marketo campaigns and need a unique identifier for the batch of emails sent or the email itself. See example below.

lead email . ​

Lead EmailEmail SentEmail OpenedUnique ID
bob@bob.com2019-02-20T12:07:05.000Z2019-02-20T13:00:10.000Z123456
bob@bob.com2019-02-20T12:07:05.000Z (same email)2019-02-21T01:00:09.000Z (opened at later date)123456 (same unique ID)
bob@bob.com2019-02-21T01:09:00.000Z (different email)2019-02-21T12:01:00.000Z
160000 (different unique ID)
steve@steve.com2019-02-20T12:07:05.000Z2019-02-20T15:09:12.000Z123890

Is there a token available that would uniquely identify the email or is there a way to identify the batch of emails being sent which if used in combination with the lead id/email address it would then be unique?

5 REPLIES 5
Highlighted
Level 10 - Community Moderator

Re: Need unique id for individual email send for webhook integration

If you're really attempting to pass all opens and clicks to a webhook, this will likely overwhelm the (speed-of-light-related) limits of webhooks. How many such events are you recording in a day at peak?

In any case the value you're looking for is the Campaign Run ID, but it's not surfaced in the typical webhook context (and also isn't as granular as people think). {{Trigger.Name}} is of course the email asset name.

If I were you, and wanted every open and click relayed to another service, I'd build a custom redirector and run it on my branding domain, as those activities are always logged there first. We've done this in the past under exigent circumstances (needing to log and rewrite all click targets on-the-fly).

Highlighted

Re: Need unique id for individual email send for webhook integration

Thanks for the response!

The number of events is pretty small so not too concerned with the number of events. Also we have autoscaling setup with the webhook handler.

Is there anyway to make the campainRunId available as webhook tokens?

Highlighted
Level 10 - Community Moderator

Re: Need unique id for individual email send for webhook integration

It's not about the webhook service's capacity, it's about Marketo's concurrent request capacity and the inherent overhead of any network roundtrip.

The only way to surface the Campaign Run ID is via Velocity. I've explored these exotic avenues in my blog posts.

Highlighted
Level 5

Re: Need unique id for individual email send for webhook integration

I would add that there is a pretty terrible bug with Campaign Run Id when Triggering Campaigns via the API. It will use it's lowest value when the campaign is triggered instead of incrementing.

It works this way if you Request Campaign as well as update a lead field in the API. For this reason, I had to abandon using Campaign Run Id in extracted data.

Highlighted
Level 10 - Community Moderator

Re: Need unique id for individual email send for webhook integration

Yep, that's what I was subtly shouting out to w/"not as granular".