Skip to main content
Solved

How do I check via API if a list or segment has updated any profile?


Forum|alt.badge.img+1

Is it possible to check if a list or segment has updated any profile?

When a new profile is created or even if a profile was deleted for example.

 

I was trying the Get List: https://developers.klaviyo.com/en/reference/get_list

I thought the "updated" attribute would do the work, but apparently, it doesn't.

It only changes when I update the List's name.

 

Context

I'm working on a system that imports the profiles for a given List/Segment, and we want to sync it periodically.

What I'm trying to do is to check if it has something new to sync or not.

Best answer by Brian Turcotte

Hi @renatocn!

 

I’m not totally sure that I understand the use case here, since lists and segments can’t delete or update profiles themselves - that would be an action performed by a flow that is triggered by someone joining a list.

 

If by “when a profile is created or deleted”, you mean added or removed from a list, there currently isn’t an API endpoint that is dedicated to returning the change in number or clientele of profiles over a given period of time. However, you could potentially calculate this yourself by calling the Get List Profiles and Get Segment Profiles endpoints (which return all profiles in a given List/Segment) and comparing the list/segment composition with an earlier call to deduce the changes. In your case however, this would likely negate the purpose of your use case, if I understand the context correctly.

 

I will definitely forward this as a Product Request to our product team, as I agree this could be a valuable tool.

 

I hope this helps to clarify, and thanks for using the Community!

- Brian

View original
Did this topic or the replies in the thread help you find an answer to your question?

3 replies

Brian Turcotte
Forum|alt.badge.img+37
  • Klaviyo Alum
  • 1393 replies
  • Answer
  • April 11, 2023

Hi @renatocn!

 

I’m not totally sure that I understand the use case here, since lists and segments can’t delete or update profiles themselves - that would be an action performed by a flow that is triggered by someone joining a list.

 

If by “when a profile is created or deleted”, you mean added or removed from a list, there currently isn’t an API endpoint that is dedicated to returning the change in number or clientele of profiles over a given period of time. However, you could potentially calculate this yourself by calling the Get List Profiles and Get Segment Profiles endpoints (which return all profiles in a given List/Segment) and comparing the list/segment composition with an earlier call to deduce the changes. In your case however, this would likely negate the purpose of your use case, if I understand the context correctly.

 

I will definitely forward this as a Product Request to our product team, as I agree this could be a valuable tool.

 

I hope this helps to clarify, and thanks for using the Community!

- Brian


Forum|alt.badge.img+1
  • Author
  • Contributor I
  • 1 reply
  • April 11, 2023

hey @Brian Turcotte, thank you for the response.

 

That's correct, perhaps the proper sentence would be "added or removed from a list" as you mentioned.

And that is what I was looking for.

 

I can check it by myself but an indicator of change would save me a lot of time when no profile was added or removed from a given list. Indicating my system doesn't need to sync anything new.

 

I ended up doing that verification on my side, but it would be useful in the future.

Thanks!

 


Forum|alt.badge.img+1
  • Contributor II
  • 3 replies
  • October 16, 2023

+1 For this request. We’re seeing that you can efficiently retrieve the profiles that were added to a list/segment in the past X days by using the joined_group_at filter, but there’s no way to similarly retrieve profiles that were removed from a list/segment in the past X days using something like a left_group_at filter.