Solved

How to get data on when someone joined or left a list?

  • 21 January 2021
  • 2 replies
  • 496 views

Badge +2

I'm building an integration with our CRM. I have been able to write the integration that pushes data from the CRM to Klaviyo OK.

However I'm struggling to find out how I can get a notification (either live, e.g. webhook, or by a API query) about when people have joined or left lists and by what means (e.g. preferences update, or import or subscribe or unsubscribe from mailing etc.).

I thought there might be an Event created, like "subscription change" or something, but I can't see evidence of that.

How can I find out about these changes in the data?

icon

Best answer by artfulrobot 28 January 2021, 19:09

View original

2 replies

Userlevel 5
Badge +10

Hi @artfulrobot, have you seen our documentation that has information on our lists API? Check out our API Documentation

That link has information on our lists API which I believe should help lead in the right direction in terms of how you can pass that into Klaviyo. 

Badge +2

Here’s what I’ve discovered:

  • There are no webhooks and you can’t trigger an http request from a flow, however you can have it send you an email. I didn’t fancy generating one email per change in subscription on a 150k list of people though….
  • To find list subscribe and unsubscribes you can use the v1/metric/<metricID>/timeline API. You have to call it three times:
    • Once with the metric ID for “Unsubscribed”
    • Once with the metric ID for “Unsubscribed from List”
    • Once with the metric ID for “Subscribed to List”
  • That API has a parameter called “since” which is poorly named, because it means “until”. Unless you change the “sort” parameter to “asc” (it defaults to “desc”), in which case, since does mean since.
  • This will get recent un/subscribes but won’t show up suppressions. To get to those you need to:
  • Use the v1/people/exclusions API to fetch the latest global suppressions. This API does not take a since/until paramter, but you can keep paging back until you’ve had enough.
  • Use the v2/list/<listID>/exclusions/all API for each and every list to fetch the latest list suppressions. Like the global suppressions, you need to keep paging back until you’ve reached the point in time you’re interested in.

 

Reply