API: Get Lead Activities => how accurate is "Remove from list" activity type?

Highlighted
Anonymous
Not applicable

API: Get Lead Activities => how accurate is "Remove from list" activity type?

Hi,

I'm trying to synchronize a static list by using "Get Lead Activities" with activityTypeIds 24 and 25 which are respectively "Add to List" and "Remove from List".

However, "Remove from List" isn't reporting anything. "Add to List" works always though.

Anyone using the same method to synchronize a static list?

Or anyone knows a better way to synchronize?

Thanks,

Hidenari

Tags (3)
10 REPLIES 10
Highlighted
Anonymous
Not applicable

Re: API: Get Lead Activities => how accurate is "Remove from list" activity type?

I just found out that if you specify listId, it doesn't give you "Remove from List" activities.

But if you don't provide listId, the result contains all specified activities.

So, my workaround is just specify activityTypeIds=24,25 and get all the activities first.

Then, filter by the static listId for primaryAttributeValueId.

Then, check Add/Remove activities in order to find who gets added/removed.

If anyone knows a better way of syncing a static list, I'm still keen to know.

Highlighted
Level 10 - Community Moderator

Re: API: Get Lead Activities => how accurate is "Remove from list" activity type?

Great discovery! And in retrospect, it makes sense in that the lead can't be in the list at the time you're querying, by definition.

Highlighted
Anonymous
Not applicable

Re: API: Get Lead Activities => how accurate is "Remove from list" activity type?

Do you think it makes sense?

To me, it is opposite.

If you specify a listId, you get only "Add to List" activities, no "Remove from List" activities at all.

Since leads are in the static list, I think it should report "Remove from List" rather than "Add to List", no?

Maybe it's just me but I don't know. To me, it seems a bit strange.

Highlighted
Level 10 - Community Moderator

Re: API: Get Lead Activities => how accurate is "Remove from list" activity type?

It does make sense to me. If you're filtering by Static List, that means filtering by the activities of leads that are in that List at the time you query.

If a lead isn't in the list now, you shouldn't see their Remove from List activity, since they don't match the filter. Otherwise, you'd see all the activities of all the leads that had ever been in the list.

Highlighted
Anonymous
Not applicable

Re: API: Get Lead Activities => how accurate is "Remove from list" activity type?

Maybe I wasn't clearly explaining what is really happening.

Leads are in the list but activities.json endpoint doesn't return "Remove from List" event.

1. Get a paging token with now as the time.

2. Remove a lead from a static list.

3. Call the activities.json endpoint with the static listId and activityTypeIds=24,25

Result comes back with no activities.

Highlighted
Level 10 - Community Moderator

Re: API: Get Lead Activities => how accurate is "Remove from list" activity type?

Leads are in the list but activities.json endpoint doesn't return "Remove from List" event.

Leads were in the list. Their activities shouldn't be included if they're not now in the list.

Highlighted
Anonymous
Not applicable

Re: API: Get Lead Activities => how accurate is "Remove from list" activity type?

Yeah, I see. That makes sense.

Highlighted
Anonymous
Not applicable

Re: API: Get Lead Activities => how accurate is "Remove from list" activity type?

Interesting!

My workaround

- Create a static list "RemovedFromList".

- If the SC will remove from the list then add to "RemovedFromList" list

- Call API activities.json?type=25&listId={"RemovedFromList" list ID}&nextPageToken=xxxx

Highlighted
Anonymous
Not applicable

Re: API: Get Lead Activities => how accurate is "Remove from list" activity type?

Thanks, that should work too.

But then I have to clear the leads in "RemovedFromList" list at some point.

I don't know what is the best way.

Like if I don't provide a listId, I get quite a lot of unnecessary activities and need to filter them.