Re: Mismatch in activities retrieved with Bulk and Batch Activity Extract

AmilaAA
Level 1

Mismatch in activities retrieved with Bulk and Batch Activity Extract

Hi,

I have separate Marketo activity extraction applications. One application extract activities using the batch API (rest/v1/activities.json)

other one extract activities using bulk API (/bulk/v1/activities/export/{exportId}/file.json). However, when I compared the activities extracted from the two methods I found there is a discrepancy in activity count. Activities extracted using batch API were missing some activities which were available in the Bulk extract. I double-checked the sinceDatetime and tried a couple of times. Every time I end up with the same results. Is this is a known issue or way I'm using it not correct? 

(If the sinceDatetime in Batch = 8/2/2022 12:00:00 AM I'm using the same DateTime to create the bulk export job.

i.e. startAt = 8/2/2022 12:00:00 AM endAt = 8/2/2022 11:59:59 PM. I'm only checking activities  8/2/2022 )

Thanks in Advance.

2 REPLIES 2
Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Mismatch in activities retrieved with Bulk and Batch Activity Extract

Did you ensure that you page through all the results in the query activities API's response? The max. batch-size of the get activities API is 300, you'd need to page through the results until the moreResult flag is returned as false in the response.

 

Additionally, you may already know this but just for reference - the sinceDatetime would return all the requested lead activities starting from the sinceDatetime value to the current time, i.e., when the request is sent. Whereas, in the bulk extract you specify a specific fixed time window for querying the lead activities b/w startAt and endAt values. This may also cause a difference in the responses of both the API calls.

 

AmilaAA
Level 1

Re: Mismatch in activities retrieved with Bulk and Batch Activity Extract

Thank you for the response!

Yes. I'm paging through all the results until moreResult = false. Below I have an example. In the example I selected only one activity type Id and extracted the data in both methods.

In the Bulk extract, I get the below activity

marketoGUID activityDate Type
289273707 2022-08-02T13:00:59Z 6

However, in the Batch extract, this activity with the id is not showing. 

marketoGUID activityDate typeId
289273697 2022-08-02T13:00:58Z 6
289273698 2022-08-02T13:00:58Z 6
289273699 2022-08-02T13:00:58Z 6
289273700 2022-08-02T13:00:58Z 6
289273701 2022-08-02T13:00:58Z 6
289273702 2022-08-02T13:00:58Z 6
289273703 2022-08-02T13:00:58Z 6
289273704 2022-08-02T13:00:58Z 6
289273706 2022-08-02T13:00:59Z 6
289276710 2022-08-02T13:01:00Z 6
289276711 2022-08-02T13:01:00Z 6
289277713 2022-08-02T13:01:02Z 6